Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Database SnapShot


Database SnapShot

Author
Message
m--S3qU3L
m--S3qU3L
Old Hand
Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)

Group: General Forum Members
Points: 340 Visits: 714
Hi DBAs,

After creating the database snapshot, when we try to read from the snapsshot, does SQL Server actually reads from the datafiles of Source database.

I'm asking this because, the data pages present in the SnapShot are only the updated ones after the database SnapShot has been created.

So, if database is not updated after the SnapShot creation, where does the SQL Server try to read. From the Source database or from the SnapShot.

Thanks
Manoj

John
Adi Cohn
Adi Cohn
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2617 Visits: 6329
When you create a database snapshot, the snap shot doesn’t hold any data. Each page that is modified for the first time in the original database, is copied to the snapshot with the data that it had before the modification (of course if the same page is modified again it will not be copied anymore). When you issue a select query on the snapshot, it will get the data from the snapshot itself only if the original data in the original database was modified. If the original data in the original database was not modified, it will query the table in the original database in order to get the information.

Adi

--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
GilaMonster
GilaMonster
SSC Guru
SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)SSC Guru (57K reputation)

Group: General Forum Members
Points: 57121 Visits: 44707
Pages that have been changed since the snapshot's creation are read from the snapshot (which contains the page as it was before it was modified). Pages that haven't are read from the source database.

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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


m--S3qU3L
m--S3qU3L
Old Hand
Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)

Group: General Forum Members
Points: 340 Visits: 714
Thanks for the replies guys.

So,If there has been no modification in the source database, then no pages will be copied to SS and hence the data is read from Source Database. In that case, how can the DB SnapShot can be used to Generate reports without blocking or being blocked by production operations.



This is considered to the best feature of SS. Please explain how the blocking in the production database is avoided by simply creating the SS. Ultimately the data has to be read from the production database, if no update has been done.

Thanks
Manoj

John
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search