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 Subversion

Configure Subversion

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 Subversion 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 Subversion.

    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 Subversion client that contains svn.exe is installed. For example, if you installed the CollabNet Subversion Client, you would enter:

      C:\Program Files\CollabNet Subversion Client

      Note:  Do not include svn.exe in the path.

    • 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.

      Important: 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: svn://MyServer). 

    User name/ Password

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

    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. Add Scripts Using the Editor

Tips:

To configure Subversion 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:
  4. 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 Subversion.

    Note: The version number beside Subversion is an internal file definition used by Toad to check if an update for this file is available. It is not the actual version number for the version control provider.

    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 Subversion client that contains svn.exe is installed. For example, if you installed the CollabNet Subversion Client, you would enter:

      C:\Program Files\CollabNet Subversion Client

      Note: Do not include svn.exe in the path.

    • 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: svn://MyServer).

    User name/ Password

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

    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.

    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.

    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.

    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).

  5. 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.

  6. 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.

  7. 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