SPDatabaseServiceCollection Class
Represents a collection of SPDatabaseService objects.
System.Object
Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPDatabaseService>
Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPDatabaseService>
Microsoft.SharePoint.Administration.SPDatabaseServiceCollection
Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPDatabaseService>
Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPDatabaseService>
Microsoft.SharePoint.Administration.SPDatabaseServiceCollection
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
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.