Oracle8i Migration
Release 3 (8.1.7)

Part Number A86632-01

Library

Product

Contents

Index

Go to previous page Go to next page

G
Migration and Compatibility for Replication Environments

This appendix explains the steps that need to be taken to migrate a replication environment from Oracle7 to Oracle8i. This appendix covers the following topics:

Migration Overview for Replication

In some cases you may find it easiest to migrate your environment, particularly the multimaster component of your environment, in one step. Typically, this is only possible for small configurations. Instead, you may wish to migrate an existing Oracle7 replication environment to Oracle8i incrementally. Replication and administrative operations can be run successfully in a mixed Oracle7 and Oracle8i replication environment.

To successfully interoperate, however, you must observe the following restrictions:

After migrating a master site to Oracle8i, perform a complete refresh of all of associated snapshot sites.

Downgrading a replication environment from Oracle8i to Oracle7 is not supported.

Certain Oracle8i replication features require that all sites be successfully migrated to at least Oracle release 8.0 before the features can be used. For example, before you can use primary key snapshots, both the snapshot site and its associated master site must be migrated to at least release 8.0. The Oracle8i simple snapshots with subqueries feature and the master table reorganization procedures require that you first upgrade from Rowid snapshots to primary key snapshots.

Migration using a full database export from Oracle7 and import to Oracle8i is also supported.

Migrating All Sites at Once

This section describes how to migrate your entire multimaster environment at once to Oracle8i. Note that any snapshot sites that you do not also migrate to Oracle8i, must be upgraded to Oracle7 Release 7.3.4 or greater.

Follow these steps to migrate all master sites and (optionally) snapshot sites at one time:

  1. Quiesce the replication environment by executing DBMS_REPCAT. SUSPEND_MASTER_ACTIVITY at the master definition site for all master replication groups, and stopping all propagation and refreshing from snapshot sites to the master, for example, by temporarily suspending or "breaking" entries in the job queue that control automated propagation and refreshing at the snapshot sites. You must also resolve and re-execute any errors in the local error queue until it is empty. For more information, see the following sections in Oracle 7 Server Distributed Systems, Volume II: Replicated Data: Chapter 4, "Asynchronous Propagation of DML Changes", and "Suspending Replication Activity", as well as Chapter 7, "Resolving an Error Manually".

  2. Migrate all master sites using the Oracle7 to Oracle8i Migration utility and by executing the appropriate migration scripts as documented in Chapter 4 and Chapter 5, such as CATREP.SQL and ROLD_RELEASE.SQL, where old_release is the previously installed release.

  3. Using the Replication Manager Setup Wizard, create a primary master replication administrator account granting this user Oracle8i Replication Administrator, Propagator, and Receiver privileges on all master sites, and set up the appropriate links connecting all sites.

  4. Using Replication Manager or the replication management API, regenerate replication support for each replication base object. Among other activities, generating replication support establishes the registered propagator as the owner of generated objects

  5. Using Replication Manager or the replication management API, resume replication activity by unquiescing the environment.

  6. At a minimum, you must now upgrade all associated snapshot sites to Oracle7 Release 7.3.4. For instructions on migrating your snapshot sites to Oracle8i, see "Incremental Migration of Snapshot Sites".

  7. You must perform a complete refresh on all snapshots at all snapshot sites after their master sites have been migrated to Oracle8i. Before the refresh, be certain that you have "unbroken" any jobs that you may have "broken" during migration of your snapshot sites by calling the DBMS_JOB.BROKEN procedure.

    If your snapshots have been defined with the refresh FORCE option, then their next attempted refresh will be a complete refresh automatically. Snapshots defined with the refresh FAST option must be manually refreshed using the DBMS_REFRESH.REFRESH procedure or other refresh procedures.

    If you are using procedural replication at snapshot sites, then also regenerate snapshot support on all packages and package bodies used for procedural replication.


    Note:

    If you are migrating all of the master's snapshot sites to Oracle8i when the master site is migrated to Oracle8i, in other words, then you do not need to migrate the snapshot sites incrementally, you can alternatively drop the snapshot logs for the master and recreate them as primary key snapshot logs. The snapshots at each snapshot site should be altered to convert them to primary key snapshots. You can then do a complete refresh for each primary key snapshot. See "Upgrading to Primary Key Snapshots" for additional details. 


  8. Drop any administrative accounts and links that you were using to maintain your Oracle7 multimaster replication environment that are not needed in your Oracle8i environment. Unnecessary privileges may also be revoked. Be careful not to drop accounts that are needed to maintain any Oracle7 snapshot sites.

Incremental Migration

It is possible to incrementally migrate your replication environment. However, you must carefully analyze the interdependencies between sites to ensure that they continue to interoperate throughout your migration. Table G-1 describes the conditions that must be met to allow Oracle7 and Oracle8i replication sites to interoperate.

