Represents a farm-wide service that stores settings for all instances of SQL Server.
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. 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 that identifies the database service.