Run the sqlcmd SQL command line program and connect to the relevant database as database administrator (sa):
sqlcmd -d <database name> -U sa
After you entered the password, the connection to the database is established.
CREATE LOGIN <PPM login name> WITH PASSWORD = '<PPM password>',
DEFAULT_DATABASE = <database name>;
CREATE USER <PPM user name> WITH DEFAULT_SCHEMA = <PPM user name>;
GRANT CREATE SCHEMA, CREATE TABLE TO <PPM user name>;
GO
CREATE SCHEMA <PPM user name> AUTHORIZATION <PPM user name>;
GO
If the user account already exists, you can delete it using the following sequence of commands:
DROP SCHEMA <schema name>
DROP USER <PPM user name>
DROP LOGIN <PPM login name>
Example
You want to create a login and user called ppmuser in the existing MS SQL Server database ppmdb. Start the command line program:
sqlcmd -d ppmdb -U sa
Enter the following command sequence:
DROP SCHEMA <ppmschema>;
DROP USER ppmuser;
DROP LOGIN ppmuser;
GO
CREATE LOGIN PPMUSER WITH PASSWORD = 'ppmuser', DEFAULT_DATABASE = ppmdb;
CREATE USER PPMUSER WITH DEFAULT_SCHEMA = PPMUSER;
GRANT CREATE SCHEMA, CREATE TABLE TO PPMUSER;
GO
CREATE SCHEMA PPMUSER AUTHORIZATION PPMUSER;
GO
The chapter Create database describes how to use Microsoft SQL Server Management Studio to create a database and database user for PPM.