Migrating an Oracle database
To migrate an Oracle database, use the BMC BladeLogic Data Migration Manager. This topic provides instructions for preparing the database upgrade and launching the BMC BladeLogic Data Migration Manager for the core BMC Server Automation database. It includes 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 Oracle 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 8.5 version of the external-files.zip file and extract its contents. For a description of this file, see Downloading the installation files.
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.Using the files extracted from external-files.zip, copy the /db_scripts/ <db_type>/upgradedirectory into a directory on your Application Server.
- The Oracle DBA must perform the following steps:
- Confirm that adequate TEMP and UNDO space is available. See Determining sizing requirements for Oracle databases.
- Copy /db_scripts/oracle/upgrade/migration_setup_OM.sql, which you extracted from external-files.zip, to a location where you have access to SQL*Plus.
Log on to SQL*Plus as sysdba.
You must log on as sysdba to run the migration_setup_OM.sql script in the next step.
For the core BMC Server Automation database, if the installation schema owner is different from the default schema owner (BLADELOGIC), for the next step, modify the migration_setup_OM.sql script to use the schema owner's user name for the installation.
After completing data migration, the schema owner's additional migration roles and permissions can be returned to their normal state.
Set the BMC Server Automation user's roles and permissions to allow the migration to be carried out by entering the following command:
- On the Application Server, use the cd command 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:
(Linux and UNIX)
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 externalfiles.zip for version 8.5 under the tmpdirectory, 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.
- If you choose to execute the validate step separately from the validation that is done as part of the next step, click Validate Environment. For more information, see To validate Oracle environments.
- 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.5.x service pack (later than 8.5.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 Performing post-migration updates to rules and policies.