Upgrading a log-based Replication Agent (15.1)

This section describes how to upgrade Replication Agent for Oracle 15.1 to 15.2.

NoteReplication Agent 15.2 must be installed on the same host on which the primary Oracle server is running.

StepsUpgrading a log-based Replication version 15.1 to 15.2

  1. For each existing Replication Agent for Oracle instance, Sybase recommends that you first back up the RASD as described in the Replication Agent Administration Guide. Back up the complete existing Replication Agent instance directory.

  2. Install the Replication Agent 15.2 software as described in "Installing the Replication Agent software" in the Replication Agent Installation Guide. Sybase recommends that you install Replication Agent 15.2 into the same SYBASE directory as the earlier version of Replication Agent.

  3. Download and install the Oracle JDBC driver, and set the CLASSPATH environment variable, as described in the Replication Agent Installation Guide. If the CLASSPATH contains another Oracle JDBC driver, remove it. Only the Oracle JDBC driver required by Replication Agent 15.2 should be in the CLASSPATH.

  4. Create the 15.2 version of all valid existing Replication Agent instances.

    NoteThis step creates new Replication Agent 15.2 instances for all valid existing instances of the earlier version of Replication Agent, regardless of whether the existing instances are for Oracle, IBM DB2 Universal Database, or Microsoft SQL Server. To complete the upgrade for Microsoft SQL Server or UDB instances, see the appropriate section in this appendix. If you do not want to run a newly created instance on this host, simply delete the new instance directory.

    1. On UNIX, set the SYBASE environment variables by changing to the SYBASE directory in which Replication Agent 15.2 is installed and sourcing the SYBASE script:

      • For C Shell: source SYBASE.csh

      • For Bourne or Korn shell: . SYBASE.sh

    2. Change directory to the Replication Agent 15.2 bin directory:

      • On UNIX:

        cd $SYBASE/RAX-15_2/bin
        
      • On Windows:

        cd %SYBASE%\RAX-15_2\bin
        
    3. Create new versions of all valid existing instances:

      ra_admin -u src_directory 
      

      Here, src_directory is the full path name of the earlier version’s Replication Agent installation directory. This is the source directory. For example:

      ra_admin -u d:\sybase\RAX-15_1
      

      For information about the instances that did not upgrade successfully, see the administration logs (…/RAX-15_2/admin_logs). After you correct the problem, re-run this command. This command does not affect those Replication Agent instances that have already been successfully upgraded.

  5. If necessary, set the RA_JAVA_DFLT_CHARSET environment variable in the Replication Agent 15.2 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 Replication Agent Administration Guide.

  6. If necessary, override the default maximum amount of memory available to the JRE by setting the RA_JAVA_MAX_MEM environment variable in the Replication Agent 15.2 RUN_instance script. Replication Agent 15.2 does not set the RA_JAVA_MAX_MEM environment variable in the executable or run scripts, which allows the JVM to use its default for the maximum heap size. See the Replication Agent Administration Guide.

  7. In the primary Oracle database, grant the previously existing pds_username user any additional required privileges. See “Replication Agent permissions”.

  8. To prevent any loss of replicated data, deny users (other than the previously existing Replication Agent pds_username user) any further access to the primary Oracle instance.

  9. Log in to the previously existing Replication Agent instance, verify that 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 of the following statistics are zero (0):

      • Input queue size

      • Output queue size

    2. When all of these values are zero, note 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, then issue the ra_locator command again and compare the displayed locator with that of the Last QID Sent. If they are different, wait and repeat this step.

    5. Quiesce the Replication Agent instance by issuing the quiesce command.

    6. Shut down the Replication instance by issuing the shutdown command.

  10. Start and log in to the Replication Agent 15.2 instance and migrate the Replication Agent metadata by issuing the ra_migrate command.

  11. Allow all users to access the primary Oracle.

  12. Log in to the RSSD, and set the Replication Server locator to zero:

    rs_zeroltm source_ds, source_db
    

    Here, source_ds matches the previous Replication Agent instance values for rs_source_ds, and source_db matches the previous Replication Agent instance values for rs_source_db.

    NoteThis step is required because the format of the QID has changed in version 15.2, requiring the previous value held by Replication Server to be replaced. The rs_source_ds and rs_source_db values are migrated from the earlier version of Replication Agent and do not need to be changed.

  13. In the Replication Agent 15.2 instance, do the following: