Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Migrating Oracle Express to the Oracle Enterprise database


By default, BMC Compact RDS is deployed on the Oracle Express database. Optionally, you can migrate the database contents to the Enterprise Oracle database. You must run the db_migrator.pl script to export the database schemas from the Oracle Express database and import them to the Oracle Enterprise database. 

This topic contains the following information:


BMC Compact Rapid Deployment Stack and Small Rapid Deployment Stack are no longer supported.

Migration process overview

The following diagram provides a high-level overview of the database migration process:

OracleExpressMigrationDiagram_revisedA.png 

The db_migrator.pl script can perform the following operations:

  1. Export the database schemas.
  2. Import the database schemas.
  3. Perform the post-database-import configuration.
  4. Exit the script.

Before you begin

You need the following prerequisites before you can migrate the data:

  • The remote Oracle database must be reachable from the BMC Compact RDS computer.
  • The scp port must be opened on the database, as well as on the BMC Compact RDS computer. You will copy the database dump files by using the scp command.
  • Passwords for the sys and system users for each database instance. The script asks for these passwords if you are planning to use different database instances.
  • Oracle database user's password, because the script copies the dump file using the oracle user
  • TNS entry in the tnsnames.ora file on the BMC Compact RDS computer. The tnsnames.ora file is located in the /u01/app/oracle/product/11.2.0/xe/network/admin directory.

    Depending upon the instance you are planning to use for the Oracle database, update all these entries in the tnsnames.ora file. In the following example of the TNS entry in the tnsnames.ora file for two instances, INSTANCE1 refers to the BMC Remedy AR System database and INSTANCE2 refers to the BMC Network Automation and BMC Server Automation database.
# tnsnames.ora Network Configuration File:
XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cloudexpress)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

ITSMARDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = <DB HOST>)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = <INSTANCE1>)
    )
  )

BCAN =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = <DB HOST>)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = < INSTANCE2>)
    )
  ) 

To run the db_migrator script

  1. Log on to the BMC Compact RDS with the following user credentials:

    User root
    Password x33+esaC

     

  2. Navigate to the /u01/DB_Migration/scripts directory.
  3. Run the db_migrator.pl script using following command:
[root@cloudexpress scripts]# perl db_migrator.pl
Please select operation you want to perform(1-4)
1 Export Database Schemas.
2 Import Database Schemas.
3 Perform post-database import configuration.
4 Exit.
Option:

The script displays the following options:

Option

Description

1. Export Database Schemas

After you confirm the database export for Oracle Express, the script first stops all CLM services. Then the script exports database dumps with the <DB_USER_NAME>_D-M-YY_H-M> format. You can run this script multiple time to export database dumps during  maintenance windows, by the default database dump exported at the /u01/app/oracle/admin/XE/dpdump location.

2. Import Database Schemas

Before importing the exported database dumps into the remote Enterprise Oracle server, you must update the Database_details.txt file and provide the DB_host, Instance_name, DB Port, DataFile_path, DUMPFileName and TEMDIR while importing database dumps. The command prompt will ask for the sys, system, and oracle users' passwords.

3. Perform post-database import configuration

Performs post-database changes on the BMC Compact RDS host so that the applications points to the remote Enterprise Oracle server. The script then starts all the CLM services automatically.

4. Exit

Quits the DB Migration Utility

 

To export database schemas

  1. Execute the db_migrator.pl script.
  2. To export the Enterprise BMC Remedy AR System, BMC Server Automation, and BMC Network Automation database schemas, select 1.
    The script prompts you for confirmation to proceed.  
  3. Select y to stop the all CLM application services.
    If you select n, the list of options appears again.
    migrationscript1.jpg
    After all the CLM application Services are successfully stopped, the script prompts you to start the export.  
  4. Press enter.
    The database schema export starts. The script exports the database schemas for all BMC Remedy AR System, BMC Server Automation, and BMC Network Automation in the default dump directory (/u01/app/oracle/admin/XE/dpdump).

migrationscript2.jpg

After the database dumps are exported successfully , the script redisplays the options panel.
Dump files are exported with the following format:

BMC Compact RDS application

Dump file format and description

Enterprise BMC Remedy AR System

ARADMIN_currentdate_Hours.Minutes.dmp

For example, ARADMIN_4-9-13_22.15.dmp, where 4-9-13 is 4th August 2013 and 22.15 is the 22nd Hour and the 15th Minute.

BMC Server Automation

BLADELOGIC_currentdate_Hours.Minutes.dmp

BMC Network Automation

BCAN_currentdate_Hours.Minutes.dmp

For example:

