SQL Source Control 4

Setting the location of the temporary database

We're going to remove the migrations V2 beta from SQL Source Control in version 5. We're replacing it with an improved version of the original migrations feature that supports more things (including Git, branching, and merging).

We'll be publishing more information about this soon.

This page refers to the Migrations V2 beta. For information about how to use V1 migration scripts, see Working with migration scripts.

To deploy Migration V2 scripts, SQL Source Control creates a temporary database. This means the target database is unaffected if any of the deployment steps fail. For a detailed explanation of how SQL Source Control uses the temporary database, see How V2 migration scripts are used in deployment.

The temporary database can be created on:

  • LocalDB, a low-footprint version of SQL Server Express (requires .NET Framework 4.0.2 or later)
  • the current server

LocalDB might not work with every SQL Server feature. If you have problems with LocalDB, see Troubleshooting below, or use the current server instead.

If LocalDB is installed, SQL Source Control uses it by default.

Setting the location of the temporary database

In the Migrations tab, click Configure temporary database:
 

The Choose a temporary database dialog box opens:

Select an option and click OK.

Downloading and installing LocalDB

Using Management Studio 2008 R2

To use LocalDB with Management Studio 2008 R2, you need .NET Framework 4.0.2 or later (4.5 recommended).

LocalDB is a low-footprint version of SQL Server Express. It's designed to be packaged with software that needs access to its own SQL Server instance, even without a network connection. All LocalDB instances are accessible only on the local machine and only by the user who installed the package. It requires no maintenance.

To download and install LocalDB:

  1. Go to the Microsoft SQL Server 2012 Express download page.
  2. Click Download.
    A list of downloadable files is displayed.
  3. For 32-bit systems, select ENU\x86\LocalDB.MSI
    For 64-bit systems, select ENU\x64\LocalDB.MSI
  4. Click Next.
    The LocalDB installer download starts. 
  5. Run the installer and follow the instructions.

For more information about LocalDB, see Microsoft's SQL Server Express WebLog.

Troubleshooting LocalDB

If SQL Source Control doesn't detect LocalDB, you might need to manually start the default instance. To do this:

  1. Open the command prompt. 
  2. Run: sqllocaldb start mssqllocaldb
    The command prompt returns "LocalDB instance 'MSSQLLocalDB' started."

SQL Source Control should now detect LocalDB.

If LocalDB creates problems, we recommend you use a temporary database instead.


Didn't find what you were looking for?