This section describes how to upgrade Mirror Replication Agent for Oracle 15.0 or 15.1 to 15.2.
Upgrading a log-based replication version 15.0
or 15.1 to 15.2
For each existing Mirror Replication Agent for Oracle instance, Sybase recommends that you first back up the RASD, as described in the version 15.2 Mirror Activator Administration Guide. Back up the complete existing Mirror Replication Agent instance directory.
Install the Mirror Replication Agent 15.2 software as described in "Installing the Mirror Replication Agent software" in the version 15.2 Mirror Replication Agent Installation Guide. Sybase recommends that you install Mirror Replication Agent 15.2 into the same SYBASE directory as the earlier version of Mirror Replication Agent.
Download and install the Oracle JDBC driver, and set the CLASSPATH environment variable, as described in the version 15.2 Mirror Replication Agent Installation Guide. If the CLASSPATH contains another Oracle JDBC driver, remove it. Only the Oracle JDBC driver required by Mirror Replication Agent 15.2 should be in the CLASSPATH.
Create the 15.2 version of all valid existing Mirror Replication Agent instances.
This step creates new Mirror Replication Agent 15.2
instances for all valid existing instances of the earlier version
of Mirror Replication Agent, regardless of whether the existing
instances are for ASE or Oracle. If you do not want to run a newly created
instance on this host, simply delete the new instance directory.
On UNIX, set the SYBASE environment variables by changing to the SYBASE directory in which Mirror Replication Agent 15.2 is installed and sourcing the SYBASE script:
For
C Shell: source SYBASE.csh
For Bourne or Korn shell: . SYBASE.sh
Change to the Mirror Replication Agent 15.2 bin directory:
On UNIX:
cd $SYBASE/MA-15_2/bin
On Windows:
cd %SYBASE%\MA-15_2\bin
Create new versions of all valid existing instances:
ma_admin -u src_directory
Here, src_directory is the full path name of the earlier version’s Mirror Replication Agent installation directory. This is the source directory. For example:
ma_admin -u d:\sybase\MA-15_1
For information about instances that did not successfully upgrade, see the administration logs (…/MA-15_2/admin_logs). After you correct the problem, re-run this command. This command does not affect those Mirror Replication Agent instances that have already been successfully upgraded.
If necessary, set the RA_JAVA_DFLT_CHARSET environment variable in the Mirror 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 version 15.2 Mirror Activator Administration Guide.
If necessary, override the default maximum amount of memory available to the JRE by setting the RA_JAVA_MAX_MEM environment variable in the Mirror Replication Agent 15.2 RUN_instance script. Mirror 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 Mirror Activator Administration Guide.
In the primary Oracle database, grant the previously existing pds_username user any additional required privileges. See “Mirror Replication Agent permissions”.
To prevent any loss of replicated data, deny users (other than the previously existing Mirror Replication Agent pds_username user) any further access to the primary Oracle instance.
Log in to the previously existing Mirror Replication Agent instance, verify that it is in Replicating state, and allow replication to finish. To verify that replication has completed:
Periodically issue the ra_statistics command, watching until all of the following statistics are zero (0):
Input queue size
Output queue size
When all of these values are zero, note the Last QID Sent from the last set of statistics.
Issue the ra_locator update command so that Mirror Replication Agent retrieves the truncation point from Replication Server.
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.
Quiesce the Mirror Replication Agent instance by issuing the quiesce command.
Shut down the replication instance by issuing the shutdown command.
Start and log in to the Mirror Replication Agent 15.2 instance and migrate the Mirror Replication Agent metadata by issuing the ra_migrate command.
Allow all users to access the primary Oracle.
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 Mirror Replication Agent instance values for rs_source_ds, and source_db matches the previous Mirror Replication Agent instance values for rs_source_db.
This 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 Mirror Replication Agent and
do not need to be changed.
In the Mirror Replication Agent 15.2 instance, do the following:
To have automatic archiving turned off, set pdb_include_archives to false. To have automatic archiving turned on, set pdb_include_archives to true, set pdb_archive_path to the directory containing the archive logs, and set pdb_archive_remove to false. See “Redo and archive log setup”.
Resume replication by issuing the resume command.