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:
Shut down the Replication Agent instance, if it is running. For more information, see “Shutting down the Replication Agent instance”.
If the Sybase 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.
You must set the SYBASE environment before you invoke
the Sybase Replication Agent ra_admin utility. See “Preparing to use the utilities” for more
information.
To delete a Replication Agent instance
Open an operating system command window on the Replication Agent host machine.
At the operating system prompt, navigate to the Sybase Replication Agent bin directory.
On Windows platforms, enter:
cd %SYBASE%\RAX-15_0\bin
where %SYBASE% is the path to the Sybase Replication Agent installation directory.
On UNIX platforms, enter:
cd $SYBASE/RAX-15_0/bin
where $SYBASE is the path to the Sybase Replication Agent installation directory.
In the Sybase Replication Agent bin directory, invoke the ra_admin utility 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, the following message appears:
Are you sure you want to delete the Sybase Replication Agent instance inst_name? [y/n]
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 Sybase 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. For more information, see “Shutting down the Replication Agent instance”.
Verify that the Replication Agent instance was deleted properly using one of the following methods:
Invoke the ra_admin utility with the -v option, and specify the name of the deleted Replication Agent instance:
ra_admin -v inst_name
where inst_name is the name of the deleted Replication Agent instance.
When you verify a Replication Agent instance with the -v option, the utility looks for an instance directory with the specified instance name under the Sybase Replication Agent base directory, and looks for the correct subdirectories under the Replication Agent instance directory.
Invoke the ra_admin utility with the -l option:
ra_admin -l
The -l option lists all verifiable Replication Agent instances, which should not include the one you just deleted.
As an alternative to using the ra_admin utility, you can use operating system commands to verify that the Replication Agent instance directories were deleted correctly.
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
If you delete a Sybase Replication Agent instance, Sybase Replication Agent does
not unmark any primary database objects marked for replication, nor
does Sybase Replication Agent delete its transaction log objects. Before you shut
down and delete a Sybase Replication Agent instance, you must unmark primary database
objects and delete the transaction log.