Table G-1 Interoperability in a Replication Environment
Environment  Action  Pre-Requisite 

Multimaster  

Migrate master site from Oracle7 to Oracle8i.  

All other master sites must be Oracle7 Release 7.3.3 or greater.  

Master with
dependent snapshots 

Migrate master site from Oracle7 to Oracle8i.  

All dependent snapshot sites must be Oracle7 Release 7.3.4 or greater.  

Master with
dependent snapshots 

Migrate snapshot site from Oracle7 to Oracle8i.  

Associated master site must be Oracle7 Release 7.3.3 or greater.  

To avoid interoperability problems within a replication environment, it is strongly recommended that if you must perform an incremental migration that you perform it in the following order:

  1. Upgrade all of your master sites to Oracle7 Release 7.3.3 or greater and follow the steps in "Preparing Oracle7 Master Sites for Incremental Migration" to prepare your Oracle7 master sites for incremental migration.

  2. Incrementally migrate all snapshot sites to Oracle8i.

  3. Incrementally migrate all master sites to Oracle8i.

Preparing Oracle7 Master Sites for Incremental Migration

Before beginning incremental migration of Oracle7 master or snapshot sites, your Oracle7 Release 7.3.3 or greater master sites must be configured so that all replication administration and propagation is done within the security context of a single user at each site. Additionally, this primary master replication administrator must have the same username and password at all Oracle7 and Oracle8i sites. Your Oracle7 master sites may already be configured in this manner. If not, then you must complete the following steps:

  1. Choose a primary master replication administrator for your replication environment. You may select your current replication administrator or create a new user.

  2. At each master site, grant the required privileges to the primary master replication administrator using both DBMS_REPCAT_ADMIN.GRANT_ADMIN_ANY_REPGROUP and DBMS_REPCAT_AUTH.GRANT_SURROGATE_REPCAT.

  3. If they do not already exist, then you must create the following links for from each master site to all other master sites in the multimaster environment, for a total of 3N(N - 1) links:

    • A public database link, created as SYS, that includes a valid global database name, as well as a USING clause with a valid SQL*Net 2.3 TNS alias.

    • A private database link, created as SYS, that includes a valid global database name, as well as a CONNECT TO clause with the username and password of the primary master replication administrator.

    • A private database link, create as the primary replication administrator, that includes a valid global database name, as well as a CONNECT TO clause with the username and password of the primary master replication administrator.

Incremental Migration of Snapshot Sites

Before you can migrate a snapshot site to Oracle8i, its associated master site must have been upgraded to Oracle7 Release 7.3.3 or greater and the master site must have been fully prepared for incremental migration.

To incrementally migrate your Oracle7 snapshot sites to Oracle8i, complete the following steps:

  1. Isolate the snapshot site from the replication environment by stopping all local updates to updateable snapshots at the snapshot site. In a separate session you may lock each snapshot's base table to prevent further transactions. Empty the local deferred transaction queue by pushing the queue to the snapshot's master. Stop all propagation from the snapshot site to its master, for example, by temporarily suspending or "breaking" entries in the job queue that control automated propagation and refreshing at the snapshot sites.

  2. Run the Oracle7 to Oracle8i Migration utility and execute the catrep.sql and rold_release.sql (where old_release is the previously installed database version) scripts as documented in Chapter 4, "Migrating from Oracle7 Using the Migration Utility" and Chapter 5, "Migrating from Oracle7 Using the Oracle Data Migration Assistant".

  3. Use the Replication Manager Setup Wizard or execute the appropriate replication management API calls to configure the primary snapshot replication administrator as the replication administrator and propagator for the snapshot site, to configure a receiver account at the associated master, and to create the appropriate links to the master. For Oracle7 master sites your receiver at the master site must be the primary master replication administrator that you prepared in the previous section. If you are using the Replication Manager Setup Wizard, then select the customize option to specify this receiver.

  4. Using Replication Manager or the appropriate replication management API calls, regenerate snapshot replication support. Among other activities, generating replication support establishes the registered propagator as the owner of generated objects

  5. Using Replication Manager or the appropriate replication management API calls, reschedule propagation and/or refresh intervals with the master and enable local updates where appropriate. If you used the DBMS_JOB.BROKEN procedure to help isolate your master site in Step 1, then you need to "unbreak" your jobs to resume your replication activity from your snapshot sites.

  6. Drop any administrative accounts and links that you were using to maintain your Oracle7 replication environment that are not needed in your Oracle8i environment. Unnecessary privileges may also be revoked.

Incremental Migration of Master Sites

Before upgrading a master site from Oracle7 to Oracle8i, you must meet the following conditions:

