Upgrading Replication Agent for Microsoft SQL Server to 15.7.1 SP200

Upgrade Replication Agent for Microsoft SQL Server to version 15.7.1 SP200.

Note: Replication Agent 15.7.1 SP200 must be installed on the same host on which the primary Microsoft SQL Server is running.
  1. Stop the primary Microsoft SQL Server database service.
    1. From Windows Control Panel, go to Administrative Tools > Services, and find the service named SQL Server (SERVER).

      where SERVER is the name of your Microsoft SQL Server data server.

    2. Stop this service.
  2. Restart Microsoft SQL Server in a single-user mode.
    For example:
    "C:\Program Files\Microsoft SQL 
    Server\MSSQL.1\MSSQL\Binn\sqlservr.exe” -m -s 
    instanceName
    Note: The directory path may vary depending on the version of Microsoft SQL Server.

    where instanceName is the name of the Microsoft SQL Server instance.

  3. Open a command window.
  4. Set the SYBASE environment variables by changing to the SYBASE directory in which Replication Agent 15.7.1 is installed and executing the SYBASE.bat script.
  5. Change to:
    cd %SYBASE%\RAX-15_5\bin
    Note: The Replication Agent directory name for release 15.5 and later is RAX-15_5.
  6. Upgrade the Replication Agent instances.
    Option Description
    Upgrading instances within the same product installation
    • To upgrade a specific Replication Agent instance in the Replication Agent installation directory, at the command prompt, run:
      ra_admin.bat -u instance=<instance_name> 
    • To upgrade all Replication Agent instances in the Replication Agent installation directory, at the command prompt, run:
      ra_admin.bat -u all
    Upgrading instances in a separate product installation
    • To upgrade a specific Replication Agent instance in the specified source instance directory from the current product installation directory, run:
      ra_admin.bat -u <source_instance_directory> 
    • To upgrade all Replication Agent instances in the specified source installation directory from the current product installation directory, at the command prompt, run:
      ra_admin.bat -u <source_installation_directory>
    The configuration files are backed up before the upgrade for use in error recovery, if required. If an error occurs, the upgrade is rolled back. The all option requires relatively less space because upgrades are performed directly on instances within the current product installation directory, not to copies. However, reversing an upgrade is more difficult for the same reason.
  7. Start and log in to each of the Replication Agent for Microsoft SQL Server 15.7.1 SP200 instances and:
    1. Set the rs_charset configuration parameter to match the SAP Replication Server character set, as described in the Replication Agent Reference Manual.
    2. In the command line prompt, to ensure that Replication Agent can connect to both Microsoft SQL Server and SAP Replication Server, enter:
      test connection
    3. To remove the existing stored procedures installed, enter:
      server_admin remove
    4. To reinstall the sp_SybSetLogforReplTable, sp_SybSetLogforReplProc, and sp_SybSetLogforLOBCol stored procedures, and install the sp_SybTruncateTable stored procedure, enter:
      server_admin init
    5. To initialize the Replication Agent instance and migrate the Replication Agent instance metadata, enter:
      ra_migrate

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

      Note: You can use the ra_finalize_upgrade to manually force upgrade finalization of an instance from a previous version and prevent downgrade to the previous version. You must finalize the upgrade to enable any new functionality. See ra_finalize_upgradein the Replication Agent Reference Manual.
  8. In the command prompt, stop the primary Microsoft SQL Server database using CTRL+C or enter:
    shutdown
  9. Restart the primary Microsoft SQL Server database in multiuser mode.
    1. From the Windows Control Panel, go to Administrative Tools > Services, and find the service named SQL Server (SERVER).

      where SERVER is the name of your Microsoft SQL Server data server.

    2. Start this service.
  10. Restart the Replication Agent for Microsoft SQL Server instance.
  11. Resume replication.
    resume