Gets the snapshots of the database.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Property ValueType: Microsoft.SharePoint.Administration.Backup.SPDatabaseSnapshotCollection
All of the currently existing snapshots of the database.
Typically, administrators set snapshots to be taken on a regularly scheduled basis. In addition, snapshots have a fixed lifespan, usually measured in hours, after which they go out of existence. Hence, the membership of this property is highly dynamic.
The collection may be empty, but the property never returns a a null reference (Nothing in Visual Basic) reference.
Only the Enterprise and Developer editions of Microsoft SQL Server support database snapshots.
Snapshots are typically created and deleted automatically by timer jobs in the background. To help ensure that the SPDatabaseSnapshotCollection object represents the current set of snapshots, always call the RefreshSnapshots() method before you access or process any members of the collection. This point applies also when you access a snapshot through an indexer. For example, if spd is an SPDatabase object, the line spd.Snapshots should be preceded by a call of the RefreshSnapshots() method.