You are here: Re: snapshots and reverts « MsSQL Server « IT news, forums, messages
Re: snapshots and reverts

Posted by Erland Sommarskog on 11/10/07 23:32

(codefragment@googlemail.com) writes:
> We run through a process to debug some problem, we then want to revert
> the database back to the state it was in so we can repeat that process
> to help in debugging. At the moment I can get around this by making a
> note of the tables involved and use deletes, inserts to get the data
> back to how I want it but it would be nice if I could just click
> 'backup' and and then later revert. If it was fast it could be a real
> help.

Indeed BACKUP/RESTORE is the easiest way to do this, although it can
take a bit too long time with big databases.

Database snapshots on SQL 2005 overcomes that problem.

For a single test, it often works with putting the entire test in
BEGIN/ROLLBACK TRANSACTION, but this may not always work. As long as
the test succedes there are no problems, but if there is a rollback
in the code being tested, the rest of test may be run without a rollback.
And if the test includes doing things from a GUI, or using multiple
processes, BEGIN/ROLLBACK is not practical at all.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация