Share via


DatabaseService Class

The DatabaseService class represents a Microsoft SQL Server instance in the topology of a server farm.

System.Object

    Microsoft.SharePoint.Portal.Topology.Service

       Microsoft.SharePoint.Portal.Topology.DatabaseService

Public Constructors

The following table shows the constructors of the DatabaseService class and a brief description of each.

Name Description
DatabaseService Initializes a new instance of the DatabaseService class based on the specified database server.
DatabaseService Initializes a new instance of the DatabaseService class based on the specified database server and SQL Server instance.

Public Properties

The following table shows the properties of the DatabaseService class, the data type of each property, and a brief description of each.

Name Data type Description
Databases Microsoft.SharePoint.Portal.Topology.DatabaseCollection Gets a list of databases associated with the DatabaseService object.

Thread Safety

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

Remarks

Use the DatabaseService class to manage SQL Server instances and their associated databases in the topology of the server farm.

Microsoft SQL Server 2000 and later supports multiple database server instances on a single server computer through the use of named instances called SQL Server instances.

The public constant ServiceClass defined in the DatabaseService class contains the GUID value that distinguishes a DatabaseService from other Microsoft Office SharePoint Portal Server 2003 services.

To use the properties and methods of the objects in the Topology namespace you must be a member of the local STS_WPG and SPS_WPG security groups, and a member of the db_owner database role for the configuration database.

In addition, for certain methods, such as those that create a portal site, you must be a member of the local Administrators group, and have membership in the Database Creators and Security Administrators server roles in the SQL Server instance that hosts the configuration database.

Requirements

Namespace: Microsoft.SharePoint.Portal.Topology

Platforms: Microsoft Windows Server 2003

Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Security: Code Access Security