February 27, 2012 at 3:40 am
Hi,
What is the meaning of below given sentence...
A database snapshot provides a points-in-time copy of a source database.
Regards,
Sachin
February 27, 2012 at 4:02 am
dsachu (2/27/2012)
Hi,What is the meaning of below given sentence...
A database snapshot provides a points-in-time copy of a source database.
Regards,
Sachin
It means that whenever you create a snapshot of database it creates a copy of the database that is up to date as per the time you have created it. That is why it is called as the Snapshot(or Image). What happens when you take a picture of some person/location from your camera? The camera creates an image of the person/location as per that time only.
February 27, 2012 at 4:56 am
ohhh..... that's great example.....Now i can't forget this example in my life. This is very clear.
Thanks a lot...:-)
February 27, 2012 at 5:48 am
Hi,
Can u explain this one also :-
When a data page changes in the source database, SQL Server writes the original image of the page into the database snapshot, which preserves the state of the data page at the instant in time that the database snapshot was created. Any subsequent changes to the data page in the source database are ignored by the database snapshot. This write of the original of the data page from the source database is called copy-on-write.
A Database snapshot contains a unique structure called a catalog of changed pages, which is a bitmap that contains a list of the pages within the source database that have changed since the point in time of the creation of the database snapshot. When SQL Server writes the original image of a data page to the database snapshot, it changes the bit corresponding to that page from 0 to 1 within the catalog of changed pages.
By writing the original image of a data page to the database snapshot, it allows the database snapshot to maintain the state of the data at the point in time of the database snapshot creation. Because a database snapshot contains only the original image of pages that where changed since creation very little overhead in incurred on the system.
February 27, 2012 at 6:01 am
The way that the snapshot works is that it only stores the old versions of pages that have changed in the source database since the snapshot was created. That's why it's so much smaller than the DB.
When the snapshot is created, it's empty. No data pages in it. Now a page changes in the source database. To maintain its 'point-in-time' view of the database, the snapshot takes a copy of that modified data page as it was before modification. Now it has a single page, a page whose values are as they were at the point the snapshot was created. That page was copied on write, on a write to the source database (it should actually be called copy-before-write, because the snapshot page is copied before the page in the source DB is written to)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply