Configuring the Primary Data Server and a Replication Agent Instance

Configure the primary data server and a Replication Agent instance.

  1. Stop the Microsoft SQL Server service:
    1. In Control Panel > Administrative Tools > Services, find the service named Microsoft SQL Server (SERVER), where SERVER is the name of your Microsoft SQL Server data server. For example:
      Microsoft SQL Server(TEAMSTER)
    2. Stop the service.
  2. Restart Microsoft SQL Server in single-user mode:
    1. Click Start > Control Panel > Administrative Tools > Services.
    2. Right-click your Microsoft SQL Server instance, and choose Properties.
    3. In the General tab, click Stop.
    4. Under Start parameters, enter:
      -m
      Click Start.
  3. Execute the resource file to create the Replication Agent instance. In your resource file, if you set start_instance to yes, this step also starts the Replication Agent instance. In your resource file, if you also configured initialize_instance to yes, this step also initializes the Microsoft SQL Server and the Replication Agent instance.
    After validating the resource file, create the Replication Agent instance:
    %SYBASE%\RAX-15_5\bin\ra_admin -r myra.rs
    Execution results are returned as either:
    • Response-file processing completed, or,

    • Response-file processing completed with errors

    See the Replication Agent Administration Guide.

  4. If start_instance is no in your resource file, change to the SYBASE directory and start the Replication Agent instance:
    cd  %SYBASE%\RAX-15_5\myra

    Execute the RUN file, for example:

    RUN_myra
  5. Use dsedit to update the Replication Server sql.ini to include an entry for the Replication Agent location.
    To use direct load materialization, also add the server name part of the connection name to the interfaces file. This entry should point to Replication Agent. For example:
    pds
    master tcp ether hostname 9030
    query tcp ether hostname 9030
  6. Verify the connection to Replication Agent.
    1. Open a command window in the %SYBASE% directory of your Replication Agent installation.
    2. Set the environment variables by executing the SYBASE.bat file.
    3. Log in to Replication Agent:
      isql –Usa –Psa_pass –Smyra
  7. If your resource file has initialize_instance set to no, initialize the primary data server and the Replication Agent instance:
    1. Open a command window, and log in to the Replication Agent instance.
    2. Create server xlog objects:
      server_xlog init
    3. Shut down Replication Agent:
      shutdown
  8. 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

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

    2. Issue the shutdown command.
  9. Restart Microsoft SQL Server in multiuser mode (normal start):
    1. In Control Panel > Administrative Tools > Services, find the service named Microsoft SQL Server (SERVER), where SERVER is the name of your Microsoft SQL Server data server. For example:
      Microsoft SQL Server(TEAMSTER)
    2. Start the service.
  10. Restart Replication Agent.
    1. Change to the SYBASE directory and start the Replication Agent instance:
      cd %SYBASE%\RAX-15_5\myra
    2. Execute the RUN file, for example:
      RUN_myra
  11. Initialize Replication Agent.
    1. Log in to Replication Agent using isql:
      isql –Usa –P –Smyra

      where myra is the name of Replication Agent.

    2. Issue:
      ra_admin init

The Replication Agent instance is now running, and the primary data server and the Replication Agent instance have been initialized.