This appendix describes how to migrate version-enabled tables from one release of Workspace Manager to another release. You can either upgrade to the current release or downgrade to a previous release (no earlier than release 9.0.1). For example:

If you have been working with version-enabled tables with a previous Oracle Workspace Manager release (9.0.1.0.0 or higher), you can upgrade to release 9.2 to preserve your existing work and then continue working with release 9.2. (Note that Oracle Workspace Manager release 9.0.1.0.0 could have been installed on Oracle database server release 8.1.6.0.0 or higher.)

If you are using Workspace Manager with Oracle9i release 9.2 but need to go back to release 9.0.1, you can downgrade to release 9.0.1 to preserve your existing work and then continue working with release 9.0.1.

For an upgrade or downgrade operation, the tables can remain version-enabled. You do not need to disable versioning before performing an upgrade or downgrade.

B.1 Upgrading to the Current Release

To upgrade to the current Workspace Manager release from a previous release, perform the following steps.

At a system prompt, change to the installation directory of the release to which you are upgrading. If you are upgrading to the Workspace Manager release that is included in the current Oracle9i installation, change to $ORACLE_HOME/rdbms/admin.

Start SQL*Plus.

Connect to the database instance as a user with SYSDBA privileges.

Shut down the instance:

SQL> SHUTDOWN IMMEDIATE

Start the instance in RESTRICT mode:

SQL> STARTUP RESTRICT

Determine the current release of the Workspace Manager software by finding the value of OWM_VERSION in the WM_INSTALLATION view:

SQL> SELECT * FROM wm_installation;

If the OWM_VERSION value is NOT_INSTALLED, Workspace Manager is not currently installed.

If the OWM_VERSION value is BETA_RELEASE, the upgrade is not supported. Use DisableVersioning on all version-enabled tables, uninstall the old release of Workspace Manager using the old uninstall script, and install the new release of the Workspace Manager software.

If the WM_INSTALLATION view does not exist, run the following script to create the view.

SQL> @owmcmdv.plb

Set the system to spool results to a log file for later verification of success. For example:

SQL> SPOOL catoutowmu.log

Run the appropriate upgrade script depending on the release from which you are upgrading.

If the OWM_VERSION value is BETA_RELEASE, the upgrade is not supported. Use DisableVersioning on all version-enabled tables, uninstall the old release of Workspace Manager using the old uninstall script, and install the new release of the Workspace Manager software.

If you are upgrading from release 9.0.1.0.0 or 9.0.1.2.0, run owmu901.plb:

SQL> @owmu901.plb

If you are upgrading from release 9.0.1.3.0, run owmu9013.plb:

SQL> @owmu9013.plb

If you are upgrading from release 9.0.1.4.0, run owmu9014.plb:

SQL> @owmu9014.plb

If you are upgrading from a preproduction version of release 9.2.0.0.0, run owmu9200.plb. Note that this is required even if your current release number is 9.2.0.0.0 and you are upgrading to the production version of release 9.2.0.0.0.

SQL> @owmu9200.plb

Verify whether or not the upgrade was successful:

SELECT * FROM all_wm_vt_errors;

This view should be empty. If it has any rows, the upgrade did not complete successfully. To recover one or more tables that were left in an inconsistent state because of the upgrade failure, use the RecoverAllMigratingTables or RecoverMigratingTable procedure, both of which are described in Chapter 2.

Verify the current version of Workspace Manager:

SELECT * FROM wm_installation;

The value of OWM_VERSION is the new version of Workspace Manager.

Turn off the spooling of script results to the log file:

SQL> SPOOL OFF

Disable the RESTRICTED SESSION feature for the instance:

SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;

B.2 Downgrading to a Previous Release

To downgrade from the current Workspace Manager release to a previous release, perform the following steps.

Copy the downgrade scripts from the current release to the installation directory of the release to which you are downgrading.

If you are downgrading to the Workspace Manager release shipped with the RDBMS installation, copy the downgrade scripts to $ORACLE_HOME/rdbms/admin.

If you are downgrading to release 9.0.1.0.0 or 9.0.1.2.0, copy the following files: owmd901.plb, owmr9013.plb, and owmcmdv.plb

If you are downgrading to release 9.0.1.3.0, copy the following files: owmd9013.plb, owmr9013.plb, and owmcmdv.plb

If you are downgrading to release 9.0.1.4.0, copy the following files: owmd9014.plb and owmr9014.plb

At a system prompt, change to the installation directory of the release to which you are downgrading. If you are downgrading to the Workspace Manager release shipped with the RDBMS installation, change to $ORACLE_HOME/rdbms/admin

Start SQL*Plus.

Connect to the database instance as a user with SYSDBA privileges.

Shut down the instance:

SQL> SHUTDOWN IMMEDIATE

Start the instance in RESTRICT mode:

SQL> STARTUP RESTRICT

Set the system to spool results to a log file for later verification of success. For example:

SQL> SPOOL catoutowmd.log

Run the appropriate downgrade script depending on the release to which you are downgrading.

If you are downgrading to release 9.0.1.0.0 or 9.0.1.2.0, run owmd901.plb:

SQL> @owmd901.plb

If you are downgrading to release 9.0.1.3.0, run owmd9013.plb:

SQL> @owmd9013.plb

If you are downgrading to release 9.0.1.4.0, run owmd9014.plb:

SQL> @owmd9014.plb

Verify whether or not the downgrade was successful:

SELECT * FROM wm_downgrade_tables;

This table should not exist. If it exists and has any rows, the downgrade did not complete successfully; contact Oracle Support Services.