Migrating from version 12.5 to 12.6 for non-Oracle instances  Downgrading from Replication Agent for Oracle 12.6

Appendix A: Migration in Replication Agent

Migrating from Replication Agent for Oracle 12.5 to 12.6

StepsTo migrate from Replication Agent for Oracle 12.5 to 12.6

  1. Back up the existing Replication Agent for Oracle instance directory, containing the following configuration file: $SYBASE/rax-12_5/<instance>/<instance>.cfg.

  2. Install the Replication Agent for Oracle 12.6 version software on a machine where it can directly read the Oracle redo logs.

    NoteIf you are installing the Replication Agent for Oracle version 12.6 software on a machine with an installation of the previous version, it must be installed in a different SYBASE directory.

  3. Create a Replication Agent for Oracle version 12.6 instance with a different name and port number than the Replication Agent for Oracle version 12.5 instance. The port and port+1 must be unique on the machine.

    Do not start the instance.

  4. Update the appropriate interfaces file (interfaces for UNIX, sql.ini for Windows) with the new instance name and new port number so that the migration script can ISQL in to the new Replication Agent for Oracle version 12.6 instance.

  5. Update the Replication Agent for Oracle version 12.6 instance’s configuration file by running the generation script at $SYBASE/RAX-12_6/bin/gen_RAO_migrate_with_parms.ksh:

    cd $SYBASE/RAX-12_6/bin�
    ./gen_RAO_migrate_with_parms.ksh mySrcRao myuid mypwd /workdir/path/mySrcRao.cfg ../myTgtRao/myTgtRao.cfg
    

    where:

    The generation script copies to the Replication Agent for Oracle version 12.6 configuration file or creates parameter initialization commands in the migration file for most of the parameters in the Replication Agent for Oracle version 12.5 configuration file. The generated migration script is a file (/<workdir>/<src_instance>_migrate_<date>.cmds). It contains Replication Agent commands that you will later run against the Replication Agent for Oracle version 12.6 instance to initialize the primary database, to initialize the Replication Agent for Oracle version 12.6 (including incrementing the database generation ID), and to re-mark all the tables, procedures, and LOB columns that were marked in the Replication Agent for Oracle version 12.5 instance.

    If the Replication Agent for Oracle version 12.5 and the Replication Agent for Oracle version 12.6 instances are on different machines and both configuration files cannot be accessed at the same time, copy the Replication Agent for Oracle version 12.5 configuration file to a location on the Replication Agent for Oracle version 12.6 instance’s machine where it can be read by the generation script.�

    NoteWhen the Korn shell script is running on Windows and the following message appears, you can ignore it:�

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

    �If the Replication Agent for Oracle version 12.6 instance is on a Windows machine that does not have Korn shell available, copy the generation script and the Replication Agent for Oracle version 12.6 instance’s configuration file to a UNIX machine from which you can log in to the Replication Agent for Oracle version 12.5 instance. This copy of the Replication Agent for Oracle version 12.6 instance’s configuration file is updated by the generation script. After it is updated, copy the configuration file back to the Replication Agent for Oracle version 12.6 instance directory.

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

  6. To see what objects will be marked and what LOB columns enabled, examine the 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.

  7. If necessary, install the Oracle 9.2.0.5 JDBC driver for JDK 1.4 on the same machine where you installed Replication Agent for Oracle version 12.6, and add the JDBC driver’s path to your CLASSPATH environment variable on this machine.

    NoteNo other Oracle drivers are allowed in the CLASSPATH.

  8. Set the RA_JAVA_DFLT_CHARSET environment variable in the RUN_instance script to the name of the Java character set that is equivalent to the one being used at the primary database.� See the Sybase Replication Agent Administration Guide for information on setting RA_JAVA_DFLT_CHARSET.

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

  10. Set rs_charset to match the Replication Server character set.

  11. Test the primary database connection:

    test_connection PDS
    
  12. At the primary Oracle database, grant the Replication Agent for Oracle version 12.6 primary Oracle user (the user specified by the pds_username configuration parameter) the additional required privileges. See “Replication Agent permissions”.

  13. Prevent users (other than the Replication Agent for Oracle version 12.6 user) from any further access to the primary database.

  14. In the Replication Agent for Oracle version 12.5 instance, verify it is in REPLICATING state and allow replication to finish. To verify that replication has completed:

    1. periodically issue the ra_statistics command, watching until all the following statistics are zero:

      • Operation queue size

      • Operation data hash size

      • Input queue size�

      • Output queue size

    2. Once they are all zero, note the Last QID Sent from the last set of statistics.

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

    4. Wait, 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.�

  15. Quiesce the Replication Agent for Oracle version 12.5 instance.

  16. In the Replication Agent for Oracle version 12.5 instance, remove the XLog:

    pdb_xlog remove, force�
    
  17. Shut down the Replication Agent for Oracle version 12.5 instance.

  18. In the primary Oracle database:

    1. Enable supplemental logging of primary key data.

    2. Enable archiving of redo logs.�

    3. Disable “auto” archiving of redo logs.�

    4. Alter system switch log file.�

    5. Alter system archive log all.

    See Chapter 4, “Replication Agent for Oracle” for details.

  19. Run the migration script that was generated in step 5 against the Replication Agent for Oracle version 12.6 instance. For example:

    isql –S <myTgtRAO> -Usa -P -i /<workdir>/<mySrcRao>_migrate_<date>.cmds
    

    This script initializes the primary database, initializes Replication Agent for Oracle version 12.6 (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 12.5 instance.

  20. Allow users access to the primary database.�

  21. Log in to the RSSD and set the Replication Server’s locator to zero:

    rs_zeroltm source_ds, source_db
    

    where:

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

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

  23. Sybase recommends that you change the administration user ID and password in the Replication Agent for Oracle version 12.6 instance from the default values to the same values you used in the Replication Agent for Oracle version 12.5 instance.

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

  25. Update the interfaces or sql.ini file entries if you want the Replication Agent for Oracle version 12.5 instance name associated with the Replication Agent for Oracle version 12.6 instance machine and port number.





Copyright © 2005. Sybase Inc. All rights reserved. Downgrading from Replication Agent for Oracle 12.6

View this book as PDF