[root@cloudexpress ~]# locate dpdump
/u01/app/oracle/admin/XE/dpdump/ARADMIN_4-9-13_22.15.dmp
/u01/app/oracle/admin/XE/dpdump/ARADMIN_4-9-13_22.15.log
/u01/app/oracle/admin/XE/dpdump/BCAN_4-9-13_22.23.dmp
/u01/app/oracle/admin/XE/dpdump/BCAN_4-9-13_22.23.log
/u01/app/oracle/admin/XE/dpdump/BLADELOGIC_4-9-13_22.24.dmp
/u01/app/oracle/admin/XE/dpdump/BLADELOGIC_4-9-13_22.24.log

To import the database schemas

  1. Update the tnsnames.ora file.
  2. Edit the /u01/DB_Migration/scripts/Database_details.txt file, providing values for the following parameters:

    Application

    Parameters

    Enterprise BMC Remedy AR System

    EARDBHOST=<Database Server Name>
    EARDBINSTANCE=<Database Instance Name>
    EARDBPORT=<Database port>
    ORAUSER=sys<Keep this default>
    ORASYSTEMUSER=system<Keep this default>
    DUMPFILESDIR=/u01/app/oracle/admin/XE/dpdump <Keep this default; all dumps are already exported to this directory>
    DBSCRIPTSDIR=/u01/DB_Migration/db_scripts <Keep this default. New db scripts are created in this location>
    EARDATAFILEPATH=<Datafile path where all the database files are created>
    DUMPFILENAME=<Dump file name which you want to import. Enter file name without .dmp extension>
    TEMPDIR=/tmp <Temporary location on database server where dmp file, shell script, and import log are stored>

    BMC Network Automation

    BNADBHOST=<Database Server Name>
    BNADBINSTANCE=<Database Instance Name>
    BNADBPORT=<Database port>
    ORAUSER=sys<Keep this default>
    ORASYSTEMUSER=system<Keep this default>
    DUMPFILESDIR=/u01/app/oracle/admin/XE/dpdump <Keep this default; all dumps are already exported to this directory>
    DBSCRIPTSDIR=/u01/DB_Migration/db_scripts <Keep this default. New db scripts are created in this location>
    BNADATAFILEPATH=<Datafile path where all the database files are created>
    DUMPFILENAME=<Dump file name which you want to import. Enter file name without .dmp extension>
    TEMPDIR=/tmp <Temporary location on database server where dmp file, shell script, and import log are stored>

    BMC Server Automation

    BSADBHOST=<Database Server Name>
    BSADBINSTANCE=<Database Instance Name>
    BSADBPORT=<Database port>
    ORAUSER=sys<Keep this default>
    ORASYSTEMUSER=system<Keep this default>
    DUMPFILESDIR=/u01/app/oracle/admin/XE/dpdump <Keep this default; all dumps are already exported to this directory>
    DBSCRIPTSDIR=/u01/DB_Migration/db_scripts <Keep this default. New db scripts are created in this location>
    BSADATAFILEPATH=<Datafile path where all the database files are created>
    DUMPFILENAME=<Dump file name which you want to import. Enter file name without .dmp extension>
    TEMPDIR=/tmp <Temporary location on database server where dmp file, shell script, and import log are stored>

    For example:
    migrationscript3.jpg 

    Note

    If you used copy and paste from Notepad or PuTTY, after you make all the changes to the Database_details.txt file, run the following command to remove any control^M characters: 
    dos2unix Database_details.txt  

    The script reads the Database_details.txt file for every dump file and prompts you for the password of the database server so that the dump file can be copied into the TEMPDIR folder. Depending on which database host is the EARDBHOST, BNAHOST, or BSAHOST parameter where the user has provided values, the script continues with its operations. For example, if you provided values for EARDBHOST and BSAHOST but not BNAHOST, then the script performs the following operations for Enterprise BMC Remedy AR and BMC Server Automation only and skips these operations for BMC Network Automation:
    a. Creates database user

    b. Creates tablespace

    c. Copies dump file to DB server TEMPDIR

    d. Imports the dump

  3. Select option 2 from the option panel. 
    The script prompts you Before Starting Database Import make sure that you have provided correct TNS entry in tnsnames.ora file" Do you want to proceed? [y/n].  
  4. Enter y
  5. Enter the sys and system user at the prompt.
    migrationscript4.jpg 
  6. Enter the Oracle password for the Enterprise BMC Remedy AR System instance at the prompt.

The following table shows the users and tablespaces created for BMC Atrium Orchestrator dump files.

DB user name

Password

DB tablespace

User details

ARADMIN

