Red Gate forums :: View topic - Command Line Script file Only
Return to www.red-gate.com RSS Feed Available

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

Command Line Script file Only

Search in SQL Compare Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
abaker97



Joined: 01 Aug 2011
Posts: 1
Location: United States

PostPosted: Mon Aug 01, 2011 4:24 pm    Post subject: Command Line Script file Only Reply with quote

I am trying to compare a scripts folder to live database via the command line and generate a script file using the /scriptfile parameter without actually syncing the database. But, the only way I can get the script file created is to use the /sync option. Is it possible to generated the script file without syncing?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1120
Location: My desk.

PostPosted: Wed Aug 03, 2011 6:37 pm    Post subject: Reply with quote

Thanks for your post.

This sounds unusual. I've just tried it here, with a commandline of:

sqlcompare /db1:<db> /db2:<db> /scriptfile:c:\somefolder\somescript.sql

This worked fine, and the file was generated. Are you working with any other switches that may somehow be conflicting? The full command may help. Also, what version are you using? If your scriptfile already exists, you may need to add on the /force option to overwrite it; but I think the same would be true with the /sync option set.
Back to top
View user's profile Send private message
bjarni



Joined: 21 Sep 2011
Posts: 4

PostPosted: Wed Sep 21, 2011 10:40 am    Post subject: Reply with quote

I got the same problem as abaker97:

If I specify /scriptfile without /sync I don't get my scriptfile ex:

sqlcompare /s1:<server1> /db1:<db> /s2:<server2> /db2:<db> /scriptfile:c:\somefolder\somescript.sql

Including the /sync switch will generate the scriptfile ex:

sqlcompare /s1:<server1> /db1:<db> /s2:<server2> /db2:<db> /scriptfile:c:\somefolder\somescript.sql /sync

I'm using SqlCompare8! Is this a bug which has been fixed in SqlCompare9?

Is it because I'm comparing across servers?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1120
Location: My desk.

PostPosted: Wed Sep 21, 2011 11:53 am    Post subject: Reply with quote

I believe an update to the latest release did resolve it- try out the latest version and see if it works for you.
Back to top
View user's profile Send private message
bjarni



Joined: 21 Sep 2011
Posts: 4

PostPosted: Fri Sep 23, 2011 12:27 pm    Post subject: Reply with quote

Thanks.

I found a patch that fixed the problem:

http://www.red-gate.com/messageboard/viewtopic.php?t=11077

SC-4896 /ScriptFile:"<path\name.sql>" does not appear to generate script file (regression from 8.2)
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