Share via


SPContentDatabase Class

The SPContentDatabase class represents a content database in the Microsoft Windows SharePoint Services deployment.

System.Object

   Microsoft.SharePoint.Administration.SPContentDatabase

Public Methods

The following table shows the public methods of the SPContentDatabase class and a brief description of each.

Name Description
Update Updates the content database with settings changes.

Public Properties

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

Name Data Type Description
CurrentSiteCount Int32 Gets the current number of top-level sites represented in the content database.
ID System.Guid Gets the GUID for the content database.
MaximumSiteCount Int32 Gets or sets the maximum number of sites that can be represented in the content database.
Name String Gets the name of the content database in Microsoft SQL Server.
Password String Gets or sets the password for accessing the content database.
Server String Gets the name of the server that contains the content database.
Status Int32 Gets or sets the status of the content database.
Username String Gets or sets the account name for the content database owner.
WarningSiteCount Int32 Gets or sets the number of SharePoint sites that can be created before a warning event is generated and the owner of the site collection is notified.

Thread Safety

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

Remarks

Use the ContentDatabases property of the SPVirtualServer class to return the collection of content databases for the virtual server, and use an indexer to return a single content database from the collection. For example, if the collection is assigned to a variable named myContentDatabases, use myContentDatabases[index] in C#, or myContentDatabases(index) in Visual Basic .NET, where index is either the index number of the field in the collection or the GUID for the content database.

Requirements

Namespace: Microsoft.SharePoint.Administration

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security