Red Gate forums :: View topic - Auto-linking database to source control - make it stop.
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 2
SQL Source Control 2 forum

Auto-linking database to source control - make it stop.

Search in SQL Source Control 2 forum
Post new topic   Reply to topic
Jump to:  
Author Message
AdamY



Joined: 15 Oct 2010
Posts: 41

PostPosted: Fri Mar 11, 2011 11:02 pm    Post subject: Auto-linking database to source control - make it stop. Reply with quote

I am using SQL Source Control v2.0.10.11 and my source control system is TFS.
I have a database called [MyDB] on server [ServDev]. I linked [MyDB] to source control. After deploying [MyDB] to [ServTest], I noticed it is also linked to source control automatically - I didn't manually do anything, but SQL Sourse Control sees it as linked - I assume because the name is the same.

Can I make it so SQL Source Control does NOT automatically link a database to source control just because the database name matches one that is already linked? That seems to be a risky assumption. It would be nice to have control over that; especially because we use a branch/trunk method and the Dev TFS file location isn't necessarily the same as the Test TFS location. Or perhaps I just have 2 databases called [YourDB] that have nothing to do with each other.
Back to top
View user's profile Send private message
AdamY



Joined: 15 Oct 2010
Posts: 41

PostPosted: Tue Mar 15, 2011 5:41 pm    Post subject: Root Cause discovered Reply with quote

Root Cause - no work around:
The server names are actually the same, but in different networks (virtual). I use hosts file entries to connect to each. So...

Server names are both: [ServerA]
The IP for [ServerA] in the Dev network is 1.1.1.1
The IP for [ServerA] in the Test network is 1.1.2.1
My hosts file links 1.1.1.1 to [ServDev] and 1.1.2.1 to [ServTest].

Then, within SSMS, I just connect to [ServDev] or [ServTest]. SQL Source Control uses @@SERVERNAME so even though they are different servers and SSMS sees them that way, SQL Source Control thinks it is the same server.

Red Gate suggested connecting with different Windows Accounts as a work around. But what it tells me is that in our setup, I don't have much of a choice unless I could trick/change @@SERVERNAME which seems a little too risky.
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