Replication Agent 15.2 is installed on the same Windows host as the earlier version of Replication Agent, and the current version of Microsoft SQL Server is 7 or 2000

StepsInstalling Replication Agent 15.2 on the same Windows host as the earlier version

  1. For each existing Replication Agent for Microsoft SQL Server instance, Sybase recommends that you back up the complete existing Replication Agent instance directory.

  2. Sybase recommends that you install Replication Agent 15.2 into the same SYBASE directory as the earlier version of Replication Agent.

  3. On the host on which the primary data server is running, verify that the Microsoft Filter Manager Library is the correct version as described in “The sybfilter driver”.

  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. Change directory to the Replication Agent 15.2 bin directory:

      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_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 stopped, upgrade the Microsoft SQL Server installation to version 2005 SP2. See Microsoft documentation for instructions. Verify that your primary data server meets the requirements described in “Microsoft SQL Server requirements”.

  10. In the primary Microsoft SQL Server, grant each previously existing pds_username user the additional required privileges. See “Replication Agent permissions”.

  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. 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 because it is done in a later step in this procedure.

  13. Determine the primary Microsoft SQL Server DAC port number:

    1. Using a text editor, open the ERRORLOG file in the root directory of your Microsoft SQL Server. For example:

      C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
      
    2. Search for the string “Dedicated admin,” and you will find an entry similar to this:

      2008-11-09 13:40:02.40 Server    Dedicated admin connection support was established for listening locally on port 1348
      
    3. Make note of the port number specified; it is used in a later step in this procedure.

  14. 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 Microsoft SQL Server data server. For example,

      SQL Server (TEAMSTER)
      
    2. Stop the service.

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

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

    1. Verify that Microsoft SQL Server has been configured to allow a remote DAC connection.

    2. Set the pds_dac_port_number configuration parameter:

      ra_config pds_dac_port_number, port
      

      Here, port is the DAC port number you found in step 12.

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

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

    5. Initialize the Replication Agent instance and migrate the Replication Agent instance's metadata by issuing the ra_migrate command.

      When this command executes in the first Replication Agent 15.2 instance, it will also initialize the Microsoft SQL Server. In subsequent Replication Agent 15.2 instances, it will only initialize the instance and migrate the instance's metadata.

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

  18. 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. Stop the service.

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

  20. Allow all users to access the primary databases.