To migrate from Replication Agent for Oracle 12.5 to
15.0
Back up the existing Replication Agent for Oracle instance directory that contains the following configuration file: $SYBASE/rax-12_5/<instance>/<instance>.cfg.
Install the Replication Agent for Oracle 15.0 version software on a machine where it can directly read the Oracle redo logs.
If you are installing the Replication Agent for Oracle version 15.0
software on a machine with an installation of the previous version,
it must be installed in a different SYBASE directory.
Create a Replication Agent for Oracle version 15.0 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.
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 15.0 instance.
Update the Replication Agent for Oracle version 15.0 instance’s configuration file by running the generation script at $SYBASE/RAX-15_0/bin/gen_RAO_migrate_with_parms.ksh:
cd $SYBASE/RAX-15_0/bin ./gen_RAO_migrate_with_parms.ksh mySrcRao myuid mypwd /workdir/path/mySrcRao.cfg ../myTgtRao/myTgtRao.cfg
where:
mySrcRao is the name of the interfaces or sql.ini file entry for the Replication Agent for Oracle version 12.5.
myuid is the user ID for logging in to the Replication Agent for Oracle version 12.5 instance.
mypwd is the password for logging in to the Replication Agent for Oracle version 12.5 instance. If there is no password, use two double-quotes with nothing in between (““).
/workdir is the path name of a directory to use as a work area and where the <src_instance>_migrate_<date>.cmds migration file will be created.
/path/mySrcRao.cfg is the full path name of the Replication Agent for Oracle version 12.5 instance configuration file.
../myTgtRao/myTgtRao.cfg is the path name of the Replication Agent for Oracle version 15.0 instance configuration file that was created in step 3.
The generation script copies to the Replication Agent for Oracle version 15.0 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 called (/<workdir>/<src_instance>_migrate_<date>.cmds). It contains Replication Agent commands that you will later run against the Replication Agent for Oracle version 15.0 instance to perform the following tasks:
Initialize the primary database
Initialize the Replication Agent for Oracle version 15.0 (including incrementing the database generation ID)
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 15.0 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 15.0 instance’s machine where it can be read by the generation script.
When 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 15.0 instance is on a Windows machine that does not have Korn shell available, copy the generation script and the Replication Agent for Oracle version 15.0 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 15.0 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 15.0 instance directory.
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
12.5 instance. If you do, these changes will not be applied to the Replication Agent for
Oracle version 15.0 instance.
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.
If necessary, install the JDBC driver for JDK on the same machine where you installed Replication Agent for Oracle 15.0depending on the Oracle version:
For Oracle 9i, install the Oracle 9.2.0.5 JDBC driver for JDK 1.4.
For Oracle 10g, install the Oracle 10.2.0 JDBC driver for JDK 1.4
Add the JDBC driver’s path to your CLASSPATH environment variable on this machine.
No other Oracle drivers are allowed in the CLASSPATH.
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.
Start and log in to the Replication Agent for Oracle version 15.0 instance.
Set rs_charset to match the Replication Server character set.
Test the primary database connection:
test_connection PDS
At the primary Oracle database, grant the Replication Agent for Oracle version 15.0 primary Oracle user (the user specified by the pds_username configuration parameter) the additional required privileges. See “Replication Agent permissions”.
Prevent users (other than the Replication Agent for Oracle version 15.0 user) from any further access to the primary database.
In the Replication Agent for Oracle version 12.5 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):
Operation queue size
Operation data hash size
Input queue size
Output queue size
When they are all zero, note the Last
QID Sent
from the last set of statistics.
Issue the ra_locator update command so that Replication Agent for Oracle version 12.5 retrieves the truncation point from Replication Server.
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.
Quiesce the Replication Agent for Oracle version 12.5 instance.
In the Replication Agent for Oracle version 12.5 instance, remove the XLog:
pdb_xlog remove, force
Shut down the Replication Agent for Oracle version 12.5 instance.
In the primary Oracle database:
Enable supplemental logging of primary key data.
Enable archiving of redo logs.
Disable “auto” archiving of redo logs.
Alter system switch log file.
Alter system archive log all.
See “Replication Agent permissions” for details.
Run the migration script that was generated in step 5 against the Replication Agent for Oracle version 15.0 instance:
isql –S <myTgtRAO> -Usa -P -i /<workdir>/<mySrcRao>_migrate_<date>.cmds
This script initializes the primary database, initializes Replication Agent for Oracle version 15.0 (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.
Allow users access to the primary database.
Log in to the RSSD and set the Replication Server’s locator to zero:
rs_zeroltm source_ds, source_db
where:
source_ds matches the Replication Agent for Oracle version 15.0 instance values for rs_source_ds.
source_db matches the Replication Agent for Oracle version 15.0 instance values for rs_source_db.
The rs_source_ds and rs_source_db values
were migrated from Replication Agent for Oracle version 12.5 and should not be
changed.
In the Replication Agent for Oracle version 15.0 instance, resume replication.
Sybase recommends that you change the administration user ID and password in the Replication Agent for Oracle version 15.0 instance from the default values to the same values you used in the Replication Agent for Oracle version 12.5 instance.
Log out of the Replication Agent for Oracle version 15.0 instance.
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 15.0 instance machine and port number.