Red Gate forums :: View topic - using sqlcompare command line to generate scripts for backup
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

using sqlcompare command line to generate scripts for backup

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



Joined: 26 Sep 2005
Posts: 6

PostPosted: Thu Jan 24, 2013 7:57 pm    Post subject: using sqlcompare command line to generate scripts for backup Reply with quote

Hey guys

I have some large databases I develop regularly. I dont want to backup (via Mozy) the database itself, but all the DDL has importance to me. I cannot use a source control provider at this time.

I want to schedule a script dump daily and have Mozy pick it up. However, it would be nice that if the DB objects dont change that Mozy doesn't have to process them. I tried this

Code:
sqlcompare  /Database1:MyDBName /Makescripts:"c:\sqldata\scripts\mydbname"


but got

Code:
Error: The folder 'c:\sqldata\scripts\myDB' exists. SQL Compare cannot
dump scripts from a database into a folder that already contains data. Use the
/synchronize option if you want to merge scripts into an existing folder.


If I am to pull this off right, do I need to do this to a temp area and /sync it to another file? Can anyone supply an example?
Back to top
View user's profile Send private message
dma550



Joined: 26 Sep 2005
Posts: 6

PostPosted: Sun Jan 27, 2013 2:24 pm    Post subject: Reply with quote

I did figure this out - I created a work folder, do a script to it. Then, I do a /sync /force between the folders, and only the changed files are touched. Then, these are picked up by Mozy as deltas.
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 683
Location: Cambridge

PostPosted: Mon Jan 28, 2013 10:36 am    Post subject: Reply with quote

Many thanks for your post and solution.

I am glad that this worked for you.

Kindly let us know if you have any other issues or questions regarding SQL Compare,I'll like to help.
_________________
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
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