Share via


SPGlobalAdmin.CreateConfigDatabase method (String, String, String, String)

NOTE: This API is now obsolete.

Use the Create() method of the SPFarm class to create a configuration database instead. (In Windows SharePoint Services 2.0, the CreateConfigDatabase method was used to create a configuration database based on the specified database server, database name, account name, and password, and is maintained for backward compatibility.)

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<ObsoleteAttribute("Use SPFarm.Create instead.")> _
Public Function CreateConfigDatabase ( _
    strDatabaseServer As String, _
    strDatabaseName As String, _
    strUserName As String, _
    strPassword As String _
) As SPConfigDatabase
'Usage
Dim instance As SPGlobalAdmin
Dim strDatabaseServer As String
Dim strDatabaseName As String
Dim strUserName As String
Dim strPassword As String
Dim returnValue As SPConfigDatabase

returnValue = instance.CreateConfigDatabase(strDatabaseServer, _
    strDatabaseName, strUserName, strPassword)
[ObsoleteAttribute("Use SPFarm.Create instead.")]
public SPConfigDatabase CreateConfigDatabase(
    string strDatabaseServer,
    string strDatabaseName,
    string strUserName,
    string strPassword
)

Parameters

  • strDatabaseServer
    Type: System.String

    A string that specifies the database server.

  • strDatabaseName
    Type: System.String

    A string that contains the name of the new database.

  • strUserName
    Type: System.String

    A string that contains the user name for the administrator account. This parameter is required only if SQL authentication is used.

  • strPassword
    Type: System.String

    A string that contains the password for the administrator account. This parameter is required only if SQL authentication is used.

Return value

Type: Microsoft.SharePoint.Administration.SPConfigDatabase
An SPGlobalConfig object.

See also

Reference

SPGlobalAdmin class

SPGlobalAdmin members

CreateConfigDatabase overload

Microsoft.SharePoint.Administration namespace