Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Dual Databases - Keeping them in Sync

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-12-11 : 09:20:44
Mike writes "Would like to know a good method of keeping two databases in sync. They are located in two different states.
Database1 is a development box.
Database2 is at a test location.

Want to ensure that the objects of Data1base2 are current with
Database1. Database2 will have unique test data which I need to keep.

Need method of updating the DB2 from DB1 once a week.
Tables, views, SP, UserDefined Fuctions, etc.


Summary: The end result would be DB1 and DB2 would have
the same structure. DB1 would be the default DB.
DB2 would have unique test data that would not be contained
on DB1.

Any ideas on some ways to accomplish this.

We would live to automate a procedure if possible to accomplish this with losing the test data on DB2.

Thanks for your help.

Mike
mikeinoxford1@yahoo.com"

nr
SQLTeam MVY

12543 Posts

Posted - 2002-12-11 : 10:10:10
If you have test data in Database2 which you need to keep and the table structure changes on Database1 how can you keep the data - how do you know it will even fit in the new table structure - whether the table will even be there?

I would suggest that you script all the data in the database (crate insert statements for it
(see www.nigelrivett.co sp_CreateDataLoadScript.sql for a start).

Then you can copy the structure across - dmo, dts, create scripts -transfer - run, backup/restore/truncate
all fairly easy to implement automatically.

Then you can run the inserts.
If they fail then you will have to look at what has changed and update the scripts accordingly.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2002-12-11 : 10:47:25
have a look as well at www.red-gate.com

good cheap software (available on trial).....allowing database objects to be compared and kept in sync....



has been recommended several time around here.....

Go to Top of Page
   

- Advertisement -