Home » SQL Server » Database snapshot captures only data changes or it will also save real database from DDL changes ?

Database snapshot captures only data changes or it will also save real database from DDL changes ?


Question : Database snapshot captures only data changes or it will also save real database from DDL changes (like table structure, store procedure etc.)

Answer : Yes.

So here we explian how :-

Databse snapshot is read only databse. It’s a static view database on which only read only operaton can be performed. Database snapshot works on data page level. Before a page of the source database is modified for the first time, the original page is copied from the source database to the snapshot. The snapshot stores the original page, preserving the data records as they existed when the snapshot was created. The same process is repeated for every page that is being modified for the first time.

So DB snapshot works page level & page is the smallest unit database engine can understand. Page contains the actual data, transactions and schema details. So here, I say snapshot works on page (not only data pages) and any change in page will move page to DB snapshot.

Break up of complete storage cycle :- Windows Server > SQL Instance > Database > Database Files > Extends > Pages

Source : https://msdn.microsoft.com/en-us/library/ms175158.aspx

Reference : Rohit Garg (http://mssqlfun.com/)

You can find and follow MSSQLFUN :-

http://www.facebook.com/mssqlfun

http://mssqlfun.com/feed

https://twitter.com/Rgarg86

Other Linked Profiles :-

http://www.sqlservercentral.com/blogs/mssqlfun/

http://social.msdn.microsoft.com/Profile/rohitgarg

http://www.toadworld.com/members/rohit-garg/blogs/default.aspx

http://beyondrelational.com/members/RohitGarg/default.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: