VMware – SQL script to create the SRM 4.1 database

use [master]
 go
 CREATE DATABASE [SRMDB] ON PRIMARY
 (NAME = N'srmdb',
  FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.VIMSQL\MSSQ\DATA\SRMDB.mdf')
 LOG ON
 (NAME = N'srmdb_log',
  FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.VIMSQL\MSSQ\DATA\SRMDB.ldf')
 COLLATE SQL_Latin1_General_CP1_CI_AS
 go
 use SRMDB
 go
 sp_addlogin @loginame=[srm],
             @[email protected]',
             @defdb='SRMDB',
             @deflanguage='us_english'
 go
 ALTER LOGIN [srm] WITH CHECK_POLICY = OFF
 go
 CREATE USER [srm] for LOGIN [srm]
 go
 CREATE SCHEMA [SRM]
 go
 ALTER USER [srm] WITH DEFAULT_SCHEMA =[SRM]
 go
 sp_addrolemember @rolename = 'db_owner',
                  @membername = [srm]
 go