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
 SQL Server Administration (2000)
 possible: restore DB from numerous full backups?

Author  Topic 

pukeboot
Starting Member

2 Posts

Posted - 2005-11-18 : 18:16:19
Hi,

Unfortunately little consideration has gone into the backup plan for this DB, and now I am left with several full backups taken at odd junctures between purges. All of the pieces overlap another piece, but all pieces also contain data which no other piece contains. Is there some fairly straightforward way to piece these backups together into one master archive DB without violating primary key constraints and while maintaining all original values?

Any advice would be greatly appreciated. Thanks.
-b.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-11-18 : 18:24:23
There is no easy way to do this. You'll need to restore each of the backups to a different database name and then run T-SQL to pull them together. You'll be using the three part naming convention of the tables.

INSERT INTO Table1
SELECT * FROM DB2.dbo.Table1
WHERE ...

Tara Kizer
aka tduggan
Go to Top of Page

pukeboot
Starting Member

2 Posts

Posted - 2005-11-18 : 19:25:35
Thanks, Tara.

I was afraid of that. This DB is like a million tables long, many of which are like four or five tables wide.

If only there were a "merge backups" wizard...

Thanks, again!
-b.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-11-18 : 20:12:30
red-gate, or another vendor of SQL tools, have a "compare" tool. Might help with the merge to see whats-what.

I think you can script any "differences" as INSERT statements, if that would help?

Kristen
Go to Top of Page
   

- Advertisement -