To incrementally migrate your Oracle7 master sites to Oracle8i, complete the following steps:

  1. Pick a master site to migrate. You should migrate your master definition site first.

  2. If you are using procedural replication, then record the configuration information and locations (schemas) of existing procedure wrappers. This information will be used later.

  3. Isolate the master site from the replication environment. To do this you must:

    • Stop updates to the master site by either:

      calling DBMS_REPCAT.SUSPEND_MASTER_ACTIVITY at the master definition site for all master replication groups, or by calling DBMS_DEFER_SYS.UNSCHEDULE_EXECUTION (for Oracle7 sites) or DBMS_DEFER_SYS.UNSCHEDULE_PUSH (for Oracle8i sites) at every remote master site and dependent snapshot site, and by preventing update activity at the master site being migrated. You should also refrain from executing any administrative operations at the master definition site that may affect the master site being migrated. Empty the local deferred transaction queue by manually pushing the queue to all sites.

    • Resolve and re-execute any errors in the local error queue until it is empty.

    • Stop any refreshes of the dependent snapshot sites from occurring by "breaking" entries in the job queue at each snapshot site that control automated propagation and refreshing at the snapshot sites.

    • For more information on completing the tasks in Step 1 refer to the following sections in Oracle7 Server Distributed Systems, Volume II: Replicated Data: Chapter 4, "Asynchronous Propagation of DML Changes", "Suspending Replication Activity", "Removing a Master Site from the Deferred Push List", and "Forcing the Deferred Transaction Queue to Push List". Also see Chapter 7, "Resolving an Error Manually".

  4. Migrate the master site using the Oracle7 to Oracle8i Migration utility and execute the catrep.sql and rold_release.sql (where old_release is the previously installed database version) scripts as documented in Chapter 4, "Migrating from Oracle7 Using the Migration Utility" and Chapter 5, "Migrating from Oracle7 Using the Oracle Data Migration Assistant".

  5. Using the Replication Manager Setup Wizard or the replication management API, grant your primary master replication administrator Oracle8i Primary Replication Administrator, Propagator, and Receiver privileges for the master site. Database links from the primary replication administrator to the primary master replication administrator at all other Oracle7 and Oracle8i master sites should already exist if you prepared your Oracle 7 master site for compatibility with Oracle8i using the directions in "Preparing Oracle7 Master Sites for Incremental Migration".

  6. If you are not already in a quiesced state, then use Replication Manager or the replication management API to suspend all replication activity for all master groups.

  7. Using Replication Manager or the replication management API, regenerate replication support for each replicated object. If any sites in the replication environment are still running Oracle7, then you must set the min_communication parameter to FALSE. The "min_communication" parameter should only be set to TRUE (the default) once all sites have been migrated to Oracle8i. Among other activities, generating replication support establishes the registered propagator as the owner of generated objects.

    See Also:

    Oracle8i Replication for more information minimum communication. 

  8. If you are using procedural replication, then check your remaining Oracle7 master sites to determine whether the wrappers have been moved (list created from Step 2). If they have been moved, then create a synonym in their old location (in the schema of either the replication administrator or the table owner, depending on whether the site previously used the system-based or user-based model) pointing to the new location in the schema of the primary replication administrator. Confirm necessary object privileges have been granted to access the new owner and locations. If you are also using procedural replication at snapshot sites, then regenerate snapshot support on all packages and package bodies used for procedural replication.

  9. Using Replication Manager or the replication management API, resume replication activity and unquiesce the environment for each master group. If you have isolated the master by unscheduling propagation to other masters and from other masters, then reschedule propagation by executing DBMS_DEFER_SYS.SCHEDULE_EXECUTION (for Oracle7 sites) or following the instructions in the Replication Manager online help (for Oracle8i sites) for all master sites.

  10. You must perform a complete refresh on all snapshots at both Oracle7 and Oracle version 8 sites after their master site has been migrated to Oracle8i. Because of the version 8 rowid format, the Oracle7 to Oracle8i Migration utility truncates all master snapshot logs. If you used the DBMS_JOB.BROKEN procedure to help isolate your master site in Step 3, then "unbreak" your jobs to resume your replication activity from your snapshot sites.

    If your snapshots have been defined with the refresh FORCE option, then their next attempted refresh will be a complete refresh automatically. Snapshots defined with the refresh FAST option must be manually refreshed using the DBMS_REFRESH.REFRESH procedure or other refresh procedures.


    Note:

    If you are able to migrate all of the master's snapshot sites to Oracle8i when the master site is migrated to Oracle8i (that is, you do not need to migrate the snapshot sites incrementally), then you can alternatively drop the snapshot logs for the master and recreate them as primary key snapshot logs. The snapshots at each snapshot site should be altered to convert them to primary key snapshots. You can then do a complete refresh for each primary key snapshot. See "Upgrading to Primary Key Snapshots" for additional details. 


  11. Drop any administrative accounts and links that you were using to maintain your Oracle7 multimaster replication environment that are not needed in your Oracle8i environment. Unnecessary privileges may also be revoked. Be careful not to drop accounts that are needed to maintain any Oracle7 snapshot sites or master sites.

