SPContentDatabase.Repair method
修復的內容資料庫。
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Function Repair ( _
DeleteCorruption As Boolean _
) As String
'用途
Dim instance As SPContentDatabase
Dim DeleteCorruption As Boolean
Dim returnValue As String
returnValue = instance.Repair(DeleteCorruption)
public string Repair(
bool DeleteCorruption
)
參數
DeleteCorruption
Type: System.Boolean若要刪除損毀的網站集合、 網站、 清單及文件 ; true否則,請false。
傳回值
Type: System.String
XML 字串,指定類型、 名稱和識別碼的網站集合的網站,並列出所遺棄或遺漏必要的子物件。下列範例說明字串中的元素:
<OrphanedObjects Count="4" >
<Orphan Type="SPSite"
Id="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
Deleted="No" />
<Orphan Type="SPWeb"
Name="name"
Id="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
Deleted="No" />
<Orphan Type="SPWeb"
Name="name"
Id="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
SiteId="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
Deleted="No" />
<Orphan Type="SPList"
Name="name"
Id="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
SiteId="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
WebId="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
Deleted="No" />
</OrphanedObjects>
備註
一段時間的內容資料庫可以累計已損毀的物件。可能遺棄應有的父物件的物件 ;應有的子物件的物件可能沒有一個。下列情形可以因為 misfortunes 各種: 電力中斷、 遺失的連線、 應用程式逾時、 軟體的錯誤或只是純文字背。
若要找出資料庫是否含有這類損毀,呼叫Repair方法,然後檢查此方法會傳回的字串。若要從資料庫刪除損毀的物件,呼叫Repair方法與true當做引數。