SPDatabaseServiceCollection class

Represents a collection of SPDatabaseService objects.

Inheritance hierarchy


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


<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPDatabaseServiceCollection _
    Inherits SPPersistedChildCollection(Of SPDatabaseService)
Dim instance As SPDatabaseServiceCollection
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPDatabaseServiceCollection : SPPersistedChildCollection<SPDatabaseService>


Use the SPDatabaseServiceCollection constructor to return the collection of database services that are running in a server farm. To add a database service to the collection, use the Add method.

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

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.

See also


SPDatabaseServiceCollection members

Microsoft.SharePoint.Administration namespace