Migrating an SQL database
This topic provides instructions for migrating an SQL Server database by using the Data Migration Manager. This topic contains the following sections:
Before you begin
Back up the BMC Server Automation database.
Perform a backup before you begin the data upgrade process. The data upgrade occurs in place. If you cannot complete the upgrade, the only way to restore the database to its pre-upgrade state is from the backups.
- The migration process uses the database system ID information in the _template deployment to identify the database to migrate. In addition, the configurations from each existing deployment are processed, so each deployment present in the Deployments directory should have the correct configuration. Certain deployments are transitory and can be removed before an upgrade as they are not needed for normal operation.
- _install, _postmig, _util can be removed from the deployments directory if present, and provided that an installation, postmigration process, or blcontent process is not being run.
- _launcher is for the Application Server Launcher. This does not include database configuration information. _spawner and _pxe both include database configuration information. The _template deployment is used to create new deployments, including those used during migration.
- Before migrating the database, ensure that the database configuration information in the present deployments of the Application Server is current and correct. To check the values, use the
blasadminutility and specify each deployment (except _launcher) name and validate that the 'Database' section information is correct and the 'FileServer' section is also correct. If the database section is incorrect, then one or both of the following commands will produce an error.
blasadmin -s <deloyment name> show database all (for the _pxe deployment use blasadmin -s _pxe show pxe all)
blasadmin -s <deployment name> show file all
- To run the data migration manager in an interactive mode (recommended) on Linux and UNIX platforms, install the X Windows system (X11) and the xorg-x11-libs library on the computer on which you plan to run the BMC BladeLogic Data Migration Manager. You must also have the DISPLAY variable set appropriately.
- To run the data migration manager in a non-interactive mode on Linux and UNIX platforms, run the migration manager with the following options '-DmigRunCLI=true -DmigRunNonDefaultUIorCLI=true'. For example:
./blmigration_mgr -DmigRunCLI=true -DmigRunNonDefaultUIorCLI=true /path/to/external/files
To speed up the migration process, archive logging should not be used while BMC BladeLogic Data Migration Manager is executing.
To migrate your SQL database by using BMC BladeLogic Data Migration Manager
Back up the BMC Server Automation file server storage location. For example, copy the entire contents of the storage location to a directory other than the current storage location.
BMC recommends using a backup directory that is at or close to the root of a disk drive. This practice avoids excessively long paths. Microsoft Windows paths are limited to 255 characters.
- Obtain the most recent version of external-files.zip and extract its contents. For a description of this file, see Downloading the installation files.
Using the files extracted from external-files.zip, copy the /db_scripts/ <db_type>/upgrade directory into a directory on your Application Server.
BMC recommends using a directory that is at or close to the root of a disk drive. This practice avoids excessively long paths. Windows paths are limited to 255 characters.
- On the Application Server, use the
cdcommand to navigate to the <installDirectory>/NSH/bin directory for BMC Server Automation.
Launch BMC BladeLogic Data Migration Manager by entering one of the following commands:
Where <path_to_migration_directory> is the path to the migration directory that you copied to the Application Server in step 3. For example, if you extracted the version 8.2 SP1 externalfiles.zip under the tmp directory, then the path to the migration directory would be :
(Linux and UNIX)
Before executing blmigration_mgr, ensure that all connections to the BMC Server Automation database are closed. Connections that are open can cause certain database commands to fail, which causes the upgrade to stop.
BMC BladeLogic Data Migration Manager creates the stored tasks needed for the data migration and then launches the BMC BladeLogic Data Migration Manager console.
- Click Run Migration.
- When migration completes, check the blmigration.log.
Where to go from here
You might need to perform the following tasks (in the specified order):
- If you are upgrading to an 8.3.x service pack (later than 8.3.00), run a set of SQL Update scripts to upgrade the BMC Server Automation database to the service pack level compatible with the Application Server, as described in Running the SQL update scripts.
- If you are migrating from a pre-8.0 version of BMC Server Automation, migrate the compliance rules and discovery signatures stored in the core BMC Server Automation database as described in Migrating compliance rules, discovery signatures, and smart group conditions.