SPDatabase class
封裝Microsoft SQL Server資料庫的存取權。
Inheritance hierarchy
System.Object
Microsoft.SharePoint.Administration.SPAutoSerializingObject
Microsoft.SharePoint.Administration.SPPersistedObject
Microsoft.SharePoint.Administration.SPPersistedUpgradableObject
Microsoft.SharePoint.Administration.SPDatabase
Microsoft.SharePoint.Administration.SPContentDatabase
Microsoft.SharePoint.Administration.SPUsageDatabase
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
<GuidAttribute("C1C16DA1-E487-439b-AE76-A38F61B66793")> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public Class SPDatabase _
Inherits SPPersistedUpgradableObject _
Implements IBackupRestore
'用途
Dim instance As SPDatabase
[GuidAttribute("C1C16DA1-E487-439b-AE76-A38F61B66793")]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class SPDatabase : SPPersistedUpgradableObject, IBackupRestore
備註
使用Databases屬性SPDatabaseServiceInstance類別或SPDatabaseCollection建構函式,來傳回支援的資料庫服務執行個體的資料庫集合。
若要從集合中傳回單一資料庫使用索引器。例如,如果集合都會被指派至變數 myDatabases,使用myDatabases[index]以 C# 或 Visual Basic 中的myDatabases(index)index所在的名稱或 GUID 的識別資料庫。
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.