Setting up a SQL Server database and user for BMC Server Automation
This topic provides instructions for setting up a SQL Server database and user for a fresh installation of BMC Server Automation database.
This topic includes the following sections:
- Requirements and recommendations
- To set up a SQL Server database and user
- To configure BMC Server Automation databases for a non-English locale (optional)
- To install the SQL schema manually (not required when using unified product installer)
- SQL database maintenance: Recommendation for gathering statistics
- Where to go from here
Requirements and recommendations
- You do not need to create the database schema if you are installing or upgrading using the unified product installer. The unified installer performs this task automatically.
To set up a SQL Server database and user
.
Step | Example screen | |
---|---|---|
1 | Start the Microsoft SQL Server Management Studio application and connect to the Microsoft SQL database server.Note: You can connect a Windows default Application Server node only to a Microsoft SQL Server database. | ![]() |
2 | Expand the database server. Right-click the Databases folder and select New Database. | ![]() |
3 | Provide a name for the database you are setting up and click OK to exit the New Database wizard. | ![]() |
4 | Create the login credentials for the database.Right-click the Security folder and select New > Login. | ![]() |
5 | Create log in credentials for the database.
| ![]() |
6 | Assign roles to the login name.
| ![]() |
7 |
| ![]() |
8 | To reduce the likelihood of database deadlocks, execute the following steps:
| ![]() |
To configure BMC Server Automation databases for a non-English locale (optional)
This is an optional step. To use BMC Server Automation in a locale other than English, follow these guidelines:
- Configure your BMC Server Automation databases using the settings recommended by your database vendor for that language.
- If the database is configured for a multibyte locale or a non-LATIN-1 locale, when you set up the database schema, run the master script that corresponds to the nchar character set.
To install the SQL schema manually (not required when using unified product installer)
This section provides instructions for installing the SQL Server database schema manually.
- Copy install scripts from the db_scripts directory in the main product .zip to a location that you can access from the SQL Server console. For information on the db_scripts directory, see Downloading-the-installation-files.
The relevant scripts appear in the /files/configurations/dbscripts/sqlserver directory inside the BBSA<version>-<platform>64 installer zip package. - Open a command prompt window.
- Change (cd) to /db_scripts/sqlserver.
Run the master script that corresponds to the character sets for which your database is configured, using the following syntax:
<master_script.bat> <db_server> <db_name> <bl_user> <bl_pwd>
Replace the variables with the following values:Variable
Value
<master_script.bat>
sqlserver_master.bat if your database is configured for char/varchar character sets or sqlserver_nchar_master.bat if your database is configured for nchar/nvarchar character sets
<db_server>
Name of the database server.
If the server uses a nonstandard port, the server name and port number must be enclosed in quotation marks, as shown in the following example: "QLDS0002,1381"
To use a named server instance, append the named instance, including the complete path, as shown in this example:
sqlserver_master.bat <db_server>\<instance_name> <db_name> <db_user> <db_password><db_name>
Name of the BMC Server Automation database that you created while setting up the database
<bl_user>
Logon name for the BMC Server Automation database user
<bl_pwd>
BMC Server Automation database user password
SQL database maintenance: Recommendation for gathering statistics
As with other products which use Microsoft SQL database, some performance problems in a BMC Server Automation environment can be caused by stale SQL statistics on the BMC Server Automation schema, due to changing data volumes or changes in column values. BMC strongly recommends that you gather statistics for the core BMC Server Automation database one time per week.
Use the EXEC sp_updatestats command to run the SQL server built-in procedure against all tables in the schema, to gather statistics and optimize the database. For more information on gathering statistics, see Microsoft documentation.
You can also refer to the Health and Value Dashboard for additional statistics about the database server and information you can use for troubleshooting problems. To access the dashboard, see Using-the-Health-and-Value-Dashboards.
Where to go from here