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.
- Shut down the portal server:
- Restart the portal server.
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
- Open the /opt/bmc/ProductRegistry.xml configuration file.
- Within that file, search for:
<productHomeVariableName>BMC_AUTOMATION_PORTAL_HOME</productHomeVariableName> - In the line above, find
<productHome><PORTAL_HOME></productHome>
.
In that row,<PORTAL_HOME>
identifies the path to the portal installation. - Cd to
<PORTAL_HOME>
. - Determine a location with sufficient disk space to which you can copy portal information. This procedure calls that location <BMCPortalV1.2_FULLBACKUP>.
- Copy the contents of the portal installation by entering the following command:
find . --depth --print | cpio --dump /<BMCPortalV1.2_FULLBACKUP>
- Copy /opt/bmc/ProductRegistry.xml to <BMCPortalV1.2_FULLBACKUP>.
Backing up portal installation information in Windows
Open the \Windows\ProductRegistry.xml configuration file.
Within that file, search for:
<productHomeVariableName>BMC_AUTOMATION_PORTAL_HOME</productHomeVariableName>In the line above, find
<productHome><PORTAL_HOME></productHome>.
In that row,
identifies the path to the portal installation.<PORTAL_HOME>
Cd to
<PORTAL_HOME>
.Use any backup tool to make a copy of the
<PORTAL_HOME>
directory to <BMCPortalV1.2_FULLBACKUP>.Copy \Windows\ProductRegistry.xml to <BMCPortalV1.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.
- Open <PORTAL_HOME>/foundation/configuration/bmc-config.json.
See Backing up portal installation information to determine the location of <PORTAL_HOME>. - 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.
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
Copy all installation files to the SQL Server database server and extract the files.
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.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.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 totrue
if the schema uses a nvarchar data type. Set the value tofalse
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 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
Copy all installation files to the Oracle database server and extract those files.
- Grant the Oracle user permissions for those files (recursively).
- Using SQL*Plus, log in with sysdba privilege.
For example:sqlplus / as sysdba
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 .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>
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.
Comments
Log in or register to comment.