clmAdm1n

ARSYSTEM, ARTMPSPC

Enterprise BMC Remedy AR System user account

BCAN

clmAdm1n

BCAN,BCANTMPSPC

BMC Network Automation account

BLADELOGIC

clmAdm1n

BLADELOGIC,BLADELOGIC_INDEX

BMC Server Automation

To change the database after importing database schemas

  1. Select option 3 from the option panel. 
    The script reads the input from the Database_Details.txt file and performs database-related changes in the application configuration files. The script makes database-related changes for those applications only for which the database host name is provided in the Database_Details.txt file. For example, if you entered values for EARDBHOST and BNAHOST but not for BSAHOST, then the script performs database-related changes for Enterprise BMC Remedy AR  System and BMC Network Automation only and skips changes for BMC Server Automation.
    migrationscript5.jpg 
  2. Ensure that your database servers can be reached from the BMC Compact RDS computer.
    The following table describes the database-related changes:

    Application

    Steps

    Enterprise BMC Remedy AR System

    Updates the /u01/app/oracle/product/11.2.0/xe/network/admin/tnsnames.ora file and change the database details with new details
    Example:

    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = <Oracle Server host>)(PORT = <DB Port>))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = <Inst1 Service name>)
    )
    )

    BMC Network Automation

    1. Updates the database details in the /u01/bmc/bca-networks-data/database.properties file
    2. Locates the javax.jdo.option.ConnectionURL property name
    3. Updates the database details in the /u01/bmc/bca-networks/tomcat/conf/server.xml file
    4. Locates the connectionURL property name
    5. Updates the database details in the /u01/bmc/bca-networks/BcanInstalledConfiguration.xml file
    6. Locates the DATABASE_PORT_NUMBER and DATABASE_URL property names

    BMC Server Automation

    Updates the database details with the new database settings in the asDataSourceService.xml and bldeployment.xml files for the following BMC Server Automation deployment server paths:
    /u01/bmc/bladelogic/NSH/br/deployments/config_deployment_cloudexpress/services
    /u01/bmc/bladelogic/NSH/br/deployments/job_deployment_1_cloudexpress/services
    /u01/bmc/bladelogic/NSH/br/deployments/job_deployment_2_cloudexpress/services
    /u01/bmc/bladelogic/NSH/br/deployments/_template/services
    /u01/bmc/bladelogic/NSH/br/deployments/_util/services (only bldeployment.xml)

  3. Update the database details with the new database settings in the files.
    After making changes in the application's configuration files, the script starts all the CLM application services in their proper sequence and then redisplays the options.

To exit the script

Select 4 to exit from the db_migrator.pl script.
migrationscript6.jpg

To clean up the installation and rerun the automation script after a failure

If the automation script fails or you must re-execute the automation script for some other reason, you must clean up the installation first, according to the following procedures:
db_migrator script

  1. In the /u01/DB_Migration/scripts directory, delete all the log files.
  2. In the /u01/DB_Migration /scripts directory, delete the <Product short name>_post_deploy_chg.sh script, which is created for postinstallation changes on all VMs.
    Do not delete the db_import.sh,db_export.sh, Database_details.txt, and db_migrator.pl scripts.
  3. In the /u01/DB_Migration/dbscripts directory, delete sql files created for bcan, blade, and ear.
  4. On the database computer, delete the files copied by the db_migrator.pl script in the /tmp (TempDir is provided in Database_details.txt) folder.
    The files include *.dmp and *.log. Delete only those files that are created by the script.

To verify access to all applications

After you exit the script, verify that you can log on on to all the applications. Use the following application details table to access the applications:

Product

Application information

  • BMC AR System Server
  • LM Core Extensions

Port: 46200
User: Demo
Password: clmAdm1n
CLM superuser password: clmAdm1n

BMC Remedy AR System Mid Tier

Port: 8080
http://cloudexpress:8080/arsys 
configuration password: clmAdm1n
http://cloudexpress:8080/uddi

BMC Atrium Web Services

Port:8080

Cloud Platform Manager (OSGi)

Port: 9090 (OSGi)
superuser password: clmAdm1n 

BMC Network Automation

Port 11443
User: sysadmin
Password: clmAdm1n
https://cloudexpress:11443

BMC Server Automation

User: BLAdmin 
Password: clmAdm1n
Webservice
 port: 10843

  • BMC Atrium Orchestrator Platform
  • BMC Atrium Orchestrator Content

baoam port: 9090
baocdp port: 28080
User: admin
Pwd: clmAdm1n
http://cloudexpress:9090/baoam 
http://cloudexpress:28080/baocdp

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*