Migration Using Export/ Import

Full database export from Oracle7 Release 7.3.3 or greater and import to Oracle8i is supported for both masters and snapshots. You may use export/import as an alternative to running the Oracle7 to Oracle8i Migration utility and replication scripts in the procedures described above. Be sure that you follow all the steps, both before and after the actual migration from Oracle7 to Oracle8i, in the above procedures however.

To export a full database from Oracle7 Release 7.3.3 or greater and import to Oracle8i, follow these steps:

  1. Export the Oracle7 Release 7.3.3 or greater database to a dump file using the Release 7.3 export utility under the SYSTEM schema with FULL=y.

  2. Import the dump file to the Oracle8i database using the Oracle8i import utility under the SYSTEM schema with FULL=y.

You may also export data from individual Oracle7 tables, import the data to Oracle8i tables, and then configure those tables as masters in an Oracle8i replication environment using standard replication procedures.

See Also:

Oracle8i Utilities for more information. 

Upgrading to Primary Key Snapshots

Once a snapshot site and its master have been migrated to Oracle8i, you can upgrade your rowid snapshots to Oracle8i primary key snapshots. To do this you must first alter the snapshot logs for each master table to log primary key information, as well as rowid information, when master rows are updated. Once this is completed at your master sites, you can incrementally convert your Oracle8i snapshots sites by altering the snapshots to convert them to primary key snapshots. Oracle8i masters that have been altered to log primary key as well as rowid information can support Oracle7 rowid snapshots as well as Oracle8i rowid and primary key snapshots simultaneously to allow for incremental migration.


Note:

A primary key snapshot cannot be converted or downgraded to a rowid snapshot.  


Primary Key Snapshots Conversion at Master Sites

To support primary key snapshots, do the following at the Oracle8i master site:

  1. Define and enable a primary key constraint on each master table that does not already have a primary key constraint enabled.

  2. Alter the snapshot log for each master table supporting fast refresh to include primary key information using the ALTER SNAPSHOT LOG statement.

    See Also:

    ALTER SNAPSHOT LOG in the Oracle8i SQL Reference manual for additional information. 


    Note:

    If the above conditions are not met, then an error is raised when you execute the ALTER SNAPSHOT statement at the snapshot sites to convert to primary key snapshots. 


Primary Key Snapshot Conversion at Snapshot Sites

After the Oracle8i master site has been configured to support primary key snapshots, do the following at the Oracle version 8 snapshot sites:

  1. Isolate the snapshot site from the replication environment by stopping all local updates to updateable snapshots at the snapshot site.

  2. If any read-only rowid snapshots being converted to primary key snapshots, then do not include all the columns of the primary key, drop and recreate them with all the primary key columns.

    See Also:

    Oracle8i Replication for more information on rowid snapshots. 


    Note:

    Constraints should not be defined on rowid snapshots. 


  3. Perform a fast refresh of all snapshots to remove the need for any remaining rowid references in the master snapshot log.

  4. Use the ALTER SNAPSHOT statement to convert rowid snapshots to primary key snapshots.

    See Also:

    Oracle8i SQL Reference for the complete syntax of ALTER SNAPSHOT. 

  5. Resume replication by rescheduling propagation and/or snapshot refresh with the master, enabling local updates where appropriate. If you used the DBMS_JOB.BROKEN procedure to help isolate you master site in Step 1, then you need to "unbreak" your jobs to resume your replication activity from your snapshot sites.

Features Requiring Migration to Oracle Version 8

The following features require that all the sites involved be successfully migrated to Oracle version 8:

The following features require that all the sites involved must be successfully migrated to Oracle version 8 and primary key snapshots:

The following features work automatically in mixed Oracle7 and Oracle8i environments, but only affect Oracle8 sites:

Obsolete Procedures

Procedures that are obsoleted in Oracle8i include:

DBMS_REPCAT.GENERATE_REPLICATION_PACKAGE

DBMS_REPCAT.GENERATE_REPLICATION_TRIGGER

DBMS_REPCAT_ADMIN.GRANT_ADMIN_REPGROUP

DBMS_REPCAT_ADMIN.GRANT_ADMIN_ANY_REPGROUP

DBMS_REPCAT_ADMIN.REVOKE_ADMIN_REPGROUP

DBMS_REPCAT_ADMIN.REVOKE_ADMIN_ANY_REPGROUP

DBMS_REPCAT_AUTH.GRANT_SURROGATE_REPCAT

DBMS_REPCAT_AUTH.REVOKE_SURROGATE_REPCAT

DBMS_DEFER_SYS.EXECUTE

DBMS_DEFER_SYS.SCHEDULE_EXECUTION


Go to previous page Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index