Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Database Snapshots Expand / Collapse
Author
Message
Posted Tuesday, December 23, 2008 11:02 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: 2 days ago @ 11:24 AM
Points: 32,781, Visits: 14,942
Comments posted to this topic are about the item Database Snapshots






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #625186
Posted Wednesday, December 24, 2008 6:06 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, April 11, 2014 1:51 PM
Points: 2,628, Visits: 760
Having no experience made this call a bit of a guess. The page in the BOL for Limitations on Snapshots states that http://msdn.microsoft.com/en-us/library/ms189940.aspx

If a source database becomes RECOVERY_PENDING, its database snapshots may become inaccessible.
After the issue on the source database is resolved, however, its snapshots should become available again. This question is about the database becoming suspect and not the snapshot. Is that correct?

Before answering, an analogy to an ADO disconnected recordset logic kicked in. My answer was wrong because the disconnected recordset still has access to the data.

How does the snapshot know that the database is offline - is the snapshot communicating with the database?

Is the... "may become inaccessible" in the documentation referring to the
The source database must be online, unless the database is a mirror database within a database mirroring session
?

Reading through the better analogy might be a system restore on XP.

May I ask for an analogy here that might put me in the right direction?


Jamie
Post #625318
Posted Wednesday, December 24, 2008 9:25 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, July 10, 2013 2:38 PM
Points: 14, Visits: 59
The way snapshots work is they use both a sparse file and the original data source. If you have a table t1, and an update occurs to one row on the original DB, then the data page in which that one row lives is copied to your sparse file. When you select * from t1, it reads both the copied page from the sparse file (snapshot) and original data set. Therefore any corruption on the original DB affects the sparse file
Post #625448
Posted Wednesday, December 24, 2008 10:03 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: 2 days ago @ 11:24 AM
Points: 32,781, Visits: 14,942
kenk has a good explanation. The snapshot cannot exist, and is tightly tied to the source database. Only pages changed since the snapshot was created are copied to the snapshot. Others are read from the source.

Snapshots are a shaky structure, IMHO. If anything happens to the source, the snapshot is likely shot. If you want to restore, you need to whack all snapshots.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #625473
Posted Wednesday, December 24, 2008 10:10 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, April 11, 2014 1:51 PM
Points: 2,628, Visits: 760
So
It continues to work as long as you access changed data only that exists in the snapshot
... there is no way to access only the changed data. A query to a snapshot will always attempt to connect to both the snapshot and the database simultaneously.

This is more clear now. There is no "changed records only" dataset available.

Thanks. Hope you all enjoy the holiday(s).


Jamie
Post #625479
Posted Thursday, December 25, 2008 4:18 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, March 20, 2014 7:32 AM
Points: 5,193, Visits: 1,368
Nice Explanation Kenk...


Post #625643
Posted Tuesday, December 07, 2010 9:56 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 12:16 AM
Points: 8,289, Visits: 8,742
Nice clear question and answer.

Tom
Post #1031352
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse