Red Gate forums :: View topic - How to link database to an existing project in TFS?
Return to www.red-gate.com RSS Feed Available

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

How to link database to an existing project in TFS?

Search in SQL Source Control 3 forum
Post new topic   Reply to topic
Jump to:  
Author Message
SamuelV



Joined: 25 Jan 2013
Posts: 2

PostPosted: Fri Jan 25, 2013 8:25 pm    Post subject: How to link database to an existing project in TFS? Reply with quote

Can we link database to an existing project in TFS?

It seems we've to link to an empty folder, but if we do that won't we lose history of existing source code in TFS?

How should we preserve that version history? This might be obvious, but I'm confused. Appreciate your help!

~Sam.
Back to top
View user's profile Send private message
SamuelV



Joined: 25 Jan 2013
Posts: 2

PostPosted: Sun Jan 27, 2013 4:34 am    Post subject: Reply with quote

Ah, got it. I've to create a new empty database and link it to source control and do a get latest.
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1122
Location: Twitter: @dtabase

PostPosted: Sun Jan 27, 2013 9:14 pm    Post subject: Reply with quote

As well as linking a blank one, you can also link an existing database to a folder representing a source controlled database.

David Atkinson
Red Gate
Back to top
View user's profile Send private message Send e-mail
VG_mnet



Joined: 28 Jan 2013
Posts: 4

PostPosted: Mon Jan 28, 2013 4:15 pm    Post subject: I still don't get it Reply with quote

David, I read your reply but I still don't get it. How do I link an existing db with an existing database project in TFS? If I choose my existing project it tells me it must be an empty folder. Then I literally get linked to an empty folder and not my existing project. I am very confused.
TIA
-VG
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1122
Location: Twitter: @dtabase

PostPosted: Mon Jan 28, 2013 4:36 pm    Post subject: Reply with quote

Are you trying to link to a dbproj "Data Dude" (or DBPro) database project? If so, you're right that this wouldn't work. We only support the newer SSDT database project type (sqlproj), and even this needs this "beta" build, as we are still in the feedback-gathering stage. It can be downloaded here:

http://www.red-gate.com/SQLSourceControlBeta/DataToolsSupport

Kind regards,

David Atkinson
Product Manager
Red Gate
Back to top
View user's profile Send private message Send e-mail
VG_mnet



Joined: 28 Jan 2013
Posts: 4

PostPosted: Mon Jan 28, 2013 4:42 pm    Post subject: Reply with quote

Hi David, we are trying to link to a Visual Studio 2008 Database Project (dbproj). We want to upgrade to SQL12 but the new versions of the SQL projects (sqlProj for SSDT) do not give us the same level of functionality as the VS 2008 used to, so I was hoping to convert our VS 2008 db projects into Redgate to see if that works for us better than SSDT. Do we have to start our source-control over from scratch then? And if so, when I link to a blank TFS project, how come "Get Latest" doesn't download all the objects to our file system? I want to be able to execute a stored proc against multiple databases (test, then staging, then prod if the first two go well), and I'm not sure how your interface allows for that.

Thanks
-VG
Back to top
View user's profile Send private message
VG_mnet



Joined: 28 Jan 2013
Posts: 4

PostPosted: Wed Jan 30, 2013 3:35 pm    Post subject: Reply with quote

Can someone help me on this question? When I link to a blank TFS project, how come "Get Latest" doesn't download all the objects to our file system?
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1122
Location: Twitter: @dtabase

PostPosted: Wed Jan 30, 2013 6:33 pm    Post subject: Reply with quote

SQL Source Control can only link a database to an entirely blank folder, which is what you would need to do if you want to start source controlling your database, or it can link to a pre-existing source controlled folder. This pre-existing folder can be a Red Gate-created one (has a redgate.ssc file in it) or an SSDT project (has a sqlproj file).

If you have a dbproj folder then SQL Source Control will not recognize it.

I'm guessing that you must have created an SSDT (sqlproj) database project if you managed to link it. If this is blank and the database has objects then the next step would be to "Commit" the objects. "Get Latest" will be blank as there's nothing to "get".

David
Back to top
View user's profile Send private message Send e-mail
VG_mnet



Joined: 28 Jan 2013
Posts: 4

PostPosted: Fri Feb 01, 2013 3:08 pm    Post subject: Reply with quote

Thank you David. I did do a blank project just to try to get something working. I think I get it now - I am used to "Commit" meaning that the source-controlled changes are committed to the database, and "Get Latest" meaning that the objects are downloaded from source control to the file system. It appears that this means the oppposite in Redgate so that will take some getting used to, but I have been able to populate the source-controlled objects now after "committing".
-VG
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1122
Location: Twitter: @dtabase

PostPosted: Fri Feb 01, 2013 3:11 pm    Post subject: Reply with quote

That's great news. Do let us know how you get on. Any feedback we get on the database project functionality in the coming weeks will help us determine what needs doing to release this feature with the full product.
Back to top
View user's profile Send private message Send e-mail
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