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:

    MultiExcerpt named 'MigrationPrereqs' was not found
The multiexcerpt named 'MigrationPrereqs' was not found. Please check the page name and MultiExcerpt name used in the MultiExcerpt Include macro.

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.

To migrate a SQL Server database

  1. Copy all installation files to the SQL Server database server and extract the files.

  2. Determine whether the existing SQL Server database schema uses the nchar data type.
    For example, you can log onto the database and run the following SQL statement:

    select data_type from INFORMATION_SCHEMA.COLUMNS where table_name = 'DCAPORTALPROVIDERPROPERTIES' and column_name = 'DESCRIPTION';

    Note whether the results return a data type of varchar or nvarchar.

  3. 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.

  4. Using the login credentials for the schema owner, execute the following command:

    sqlserver_migration_master.bat [/host <hostname>] [/db <db>] [/user <name>] [/passwd <pwd>] [/nchar <true|false>]

    <hostname> - 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 of the database containing the portal schema.
    <name> - Name of the SQL Server user that has the db_owner role.
    <pwd> - SQL Server user password
    <true|false> - Set the value of the /nchar parameter to true if the schema uses a nvarchar data type. Set the value to false if the schema uses a varchar data type.

    Example:

    sqlserver_migration_master.bat /host localhost /db portal_db /user portaldb_owner /passwd portal4All /nchar false

 

Note

You are prompted for any values that are 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 neededVariable used
    Oracle database server host nameDB_HOST
    Oracle HOMEORACLE_HOME
    Oracle SIDORACLE_SID
    Oracle sysdba password 
    Oracle schemaPORTAL_SCHEMA
    Password for PORTAL_SCHEMAPORTAL_SCHEMA_PWD
    Oracle listener portDB_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, log in 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

  6. Using SQL*Plus, execute one of the following migration scripts:

    Script namePurpose
    oracle_migration.sqlUse for typical migrations.
    oracle_nchar_migration.sqlUse 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>

    Example:

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

    Note

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

Was this page helpful? Yes No Submitting... Thank you

Comments