SPDatabaseSnapshotCollection class
代表一群SPDatabaseSnapshot物件的Microsoft SQL Server資料庫快照集。此類別也提供的方法和屬性資料庫快照的管理。
Inheritance hierarchy
System.Object
Microsoft.SharePoint.Administration.SPAutoSerializingObject
Microsoft.SharePoint.Administration.Backup.SPDatabaseSnapshotCollection
Namespace: Microsoft.SharePoint.Administration.Backup
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPDatabaseSnapshotCollection _
Inherits SPAutoSerializingObject _
Implements IEnumerable(Of SPDatabaseSnapshot), IEnumerable
'用途
Dim instance As SPDatabaseSnapshotCollection
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPDatabaseSnapshotCollection : SPAutoSerializingObject,
IEnumerable<SPDatabaseSnapshot>, IEnumerable
備註
此類別的物件永遠是SPDatabase物件的Snapshots屬性的值。
注意
如果trueEnabledManagement ,然後資料庫快照集可以建立及刪除自動在背景中的計時器工作。若要確保SPDatabaseSnapshotCollection物件代表目前的資料庫快照集,一律呼叫RefreshSnapshots()方法之前存取或處理集合中的任何成員。當您透過索引器來存取資料庫快照集,將也套用為止。例如,如果spd是SPDatabase物件,線條spd.Snapshots[0]應該加上RefreshSnapshots()方法的呼叫。
資料庫快照集只可由特定版本的Microsoft SQL Server建立。使用IsSnapshotSupported屬性,判斷Microsoft SQL Server主控您的資料庫是否支援資料庫快照集。
您必須先呼叫Update()父SPDatabase物件,而無法保留此集合的任何屬性的變更。
Examples
在下列範例中, db是SPDatabase物件。
db.Snapshots.RefreshSnapshots();db.Snapshots.CreationInterval = 3; db.Update();
Thread safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
請參閱
參照
SPDatabaseSnapshotCollection members
Microsoft.SharePoint.Administration.Backup namespace