Learn more about Toad for SQL Server
at Quest.com

Find solutions and downloads at the
Toad for SQL Server Support Portal

< To bookmark a page, right-click the Page Title and select Add to Favorites / Bookmark This Page

Toad for SQL Server 5.7

You are here: Use Version Control > Configure Version Control > Configure CVS

Configure CVS

You can configure version control to work with SQL scripts in the Editor, or you can configure it to work with database objects and SQL scripts in the Object Explorer. See Troubleshoot Version Control for more information.

Notes: 

To configure CVS to work with SQL scripts in the Editor

  1. Ensure that a supported version control client is installed on the computer where Toad is installed. See About Version Control for more information about tested version control clients and supported versions.

  2. Open an Editor window.
  3. Right-click anywhere in the toolbar area and select Version Control to display the Version Control toolbar.

    Tip: You can also access version control functionality from the File | Version Control menu when the Editor window has focus.

  4. Click to open the Version Control wizard.
  5. Review the following for additional information:

  6. Version Control System Page Description

    Type

    Select CVS.

    Properties

    Click this button (beside the Type field) and complete the following in the Command Based Version Control Properties window:

    • BinaryPath—Enter the path where the CVS client is installed. For example, if you installed CVSNT, you would enter:

      C:\Program Files\CVSNT

    • BranchRevision—Leave this field blank if you are working from the trunk in version control. If you are working from a branch, enter the branch number or name in this field.

      Caution: Specifying HEAD for the BranchRevision parameter can cause errors. Leave the parameter blank when working with the HEAD revision.

    Server

    Select the existing working folder for the version control repository or specify the server string. For example, if you are connecting using pserver, you should specify the server string as follows:

    :pserver:MyServer:Port:/MyWorkingRepository

    User name/ password

    Enter your CVS command-line user name and password and click Login.

    Note: The User name field is optional.

    Default Version Control Settings Page Description

    Version control folder

    Select the folder on the version control server where you want to check the scripts in.

    If you already have the Editor-managed scripts under version control, select the folder on the server where these scripts are located.

    Notes:

    • Version control automatically checks out the scripts in this folder and any subfolders to the location you specify in the Working folder field.
    • If you are managing SQL scripts from the Editor instead of the Object Explorer, make sure the version control folder used for Editor-managed scripts is different from the one used for objects and scripts managed in the Database Explorer.

    Working folder

    Select the root repository folder on the client computer to use as the default working folder for checking SQL scripts out.

    If you already have Editor-managed SQL scripts under version control, select the existing working folder for these.

  7. See Add Scripts Using the Editor for more information.

Tips:

To configure CVS to work with objects and SQL scripts in the Object Explorer

  1. Ensure that a supported version control client is installed on the computer where Toad is installed. See About Version Control for more information about tested version control clients and supported versions.

  2. Right-click one or more objects in the Object Explorer and select Version Control | Version Control Wizard.

  3. Review the following for additional information:

    Configuration Type Page

    Description

    Configuration

    Select one of the following configuration types:

    • Server—Applies the same settings for all databases on a server.
    • Database—Applies custom settings for each database on a server. If selected, you must re-run the Version Control wizard for each database you want to place under version control.

      Tip: You can add databases to version control at a later time by selecting the database under Tools | Options | Version Control | Objects.

    Version Control System Page

    Description

    Type

    Select CVS.

    Properties

    Click this button (beside the Type field) and complete the following in the Command Based Version Control Properties window:

    • BinaryPath—Enter the path where the CVS client is installed. For example, if you installed CVSNT, you would enter:

      C:\Program Files\CVSNT

    • BranchRevision—Leave this field blank if you are working from the trunk in version control. If you are working from a branch, enter the branch number or name in this field.

    Server

    Select the existing working folder for the version control repository or specify the server string. For example, if you are connecting using pserver, you should specify the server string as follows: 
    :pserver:MyServer:Port:/MyWorkingRepository

    User name/ Password

    Enter your CVS command-line user name and password and click Login.

    Note: The User name field is optional.

    Default Version Control Settings Page

    Description

    Version control folder

    Select the folder on the version control server where you want to check objects and scripts in.

    If you already have objects or scripts under version control, select the folder on the server where these objects or scripts are located.

    Notes:

    • Version control automatically checks out objects or scripts in this folder and any subfolders to the location you specify in the Working folder field.
    • If you are managing SQL scripts from the Editor instead of the Object Explorer, make sure the version control folder used for Editor-managed scripts is different from the one used for objects and scripts managed in the Database Explorer.

    Working folder

    Select the root repository folder on the client computer to use as the default working folder for checking objects and SQL scripts out.

    If you already have objects or SQL scripts under version control, select the existing working folder for these.

    Create/Change file name formats

    Specify the default format to use for objects. Objects are archived as script files in the version control provider.

    To change the default order, delete the default format and click + to select the order.

    Use default mode

    Clear this checkbox to override default folders for actions, such as create or alter scripts for each object (recommended for objects that are already under version control).

  4. Complete the wizard and add objects to version control. Depending on the number of objects selected, this process may take time.

    Note: If you rename a version controlled object, Toad drops the original object and its history from version control and prompts you to add the renamed object to version control This newly renamed object does not have any history associated with it.

    The following indicators display in the top-right corner of any object under version control:

    Object is under version control

    Object is checked out by another user

    Object is checked out by current user

    If version control is configured but an indicator does not display, open the Object Options page in Tools | Options | Version Control | Objects and select the checkbox for that object.

  5. Right-click one or more objects in the Object Explorer to check them in/out, get the latest version, update the status, and other actions.

  6. If you configured version control for database objects, you can also version control SQL scripts using the Scripts tab (tab view or drop-down list mode) in the Object Explorer, as illustrated in the following example:

    The following folders or nodes are available: 

    Server Scripts folder/node

    Creates and manages SQL scripts that apply to all databases on a server.

    Note: This folder/node is only available if you configured version control at the server level.

    Scripts folder/node

    Creates and manages SQL scripts that apply to individual databases. If you are using the tree view, this displays below each database node, as illustrated in the following example: 

Tips:

  

Related Topics

About Version Control