To create a snapshot using Microsoft MSSQL 2005 and reverting back to the snapshot can be performed with the following queries:

Creating a snapshot:

CREATE DATABASE Test_Snapshot ON ( NAME = logical_dnName_datafile,

'Test_snapshot.mdf' ) AS SNAPSHOT OF dbName

Using a snapshot:

USE Test_Snapshot
SELECT * FROM tableName

Reverting from a snapshot:

USE Master RESTORE DATABASE dbName FROM DATABASE_SNAPSHOT = 'Test_Snapshot'

0
Your rating: None
Post new comment
The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
Navigation
Syndicate
Syndicate content
Share this
Powered by Drupal, an open source content management system