SQL Source Control 7

SQL Source Control can't access this database because the directory once contained more than one SQL Server Database Project (.sqlproj) file

When SQL Source Control runs its first get latest from a repository, it looks for the earliest revision where the .sqlproj file exists to determine the starting state of the project.

If two or more .sqlproj files ever existed in the same directory in the repository, the error occurs even if the extra .sqlproj files were removed in later revisions.


You can work around the problem by manually updating the working base. You only need to do this after you first link the database.

  1. On the Setup tab, expand Under the hood and click Open working base.
    The working base opens in Windows Explorer.
  2. Close Management Studio.
  3. Manually update the working base to the latest revision in source control with your source control client.
    For example, if you're using Subversion with TortoiseSVN, right-click and select SVN Update to update the directory to the latest version in your repository.
  4. Open SQL Server Management Studio and SQL Source Control. 
    Any differences between your database and the latest version in your repository are shown as changes to commit on the Commit tab.
  5. If you linked a blank database, SQL Source Control will display all the objects in the project as dropped in the Commit tab. 
    Highlight all the objects, right-click, and select Undo Changes.

Your database now represents the latest version in the repository.

If this doesn't fix the problem, contact Redgate support.

Didn't find what you were looking for?