SQL Source Control - 2.0

SQL Source Control

Learning SQL Source Control - 2.0

Linking a database to source control

Linking is the setup step for SQL Source Control. You need to link before you can commit the database objects.

Linking:

  • associates a database with a location in source control, allowing SQL Source Control to monitor changes
  • lets you tell SQL Source Control if a database is shared, so it can alert you to any conflicts or issues with shared working

    For more information, see Database development models

When linking a database, you have two options:

  • Link the database to source control

    This is used to source control a database for the first time; to associate your version of a database with one that is already source controlled; or to get a new database from source control.

  • Use the evaluation repository

    This creates a local Subversion repository on your computer, so you can evaluate SQL Source Control even if you do not have source control set up.

    For more information, see Using the evaluation repository

To link a database to source control:

  1. In SQL Source Control, on the Setup tab, ensure a database is selected, and click Link to source control.

    The Link Database to Source Control dialog box is displayed:

  2. On the left hand side, select your source control system; either Subversion (SVN), Team Foundation Server (TFS) or Just Evaluating.
  3. Provide details for the source control location you want to link the database to.

    For Subversion:

    Type or paste the URL for your Subversion repository.

    If you are creating a new link, you need to specify an existing, empty folder in your Subversion repository. SQL Source Control does not create the folder for you.

    For Team Foundation Server:

    Type or paste the URL of your Team Foundation Server and the port number to connect to that server; type or browse to the location of the Team Project and solution you want to associate with the database.

    If you are creating a new link you need to specify the location of an existing, empty source control folder. You are recommended to create a new folder. SQL Source Control does not create it for you.

  4. Tell SQL Source Control if the database is shared.

    If you are linking to a database that will be used by multiple developers, ensure the This is a shared database radio button is selected.

    For more information, see Database development models

  5. Click Link

    The database is linked to source control.

    The database icon in the Object Explorer changes to show that the database is linked:

Note that linking only associates the database with a location in source control.

If you are creating a new link, the database objects are not yet source controlled.

If you are linking to an existing version, your database has not yet been updated to that version.

To commit the objects or get the latest version, next go to either the Commit Changes tab or the Get Latest tab.

See also

Committing changes

Source controlling data

Getting the latest version

Viewing source control logs / history

Getting a specific version

Deploying a database from source control

Undoing changes

Conflicts

Using SVN bug IDs & TFS work items

Was this article helpful?

Search support
Forums

SQL Source Control

all SQL products

all products