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
 General SQL Server Forums
 New to SQL Server Programming
 How to partially backup a DB??

Author  Topic 

phrankbooth
Posting Yak Master

162 Posts

Posted - 2009-03-14 : 12:10:01
Hello,

I have a DB with a Parent->child->grandchild table structure.

What I need to do is remove a range of records, maintain their structural integrity and place them into a backup DB so that if I need to later on, I can simply put them back into the main DB.

I am having trouble coming up with a query that will do this.

1: Do I need to necessarily create a clone empty DB of the original and then copy the records?
2: Will a query automatically generate the tables and copy the records?
3: What would the skeleton of such a query look like?

Thanks!!

--PhB

mfemenel
Professor Frink

1421 Posts

Posted - 2009-03-14 : 12:13:29
Option A: Partition your table and switch the records you want to move into a holding table. Copy the records from there into another database (if needed)
Option B: Backup the filegroup that contains the table, restore to another DB
Option C: Backup the database, restore to other server.

Mike
"oh, that monkey is going to pay"
Go to Top of Page
   

- Advertisement -