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.
| Author |
Topic |
|
SQLMark
Starting Member
18 Posts |
Posted - 2009-01-13 : 08:22:45
|
Hi allI have a question for you...Is it possible in SQL Server 2005 to create a sort of "restore point" (like Windows do...) in order to save the current state of the database (data and structure), so I can launch a program that execute some SQL script files and, in event of errors, I can return in the original saved state of the database?What I need is a sort of "mega TRANSACTION".Note that I can't enclose all the scripts in a TRANSACTION because of some reasons (for example because I must launch any script one by one, or because some script files include commands that cannot be managed by transactions - like CREATE DATABASE...).How can I do?Thanks to all that wants to contribute! Mark |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2009-01-13 : 08:33:02
|
| There are many ways, but all require a little bit more work than the windows restore point.1. The obvious choice: backup. A full backup of your database before this upgrade would give you a restore point at the time of the backup. 2. Snapshot. If you're on 2005 Enterprise you can make a snapshot of your database. Never tried it myself but I think it possible to revert to the snapshot if something goes wrong. Umh...there was another somewhat obvious choice but now it seems to have slipped my mind.- Lumbago |
 |
|
|
SQLMark
Starting Member
18 Posts |
Posted - 2009-01-13 : 08:39:19
|
Hi Lumbago!What are difference between backup and snapshot?For the third solution please eat some phosphorus... |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|