Deleting a Replication Agent instance

You can delete a Replication Agent instance at any time by invoking ra_admin with the -d option.

Before you delete a Replication Agent instance, you should:

NoteYou must set the SYBASE environment before you invoke the Replication Agent ra_admin utility. See “Preparing to use the utilities” for more information.

StepsDeleting a Replication Agent instance

  1. Open an operating system command window on the Replication Agent host machine.

  2. At the operating system prompt, navigate to the Replication Agent bin directory.

    • On Windows platforms:

      cd %SYBASE%\RAX-15_2\bin
      

      Here, %SYBASE% is the path to the Replication Agent installation directory.

    • On UNIX platforms:

      cd $SYBASE/RAX-15_2/bin
      

      Here, $SYBASE is the path to the Replication Agent installation directory.

  3. In the Replication Agent bin directory, invoke the ra_admin utility with the -d option to delete a Replication Agent instance:

    ra_admin -d inst_name
    

    Here, inst_name is the name of the Replication Agent instance you want to delete.

    After you invoke ra_admin with the -d option, the following message appears:

    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 an error message:

    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. See “Shutting down the Replication Agent instance”.

  5. Verify that the Replication Agent instance was deleted properly using one of the following methods:

    NoteOn 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:

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