The Database class represents a database in the topology of the server farm.
The following table shows the constructors of the Database class and a brief description of each.
|Database||Initializes a new instance of the Database class based on the specified name, virtual server, and database server.|
|Database||Initializes a new instance of the Database class based on the specified name, number of sites, site quota, virtual server, and database server.|
The following table shows the public methods of the Database class and a brief description of each.
|Commit(Boolean)||Persists changes made to properties of a Database object.|
The following table shows the properties of the Database class, the data type of each property, and a brief description of each.
|DatabaseService||Microsoft.SharePoint.Portal.Topology.DatabaseService||Gets or sets the DatabaseService object that hosts the content database.|
|Name||String||Gets or sets the name of the Database object.|
|SchemaVersion||System.Version||Gets the portal version of the schema of the Database object. Reserved for internal use only.|
|SiteCount||Int32||Gets the current number of SharePoint sites in the Database object.|
|SiteCountLimit||Int32||Gets or sets the maximum number of SharePoint sites in the Database object.|
|SiteCountWarning||Int32||Gets or sets the number of SharePoint sites to which to send a notification that the maximum limit has been reached.|
|SqlConnectionString||Microsoft.SharePoint.Portal.Data.SqlConnectionString||Gets the connection string for the Database object.|
|VirtualServer||Microsoft.SharePoint.Portal.Topology.VirtualServer||Gets or sets the virtual server with which the Database object is associated.|
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.
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.
Platforms: Microsoft Windows Server 2003
Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)
Security: Code Access Security