Deinitializing a Replication Agent Instance

Deinitialize an instance of Replication Agent, if that instance is no longer required, and remove its objects from the primary database.

Prerequisites

The Replication Agent instance must be running in the Admin state to remove its objects from the primary database and to deinitialize Replication Agent.

Task
  1. Log in to the Replication Agent instance with the administrator login.
  2. Verify that the Replication Agent objects exist in the primary database:
    ra_admin

    If there are no Replication Agent objects in the primary database, the ra_admin command returns no information, and you do not need to complete this task.

    If objects exist for this Replication Agent instance, the ra_admin command returns a list of the names of the objects.

  3. Disable replication of all marked tables in the primary database:
    pdb_setreptable all, disable
  4. Disable replication for all marked procedures in the primary database:
    pdb_setrepproc all, disable
  5. Unmark all marked tables and stored procedures in the primary database:
    pdb_setreptable all, unmark
    pdb_setrepproc all, unmark
  6. Remove the Replication Agent objects:
    ra_admin deinit

    After you invoke the ra_admin command with the deinit keyword, Replication Agent generates a script that removes the objects from the primary database, and deinitializes Replication Agent.

    If the deinitialization was successful, the script is stored in a file named cleanup_pdb_for_replication_deinit.sql in the RAX-15_5\inst_name\scripts\cleanup directory. Execute this script to remove Replication Agent instance objects.