You can delete a Replication Agent instance at any time by invoking the ra_admin utility with the -d option.
Before you delete a Replication Agent instance, you should:
Remove the transaction log associated with that instance (if any). See “Removing the Replication Agent transaction log” for more information.
Shut down the Replication Agent application. See “Shutting down a Replication Agent instance” for more information.
If the Replication Agent software is installed on a Windows NT or Windows 2000 host machine, make sure that none of the files in the instance subdirectories are open and that no application or window is in any of the instance subdirectories.
On Windows NT and Windows 2000, if any application or
window is in a file or subdirectory associated with a Replication Agent instance
at the time you delete the instance, the “open” file
or subdirectory will not be deleted and the deletion will be incomplete.
An error message informs you of the file or subdirectory not deleted.
In this event, you must verify that the file or subdirectory is
not open in any application or window, and then manually delete
it.
To delete a Replication Agent instance
Open a window with an operating system prompt.
Use the following command to make the Replication Agent bin directory the current directory:
cd \%SYBASE%\rax-12_5\bin
where %SYBASE% is the Replication Agent installation directory.
At the operating system prompt, 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 the ra_admin utility with the -d option, the following message appears:
Are you sure you want to delete the 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, you will receive an error message:
Cannot delete Replication Agent instance 'inst_name' because it is currently running.
To delete an instance that is running, shutdown the
instance first by logging into its administrative port and using
the shutdown command, then delete it. See “Shutting down a Replication Agent instance” for more information.
Verify that the Replication Agent instance was deleted.
There are several different ways to verify that a Replication Agent instance was deleted properly.
Invoke the ra_admin utility with the -v option specifying 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.
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 directory structure (shown in Figure 3-1) was removed.