共用方式為


SPDatabaseSnapshotCollection.SnapshotLimit property

取得或設定可以儲存的資料庫快照集的數目上限。

Namespace:  Microsoft.SharePoint.Administration.Backup
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Property SnapshotLimit As Short
    Get
    Set
'用途
Dim instance As SPDatabaseSnapshotCollection
Dim value As Short

value = instance.SnapshotLimit

instance.SnapshotLimit = value
public short SnapshotLimit { get; set; }

Property value

Type: System.Int16
資料庫快照在任何時候可以存在的資料庫數目上限。

Exceptions

Exception Condition
ArgumentOutOfRangeException

嘗試將屬性設定值大於 100 或負數。

備註

SnapshotLimit屬性無法設定為超過 100。

變更的清單項目上的欄位值,每次舊值必須寫入至每個現有的資料庫快照集。如果SnapshotLimit屬性大於 3,可大幅品質資料庫的效能。

如果EnabledManagementfalse,則會由內建資料庫快照集管理系統的SharePoint Foundation忽略SnapshotLimit屬性。

您必須先呼叫Update()變更儲存至這個屬性。

Examples

在下列範例中, db是SPDatabase物件。

db.Snapshots.SnapshotLimit = 4; db.Update();

請參閱

參照

SPDatabaseSnapshotCollection class

SPDatabaseSnapshotCollection members

Microsoft.SharePoint.Administration.Backup namespace