This documentation is archived and is not being maintained.

SPDatabaseServiceCollection Class

Windows SharePoint Services 3

Represents a collection of SPDatabaseService objects.

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

[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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.