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

StepsUpgrading when the previous Replication Agent version and Replication Agent 15.2 are on the same Windows host

  1. For each existing Replication Agent for Microsoft SQL Service instance, Sybase recommends that you 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. 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. Verify that your primary data server meets the requirements described in “Microsoft SQL Server requirements”.

  5. Stop the Microsoft SQL Server Analysis Service. From the Microsoft Windows Control Panel, choose Administrative Tools | Services, and find the service named SQL Server Analysis Service(SERVER), where SERVER is the name of your Microsoft SQL Server data server. Stop this service.

  6. Make sure Microsoft SQL Server is configured to allow a remote DAC connection. Use the Microsoft SQL Server Surface Area Configuration tool to enable a remote DAC connection:

    1. From the Windows Start menu, choose Microsoft SQL Server | Surface Area Configuration | Configuration Tools | SQL Server Surface Area Configuration | Surface Area Configuration for Features.

    2. In the Surface Area Configuration for Features window, choose DAC under MSSQLSERVER/Database Engine, and make sure the Enable remote DAC check box is selected.

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

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

  9. 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 instances that did not upgrade successfully, see the administration logs (…\RAX-15_2\admin_logs). After you correct the problem, re-run this command. Be aware that this command does not affect those Replication Agent instances that have already been successfully upgraded.

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

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

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

  13. To prevent any loss of replicated data, deny users other than the previously existing Replication Agent pds_username users from any further access to the primary databases.

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

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

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

  17. 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 can be in the CLASSPATH.

  18. 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 9.

    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.

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

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

  21. Log in to each of the Replication Agent Microsoft SQL Server 15.2 instances and resume replication by issuing the resume command.

  22. Allow all users to access the primary databases.