Unsupported content This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

Manually migrating the portal database


Typically, when you upgrade BladeLogic Portal to the current release, the installation program automatically migrates the existing database to the current release. However, you have the option of manually upgrading a database.

When migrating data, take all necessary precautionary steps, as described below.  

See the following sections for detailed instructions:

Ensuring a clean portal server

To ensure the portal server is a clean environment with no operations currently running, shut down the portal server and then reboot it.

  1. Shut down the portal server using the following actions:
    • Linux: /etc/init.d/BladeLogic_Portal stop
    • Windows: From the Windows Control Panel, select  Administrative Tools > Services . Then stop the  BladeLogic Portal  service.
  2. Restart the portal server using the following actions:
    • Linux: /etc/init.d/BladeLogic_Portal start
    • Windows: From the Windows Control Panel, select  Administrative Tools > Services . Then start the  BladeLogic Portal  service.

Backing up portal information

The following sections describe backup tasks that BMC recommends you perform before installing or upgrading.

Backing up portal installation information

A good precaution is to back up information describing the location of the current BladeLogic Portal installation.

Backing up portal installation information in Linux

  1. Open the /opt/bmc/ProductRegistry.xml configuration file.
  2. Within that file, search for:
    <productHomeVariableName>BMC_AUTOMATION_PORTAL_HOME</productHomeVariableName> 
  3. In the line above, find <productHome><PORTAL_HOME></productHome>.
    In that row, <PORTAL_HOME> identifies the path to the portal installation. 
  4. Cd to <PORTAL_HOME> .
  5. Determine a location with sufficient disk space to which you can copy portal information. This procedure calls that location <BMCPortalV2.2_FULLBACKUP>.
  6. Copy the contents of the portal installation by entering the following command:
    find . --depth --print | cpio --dump  /<BMCPortalV2.2_FULLBACKUP> 
  7. Copy /opt/bmc/ProductRegistry.xml to <BMCPortalV2.2_FULLBACKUP>.

Backing up portal installation information in Windows

  1. Open the \Windows\ProductRegistry.xml configuration file.
  2. Within that file, search for:
    <productHomeVariableName>BMC_AUTOMATION_PORTAL_HOME</productHomeVariableName> 
  3. In the line above, find <productHome><PORTAL_HOME></productHome>.
    In that row, <PORTAL_HOME> identifies the path to the portal installation. 
  4. Cd to <PORTAL_HOME>.
  5. Use any backup tool to make a copy of the <PORTAL_HOME> directory to <BMCPortalV2.2_FULLBACKUP>.
  6. Copy \Windows\ ProductRegistry.xml to <BMCPortalV2.2_FULLBACKUP>.

Backing up the portal database

A database administrator must perform a full backup of the portal database. The administrator should create a backup dataset in case a backout or restore procedure is needed.

Use this procedure to obtain the information needed to access the existing portal database.

  1. Open <PORTAL_HOME>/portal/configuration/bmc-config.json.
    See Backing up portal installation information to determine the location of <PORTAL_HOME>. 
  2. Within the bmc-config.json file, find the section called foundation_db_service.
    It provides the host name, port, user, database name, and database type for the portal database. 

Backing up configuration information

BMC recommends you back up the following important configuration file:

<PORTAL_HOME>/portal/configuration/bmc-config.json

Migrating a SQL Server database

Use this procedure to migrate an existing SQL Server database to a version consistent with this release of BladeLogic Portal. 

Before you begin

  • Download the installation files needed to install and upgrade BladeLogic Portal.
  • Ensure that a Microsoft SQL Server client is installed locally.
  • Ensure that the system path includes sqlcmd.exe.
  • If you want to upgrade a nchar database, run the installer_nchar_migration.bat script.

To migrate a SQL Server database

  1. Copy all installation files to the SQL Server database server and extract the files.
  2. From a command line, cd to \migration\sqlserver.
    If the migration folder is included with all the other installation files for BladeLogic Portal, the full path is <installation_files>\BladeLogicPortal\windows\Disk1\utility\migration\sqlserver.
  3. Using the login credentials for the schema owner, execute the following command:

    installer_migration.bat  <DB_Server>  <DB_Name>  <DB_User>   <DB_User_Password>

    where:<DB_Server> - SQL Server database instance. Provide this information using the following format:[protocol:]server[\instance_name][,port]
                          Examples:
    dbserver1.dev.mycompany.com
    tcp:dbserver1.dev.mycompany.com\MSSQLSERVER,1433
    <DB_Name> - Name of the database containing the portal schema.
    <DB_User> - Name of the SQL Server user that has the db_owner role.
    <DB_User_Password> - SQL Server user password

    Example:
     

    installer_migration.bat      SQLServer001   dcaportalddb01   dcaportaluser01   mypassword

    or

    installer_migration.bat      SQLServer001\SQL14   dcaportalddb01   dcaportaluser01   mypassword

Note

You are prompted for any values not provided as command line arguments.

Migrating an Oracle database

Use this procedure to migrate an existing Oracle database to a version consistent with this release of BladeLogic Portal.

Before you begin

  • Verify umask=0027  for root.
  • Confirm that there is an existing Oracle database for BladeLogic Portal.
  • Obtain the following details about the Oracle instance:

    Information needed

    Variable used

    Oracle database server host name

    DB_HOST

    Oracle HOME

    ORACLE_HOME

    Oracle SID

    ORACLE_SID

    Oracle sysdba password

     

    Oracle schema

    PORTAL_SCHEMA

    Password for PORTAL_SCHEMA

    PORTAL_SCHEMA_PWD

    Oracle listener port

    DB_PORT

    Portal tablespace name

     

    Portal tablespace index name

     

To migrate the Oracle database

  1. Copy all installation files to the Oracle database server and extract those files.
  2. Grant the Oracle user permissions for those files (recursively).
  3. Using SQL*Plus, login with sysdba privilege.
    For example: sqlplus / as sysdba
  4. Determine whether the existing database uses the NCHAR datatype.
    For example, you can run the following SQL statement:

    select data_type from all_tab_columns where owner = 'TESTER' and table_name = 'DCAPORTALPROVIDERPROPERTIES' and column_name = 'DESCRIPTION';

    If the results return a datatype of VARCHAR2, use the oracle_migration.sql script in step 6.
    If the results return a datatype of NVARCHAR2, use the oracle_nchar_migration.sql script in step 6 .

  5. From a command line, cd to /migration/oracle.
    If the migration folder is included with all the other installation files for BladeLogic Portal, the full path is <installation_files>/BladeLogicPortal/linux/Disk1/utility/migration/oracle
  • Using SQL*Plus, execute one of the following migration scripts: 

    Script name

    Purpose

    oracle_migration.sql

    Use for typical migrations.

    oracle_nchar_migration.sql

    Use when the NCHAR datatype has been enabled on the database.

    The command format is shown below:

    sqlplus <user_name>/<user_password>@<SID> @oracle_migration.sql <data_tablespace_name> <index_tablespace_name> <current_version>

    To obtain a value for <current_version>, click About at top right.

    Example command:

    sqlplus portaluser/sa@orcl @oracle_migration.sql portal_ts portal_ts_idx 1.1.00

    Note

    You are prompted for any values not provided as command line arguments.

 

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