I have two MS SQL 2005 servers, one for production and one for testing, and both have a Full recovery model. I restore a backup of the production database on the test server, and then the user makes the changes.
I want to be able to:
- Discard all changes made to the test SQL server.
- Apply all transactions that occurred on the production SQL server since the test server was initially restored so that the two servers had the same data.
I do not want to do a full recovery of the database from the backup file, since it takes too much time with our + 200 GB database, especially when all the changed data is less than 1 GB.
EDIT
Based on the suggestions below, I tried to restore the database using NoRecovery, but you cannot create a snapshot of the database in this state.
I also tried restoring it in Standby Read only mode, which works, and I can take a snapshot of the database and then apply transactional logs to the original db, but I can not make the database writable again while there are snapshots against This.
Duration:
restore database TestDB with recovery
Results with the following error:
Msg 5094, Level 16, State 2, Line 1 The operation cannot be performed on a database with database snapshots or active DBCC replicas
sql database sql-server
Chris Magnuson Aug 28 '09 at 22:11 2009-08-28 22:11
source share