How to do a partial database backup and restore?
Posted
by Workshop Alex
on Stack Overflow
See other posts from Stack Overflow
or by Workshop Alex
Published on 2010-05-12T06:39:24Z
Indexed on
2010/05/12
6:44 UTC
Read the original article
Hit count: 172
sql-server-2005
Simple problem. I'm working on a single SQL Server database which is shared between several offices. Each office has their own schema inside this database, thus dividing the database in logical pieces. (Plus one schema that is shared between multiple offices.) The database is stored on a dedicated server and we use a single database to keep the backup/restore procedure easier.
The problem, however, is that the Accounting Office might be modifying a lot of data and then the Secretary Office makes a mistake which requires restoration of a backup. Unfortunately, restoring the backup means that Accounting will lose their recently added data.
So, the alternative solution is by restoring the backup into a new database, remove the data from the old accounting schema and move the data for accounting only from the backup top the original database. This is the current solution and it's time-consuming and error-prone.
So, is there a way to make backups of a single schema, possibly through code? And then to restore just that schema, probably through code too?
© Stack Overflow or respective owner