Setting up a SQL Server database
This topic provides instructions for setting up a fresh installation of the BladeLogic Portal database using a Microsoft SQL Server database.
The procedure describes how to create two users (also known as logins). One user creates the portal database while the other user functions as an operational user. For security reasons, the operational user is granted only limited access to data.
This procedure uses SQL scripts that are provided in installation files.
Before you begin
- Use SQL Server 2008 R2 or later.
- Obtain the installation file called windows.zip and extract its contents. The windows.zip file is included in the installation file used to install BladeLogic Portal on Windows. See Downloading-the-installation-files.
To set up a SQL Server database
- Log into the SQL Server database using administrator credentials.
- Create a new login.
- Assign any name consistent with your naming standards. For example, create a login named blportal_owner.
- If you select SQL Server authentication, provide a password.
- When defining the login, on the Server Roles page, select Public.
- On the Status page, ensure that Permission to connect to database engine is set to Grant and Login is set to Enabled.
- Create a new database object.
- Assign any name consistent with your naming standards. For example, assign a name called blportal.
- Set Owner to the login name you created in step 1, such as blportal_owner.
- Open the Properties page for the login created in step 2 and change Default database to the database created in step 3.
This step limits user access to only the portal database for security reasons. - Create another login that functions as the operational user.
- Assign any name consistent with your naming standards. For example create a login named blportal_oper.
- If you select SQL Server authentication, provide a password.
- Set Default database to the database created in step 3.
- On the User Mapping page, select the database created in step 3, and on the same page select the db_datawriter role membership.
The public role is automatically selected on the User Mapping page. Leave it as is. - On the Status page, ensure that Permission to connect to database engine is set to Grant and Login is set to Enabled
Create the database tables by executing the sqlserver_master.bat script.
- In the installation files, cd to this directory: installation_file_location\windows\BMCAutomationPortal\Disk1\utility\sqlserver.
Run the following command:
sqlserver_master.bat sqlserv db user pwd
sqlserv is the name of the host where SQL Server is running, such as localhost.
db is the name of the database created in step 2, such as blportal.
user is the name of the SQL Server user that has the db_owner role. This is the login created in step 1. For example, blportal_owner.
pwd is the password of the SQL Server user.
SQL Server creates the schema, core data, indexes, and constraints.