Deleting a Replication Agent Instance

Delete a Replication Agent instance with ra_admin.

Prerequisites
  • Shut down the Replication Agent instance, if it is running.

  • If the Replication Agent software is installed on a Microsoft Windows platform, verify that none of the files in the instance subdirectories are open, and that no application or window is accessing the instance subdirectories.

Note: Set the SYBASE environment before you invoke the ra_admin utility.
Note: If you delete a Replication Agent instance, Replication Agent does not unmark any primary database objects marked for replication, nor does it delete its transaction log objects. Before you shut down and delete a Replication Agent instance, unmark primary database objects and deinitialize the Replication Agent so that it removes the objects it created in the primary database.
Task
  1. On the Replication Agent host machine, open an operating system command window.
  2. Navigate to the Replication Agent bin directory:
    • On Windows platforms:
      cd %SYBASE%\RAX-15_5\bin
      where %SYBASE% is the path to the Replication Agent installation directory.
    • On UNIX platforms:
      cd $SYBASE/RAX-15_5/bin
      where $SYBASE is the path to the Replication Agent installation directory.
  3. In the Replication Agent bin directory, invoke ra_admin with the -d option to delete a Replication Agent instance:
    ra_admin -d inst_name
    where inst_name is the name of the Replication Agent instance you want to delete.

    After you invoke ra_admin with the -d option, you see:

    Are you sure you want to delete the Replication Agent instance inst_name? [y/n]
  4. Enter y to delete the Replication Agent instance.

    After the instance is deleted, the operating system prompt returns.

    If the instance is running when you invoke ra_admin with the -d option, the utility returns:
    Cannot delete Replication Agent instance 'inst_name' because it is currently running.

    To shut down a Replication Agent instance, log in to its administrative port, and use the shutdown command.

  5. Verify that the Replication Agent instance was deleted properly using one of these methods:
    • Invoke ra_admin with the -v option, and specify the name of the Replication Agent instance:
      ra_admin -v new_inst
      where new_inst is the name of the Replication Agent instance.

      When you verify a Replication Agent instance with the -v option, the utility verifies the instance by checking for an instance directory with the specified instance name under the Replication Agent base directory, and checking all of the subdirectories under the Replication Agent instance directory.

    • Invoke ra_admin with the -l option:
      ra_admin -l

      The -l option lists all verifiable Replication Agent instances, which should include the new one you just deleted.

    • As an alternative to using ra_admin, you can use operating system commands to verify that the Replication Agent instance directories were deleted correctly.

    Note: On Microsoft Windows platforms, if any application is accessing a file or directory associated with a Replication Agent instance when you delete the instance, the open file or directory is not deleted. An error message informs you of the file or directory not deleted.
    To finish deleting a Replication Agent instance after a file or directory access conflict occurs on a Microsoft Windows platform, you must:
    • Verify that the file or directory is not open in any application

    • Manually delete the file or directory

  6. Verify that the Replication Agent instance was deleted properly using one of these methods:
Related concepts
Replication Agent Instance Shutdown
Related tasks
Preparing to Use the Utilities