Red Gate forums :: View topic - SQL Compare and SQL Source Control - Database not linked
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

SQL Compare and SQL Source Control - Database not linked

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
instalectual



Joined: 04 Sep 2013
Posts: 2
Location: United States

PostPosted: Thu Sep 19, 2013 7:44 pm    Post subject: SQL Compare and SQL Source Control - Database not linked Reply with quote

Hi,

I am receiving the following error when cruisecontrol executes my database build scripts:

Unexpected error: The database <dbName> is not linked to SQL Source Control

The scripts work perfectly when I execute them from the build server, but when cruisecontrol executes them we receive that error. While configuring this build process I was logged into the build terminal as myself and linked the database to SVN with SQL Source Control therefore it runs perfectly under my account. The issue seems to be that the cruisecontrol service runs under a service account and the db is not linked to SVN under that service account. Is there a way to make this work regardless of the account the service runs under. For example, is it possible to link a database to SVN for all users of a terminal?

A few things to note:
    It is not practical to run the cruisecontrol service under a non-service account for security reasons.
    It is not practical to logon to a machine under a service account in order to link the databases to SVN.


Any feedback on this matter is greatly appreciated.

Thanks,
Daniel
Back to top
View user's profile Send private message
andy.campbell.smith



Joined: 20 Oct 2011
Posts: 159
Location: Red Gate Software

PostPosted: Thu Sep 26, 2013 5:24 pm    Post subject: Reply with quote

Hi Daniel! This is quite a tricky question.

When you link a database to SQL Source Control, SQL Source Control creates a couple of folders in %localappdata%\Red Gate\SQL Source Control 3\ and records them in LinkedDatabases.xml, also in that directory. Here's my best guess as to how we could recreate that without using SQL Source Control directly:

First, link the database with your account and use the steps in this article to relocate the Working Base to a shared area:

http://documentation.red-gate.com/display/SOC3/Changing+the+location+of+the+working+base

Then copy LinkedDatabases.xml and RedGate_SQLSourceControl_Engine_EngineOptions.xml from your local app data to the All Users or service account profile folder.

As far as I can tell that ought to get it working, but this isn't officially supported and hasn't been tested, so I can't promise anything. Hope that helps!
_________________
Andy Campbell Smith

Red Gate Technical Support Engineer
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group