Red Gate forums :: View topic - Retrieve migration scripts from 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

Retrieve migration scripts from TFS

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



Joined: 07 Oct 2013
Posts: 2

PostPosted: Tue Oct 08, 2013 11:03 am    Post subject: Retrieve migration scripts from TFS Reply with quote

What's the best way to retrieve a set of migration scripts (stored in version control using SQL Source Control) and then execute them?

Is there a method somewhere to say retrieve a reference to a set of scripts? Can anyone give me an example?

I don't want to write code that....

Connect to TFS
Get latest scripts
Identify uncommitted scripts
Executes the scripts

There must be a way of doing this through the API?
Back to top
View user's profile Send private message
Evan Moss



Joined: 12 Jun 2013
Posts: 44

PostPosted: Thu Oct 10, 2013 7:42 pm    Post subject: Reply with quote

Hello,

You should be able to accomplish this by using the SQL Compare (and possibly SQL Data Compare) command line.

You'll need to create two xml files and reference them from the command line.

If you go into your extended properties for the database you're working with, you'll notice "SQLSourceControl Scripts Location" and "SQLSourceControl Migration Scripts Location". You'll need to pull the value from SQLSourceControl Scripts Location and create an xml file with that value and also create a separate xml file for the value of SQLSourceControl Migration Scripts Location.

In your command line, you'll need to include these switches:
/migrationsfolderxml:filepath for migration scripts xml
/scriptsfolderxml:filepath for scripts xml

Here's the documentation page for using the command line for SQL Compare: http://documentation.red-gate.com/display/SC104/Using+the+command+line

There are a few less complicated worked examples here: http://documentation.red-gate.com/display/SC104/Simple+examples+using+the+command+line

Hope that helps,
Evan
_________________
Evan Moss
Product Support
(866) 627-8107
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