Configuring the Primary Data Server and a Replication Agent Instance for the First Time

Configure the primary data server and a Replication Agent instance for the first time.

  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. Open a command window, and restart Microsoft SQL Server in single-user mode:
    "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe” -m -s instanceName

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

  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 the resource file has been validated, use the ra_admin utility to create the Replication Agent instance using the -r parameter. For example:

    %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 your resource file set start_instance to no, 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 the dsedit utility to update the Replication Server sql.ini file with the Replication Agent location, and verify the connection to the 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 –P –Smyra

      where myra is the name of Replication Agent.

  6. 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. Issue this command to create server xlog objects:
      server_xlog init
    3. Issue this command to shutdown Replication Agent:
      shutdown
  7. 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.
  8. 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.
  9. 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
  10. 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:
      pdb_xlog init

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