Downgrading from Replication Agent for Oracle version 15.0 to version 12.6

This procedure assumes that you are using a Replication Agent for Oracle version 15.0 instance. If the Replication Agent for Oracle version 12.6 instance no longer exists, create one using the Replication Agent for Oracle version 12.6 ra_admin or administrator command, and then follow the procedure described below, using the previously described $SYBASE/RAX-15_0/bin/gen_RAO_migrate_with_parms.ksh script, instead of the $SYBASE/RAX-15_0/bin/gen_RAO_migrate.ksh script described next.

The difference between the two generation scripts is that the gen_RAO_migrate_with_parms.ksh script copies parameter values in addition to initializing the primary database and the Replication Agent, whereas the gen_RAO_migrate.ksh script assumes all parameters are already configured.

NoteIf you modified the interfaces or sql.ini file entries during your upgrade, you need to create a new entry (using a different name) in order to access the Replication Agent for Oracle version 12.6 instance.

StepsTo downgrade from Replication Agent for Oracle version 15.0 to version 12.6

  1. To generate the downgrade script, run the $SYBASE/RAX-15_0/bin/gen_RAO_migrate.ksh file:

    cd $SYBASE/RAX-15_0/bin
    ./gen_RAO_migrate.ksh mySrcRao myuid mypwd /workdir
    

    where:

    The script generates a file called (/<workdir>/<src_instance>_migrate_<date>.cmds) that contains Replication Agent commands that you will later run against the Replication Agent for Oracle version 12.6 instance to perform the following tasks:

    The script does not modify any of the Replication Agent for Oracle version 12.6 parameters except pdb_auto_run_scripts, pdb_dflt_column_repl, and pdb_convert_datetime, which will all be set to the same values as configured in the Replication Agent for Oracle version 15.0 instance.

    NoteIf the following message appears when running the Korn shell script on Windows, you can ignore it:

    tail: write error on standard output: The pipe is being closed.
    

    After the migration script is generated, do not mark, unmark, enable, or disable any of the tables, LOB columns, or procedures. Also, do not modify any parameters in the Replication Agent for Oracle version 15.0 instance. If you do, these changes will not be applied to the Replication Agent for Oracle version 12.6 instance.

  2. To see which objects will be marked and which LOB columns will be enabled, examine the following generated file: /<workdir>/<src_instance>_migrate_<date>.cmds

    If you want to change what is marked or enabled, you can make changes to this file. For example, you can set pdb_convert_datetime to true for some tables and procedures and to false for others.

  3. Be sure that the appropriate Oracle JDBC driver is in your CLASSPATH. The one required for Replication Agent for Oracle version 15.0 will not work with older versions of Replication Agent for Oracle.

    NoteNo other Oracle drivers are allowed in the CLASSPATH.

  4. Start and log in to the Replication Agent for Oracle version 12.6 instance.

  5. Test the primary database connection:

    test_connection PDS
    
  6. Prevent users (other than the Replication Agent for Oracle version 15.0 user) from any further access to the primary database.

  7. Verify that the Replication Agent for Oracle version 15.0 instance is in Replicating state and allow replication to finish. To verify that replication has completed:

    1. Periodically issue the ra_statistics command, watching until the following statistics are zero (0):

      • Input queue size

      • Output queue size

    2. When they are both zero, make note of the Last QID Sent from the last set of statistics.

    3. Issue the ra_locator update command so that Replication Agent retrieves the truncation point from Replication Server.

    4. Wait, and then issue the ra_locator command and compare the displayed locator with that of the Last QID Sent. If they are different, wait and repeat this step.

  8. Quiesce the Replication Agent for Oracle version 15.0 instance.

  9. In the Replication Agent for Oracle version 15.0 instance, de-initialize the Replication Agent:

    pdb_xlog remove, force
    
  10. Shut down the Replication Agent for Oracle version 15.0 instance.

  11. Run the script that was generated in Step 1 above against the Replication Agent for Oracle version 12.6 instance, for example:

    isql –S <myTgtRAO> -Umyuid -Pmypwd -i /<workdir>/<mySrcRao>_migrate_<date>.cmds
    

    where:

    The script initializes the primary database and the Replication Agent (including incrementing the database generation ID), and re-marks all the tables, procedures, and LOB columns that were marked in the Replication Agent for Oracle version 15.0 instance.

  12. Allow users access to the primary database.

  13. Log in to the RSSD and set the Replication Server’s locator to “0”:

    rs_zeroltm source_ds, source_db
    

    where source_ds and source_db match the Replication Agent for Oracle version 12.6 instance’s values for the rs_source_ds and rs_source_db parameters.

    NoteThe rs_source_ds and rs_source_db values were migrated from Replication Agent for Oracle version 15.0 and should not be changed.

  14. In the Replication Agent for Oracle version 12.6 instance, resume replication.

  15. Log out of the Replication Agent for Oracle version 12.6 instance.

  16. If you created a new interfaces or sql.ini entry when you upgraded to Replication Agent for Oracle version 15.0, update the entry so the Replication Agent for Oracle version 12.6 instance name is again associated with the old Replication Agent for Oracle version 12.6 instance machine and port number.

  17. Revert the Oracle logging properties back to your desired setup in the primary database.

  18. Revoke any additional privileges that were granted to the Replication Agent primary database user for the upgrade in the primary database.