Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SPDatabase class

Encapsulates access to Microsoft SQL Server databases.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
[GuidAttribute("C1C16DA1-E487-439b-AE76-A38F61B66793")]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class SPDatabase : SPPersistedUpgradableObject, IBackupRestore

Use the Databases property of the SPDatabaseServiceInstance class, or the SPDatabaseCollection constructor, to return the collection of databases that support a database service instance.

Use an indexer to return a single database from the collection. For example, if the collection is assigned to a variable named myDatabases, use myDatabases[index] in C#, or myDatabases(index) in Visual Basic, where index is either the name or the GUID that identifies the database.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.