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.
These tasks should be performed by a database administrator (DBA). Perform the steps in the exact order in which they are described.
This topic includes the following sections:
Requirements and recommendations
Click here for a list of supported SQL Server databases.
- 2008 (EE, SE)
- 2008 Cluster (EE, SE)
- 2008 R2 (EE, SE)
- 2008 R2 Cluster (EE, SE)
- 2012 (EE, SE)
- 2012 Cluster (EE,SE)
- 2012 R2 (EE, SE)
- 2014 (EE, SE)
- 2016 (EE, SE)
- 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
Start the Microsoft SQL Server Management Studio application and connect to the Microsoft SQL database server.
|2||Expand the database server.Right-click the Databases folder and select New Database.|
Provide a name for the database you are setting up and click OK to exit the New Database wizard.
Click here to see best practices for naming.
Create the login credentials for the database.
Right-click the Security folder and select New > Login.
|5||Create log in credentials for the database.
If you are setting up your database with a default language other than English, click here for collation information.
If you are setting up BMC Server Automation to support a language other than English, on the Database properties > Options page, select the Collation for your language that is case-insensitive, accent-sensitive, and (where appropriate) kana-sensitive. For example, if you are setting up BMC Server Automation for French, use French_Cl_AS. If you are setting up BMC Server Automation for Japanese, use Japanese_Cl_AS_KS. The new database appears under the Databases folder. You can set other options at this time too, but they are not required.
For a case-insensitive collation to be effective for your new user database, ensure that the master database is set to case-insensitive collation, as well.
Assign roles to the login name.
|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.
Do not perform this task if you installing or upgrading using the unified product installer. The unified installer performs this task automatically.
- 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>
sqlserver_master.bat QLDS0002 BLADELOGIC BLADELOBIC bmcAdm1n
Replace the variables with the following values:
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
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:
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>
Name of the BMC Server Automation database that you created while setting up the database
Logon name for the BMC Server Automation database user
BMC Server Automation database user password
When the master script runs, the following warnings might appear:
Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object 'rsave_cond_result_subtree'. The stored procedure will still be created. Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object 'rsave_cr_group_result_subtree'. The stored procedure will still be created.
These warnings are expected and can be ignored.
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.
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.
Gathering statistics is a resource-intensive task and you may experience a fall in database performance while executing this task.
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.