Upgrading a log-based Replication Agent (version 15.1)

This section describes how upgrade Replication Agent 15.1 to 15.2.

NoteReplication Agent 15.2 must be installed on the same host on which the primary Microsoft SQL Server is running.

StepsUpgrading Replication Agent 15.1 to 15.2

  1. For each existing Replication Agent for Microsoft SQL Server instance, Sybase recommends that you first back up the Replication Agent System Database (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. Use the Replication Agent 15.2 sybfilter driver to make the Microsoft SQL Server transaction log files readable by Replication Agent. For details on installing and using the sybfilter driver, see Appendix B, “Using the sybfilter driver.” However, at this time, it is not necessary to stop and restart Microsoft SQL Server since it is done in a later step in this procedure.

  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 Oracle 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. Open a command window.

    2. Set the SYBASE environment variables by changing to the SYBASE directory in which Replication Agent 15.2 is installed and executing the SYBASE.bat script.

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

      cd %SYBASE%\RAX-15_2\bin
      
    4. 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_0
      

      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 each of the Replication Agent 15.2 RUN_instance scripts 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. To prevent loss of any replicated data, deny users (other than the previously existing Replication Agent pds_username users) any further access to the primary databases.

  8. For each of the previously existing Replication Agent for Microsoft SQL Server instances, 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):

      • Operation queue size

      • Operation data hash size

      • 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.

  9. When all previously existing Replication Agent instances have been shut down, stop the Microsoft SQL Server service:

    1. In Control Panel | Administrative Tools | Services, find the service named SQL Server (SERVER). Here, SERVER is the name of your SQL Server data server. For example,

      SQL Server (TEAMSTER)
      
    2. Stop the service.

  10. If you are upgrading from Replication Agent 15.1 GA or 15.1 ESD #1, restart Microsoft SQL Server in single-user mode by opening a new command window and executing this command:

    "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe" -m -s instanceName
    

    Here, instanceName is the name of the Microsoft SQL Server instance. If you are upgrading from Replication Agent 15.1 ESD #2 or later, skip this step.

  11. Download and install the Microsoft SQL Server JDBC driver, and set the CLASSPATH environment variable, as described in the Replication Agent Installation Guide. If the CLASSPATH contains any other Microsoft SQL Server JDBC driver, remove it. Only the Microsoft SQL Server JDBC driver required by Replication Agent 15.2 should be in the CLASSPATH.

  12. Start and log in to each of the Replication Agent for Microsoft SQL Server 15.2 instances and do the following:

    1. Set the rs_charset configuration parameter to match the Replication Server character set, as described in the Replication Agent Reference Manual.

    2. Use the test_connection command to ensure that Replication Agent can connect to both Microsoft SQL Server and Replication Server.

    3. Initialize the Replication Agent instance and migrate the Replication Agent instance metadata by issuing the ra_migrate command.

      When this command executes in the first Replication Agent 15.2 instance, it also initializes the Microsoft SQL Server. In subsequent Replication Agent 15.2 instances, it only initializes the instance and migrates the instance metadata.

  13. If you are upgrading from Replication Agent 15.1 GA or 15.1 ESD #1, stop the Microsoft SQL Server in single-user mode:

    1. Log in to the server:

      "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\SQLCMD.EXE" -U username -P password -S serverName
      

      Here, username, password, and serverName are your user ID, password, and Microsoft SQL Server name.

    2. Issue the shutdown command.

      If you are upgrading from Replication Agent 15.1 ESD #2 or later, skip this step.

  14. Restart Microsoft SQL Server in multi-user mode (normal start):

    1. In Control Panel | Administrative Tools | Services, find the service named SQL Server (SERVER). Here, SERVER is the name of your Microsoft SQL Server data server. For example,

      SQL Server (TEAMSTER)
      
    2. Start the service.

  15. Log in to each of the Replication Agent Microsoft SQL Server 15.2 instances and resume replication:

    1. Use isql to log in to the Replication Agent instance:

      isql -Uusername -Ppassword -SinstanceName 
      

      Here, username, password, and instanceName are your user ID, password, and Replication Agent instance name.

    2. Issue the resume command.

  16. Allow all users to access the primary databases.