Red Gate forums :: View topic - Creating a single large deployment script via commandline..
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

Creating a single large deployment script via commandline..

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



Joined: 13 Feb 2014
Posts: 2

PostPosted: Thu Feb 13, 2014 10:54 pm    Post subject: Creating a single large deployment script via commandline.. Reply with quote

Hello guys!

Newbie here, so pardon me, if I am asking something very simple, but I am just starting to get familiar with SQL Compare.

I went down the path trying to figure out, how to export a database to a single SQL schema file. By setting up a compare between the db to be exported and a blank instance, in the Deployment Wizard, I was able to pick "Create a Deployment Script" and noticed that it exports the entire db out in a single schema file.

Great! now, I want to do this on the command line...

I read the command line documentation and the /MakeScripts switch will do something similar, but it exports the db as a set of script files/folders instead of creating one single deplyment script.

Can someone help me figuring out how to make SQLCompare create this single deployment script for the db from the command line?

Thanks for your help!

Mihir
Back to top
View user's profile Send private message
eddie davis



Joined: 14 Jun 2006
Posts: 890
Location: Red Gate Software

PostPosted: Mon Feb 17, 2014 4:29 pm    Post subject: Reply with quote

Thank you for your forum post.

I suspect that you have chosen the incorrect option. The "/MakeScripts" creates a scripts folder which is the equilvant to the option in the GUI ->File Menu ->Create Scripts Folder.

The switch you need to use to mimic the Deployment Wizard behaviour of creating the deployment script is "/ScriptFile" as per this simple example:
Code:

sqlcompare /db1:WidgetStaging /db2:WidgetProduction /scriptFile:"C:\Scripts Folder\WidgetSyncScript.sql" /force


Further reading on the available switches can be found HERE.

Many Thanks
Eddie
_________________
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
mihird



Joined: 13 Feb 2014
Posts: 2

PostPosted: Thu Feb 20, 2014 5:25 pm    Post subject: Thanks you very much for the help! Reply with quote

Yep,

That worked like a charm! Thanks for the help and the referral on the command line switches. Lots of learning to do for a newbie!

So far, very impressed with SQL Compare.
Mihir.
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