SQL SERVER Database Snapshot

Source: Internet
Author: User

What is a database snapshot?

A database snapshot is a read-only static view of the current database.

How does a database snapshot work?

Once a snapshot of the data is created, the database snapshot is allocated to a free file. When the original page of the database changes, the original page of the database is moved to the database snapshot.

Pictures from the web

To create a snapshot:

CREATE datadase database_snapshot_name----Server Storage Name

On

(

Name = logical_snapshot_name,-----local Storage Name

filename = ' d:\snapshot_name-----Local storage file

)

As Snapshot of Database_snapshot_name

eg. creating a database Snapshot

Use Factorygocreate Database FACTORY_DBSS on (    name = Factory,   filename = ' D:\factory_poto ') as snapshot of factory

accessing database Snapshots

1  Use FACTORY_DBSS 2 Go 3 4 Select *  from Factory_dbss.dbo.depart

Deleting a database snapshot

1 DROP DATABASE FACTORY_DBSS

Recovering a database using snapshots

1  Use Master 2 Go 3 4 Restore Database  from = ' FACTORY_DBSS ' 5 Go

To create a database snapshot regularly

SQL SERVER Database Snapshot

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.