CreateSQLDB Method

This method populates a database in a Microsoft SQL Server with the necessary tables to host an LDAP database.  Once created, the database can be assigned as the store for an LDAP server instance.

IDL Definition

HRESULT CreateSQLDB(
[in] BSTR bstrServerName, 
[in] BSTR bstrDatabaseName, 
[in] BSTR bstrDirectoryName, 
[in] BSTR bstrDBUserName, 
[in] BSTR bstrDBPassword, 
[in] BSTR bstrSuperDSPassword, 
[in] BOOLEAN fUseMemSecurity
);

Parameters

bstrServerName

the name of the computer hosting the Microsoft SQL server.

bstrDatabaseName

the name of the database to house the LDAP tables, stored procedures,etc.

bstrDirectoryName

the top level name of the directory.

bstrDBUserName

the name to use to authenticate to the SQL server when logging on.  This user usually is has administrative privilege in SQL server.

bstrDBPassword

the password to use to authenticate to the SQL server when logging on.

bstrSuperDSPassword

the password to set for the Directory administrator.  This password must be set up in a special manner.  The username in the directory service is always "administrator".

fUseMemSecurity

a flag specifying whether the LDAP directory service using the database will provide user authentication services to the Membership virtual server.  0=False, 1=True

Return Value

a standard HRESULT value

Example

Set ObjCreator = CreateObject("ObjCreator.ObjCreator.1")
Set DSConfig = ObjCreator.CreateObjAuth("MemAdmin.DSConfig.1")
Server="dbsvr1"
Database="some-name"
DName="some-name"
DBUser="sa"
DBPass="password-here"
DSSuperPass="other-password"
fUseMemSec=TRUE
call DSConfig.CreateSQLDB(Server,DName,DBUSer,DBPass,DSSuperPass,fMemSec)
If Err.Number <> 0 Then
  WScript.Echo "Error creating database backend"
End If

© 1997-1998 Microsoft Corporation. All rights reserved.