Returns the names of Replication Agent system objects; creates them in the primary database, or removes them from the primary database.
For Oracle and Microsoft SQL Server, ra_admin verifies that permissions are valid for Replication Agent to obtain system data from the primary database. For Oracle, ra_admin also checks the condition of the primary database to determine whether archiving is turned on, and then loads the RASD with system data from the primary database.
ra_admin init
This command initializes Replication Agent, creating any required transaction log base components.
ra_admin refresh
This command reinitializes Replication Agent, creating or reloading any required transaction log base components.
ra_admin deinit
This command removes any Replication Agent transaction log base components.
ra_admin deinit, force
This command removes any Replication Agent transaction log base components and ignores any individual errors that occur during removal.
When you invoke ra_admin with no option, it returns the actual names (not synonyms or aliases) of all Replication Agent system objects in the primary database. For Oracle and Microsoft SQL Server, if you have initialized Replication Agent, it returns the name of the component and the primary database instance name.
See the section for your specific primary data server in the Replication Agent Primary Database Guide for more information on Replication Agent object names.
If you invoke ra_admin with no option and the Replication Agent system objects do not exist in the primary database, or the RASD has not been initialized (for Oracle and Microsoft SQL Server), the command returns no information.
If you invoke ra_admin with the init keyword, the truncation point is moved to the end of the primary database transaction log.
Generates a SQL script that creates the Replication Agent tables and procedures in the primary database.
Saves the generated script in a file called partinit.sql in the RAX-15_5\inst_name\scripts\xlog directory, where inst_name is the name of the Replication Agent instance.
Executes the script to create the Replication Agent system objects in the primary database (if the value of the pdb_auto_run_scripts configuration parameter is true).
After the script completes successfully, moves the partinit.sql file to the RAX-15_5\inst_name\scripts\xlog\installed directory.
If the create script fails, it is stored in a file (partinit.sql) in the RAX-15_5\inst_name\scripts\xlog directory and the transaction log is not created. You can examine the script by viewing the partinit.sql file.
If you invoke ra_admin with the init keyword and the Replication Agent objects already exist in the primary database or the RASD has been initialized (for Oracle and Microsoft SQL Server), ra_admin returns an error message.
If you invoke ra_admin with the refresh keyword, the truncation point is moved to the end of the log if Replication Agent is not already initialized. However, if Replication Agent is already initialized, the truncation point is not moved.
For UDB, ra_admin uninstalls the JAR files from the primary database (the JARs are installed by the ra_admin init command). You must use ra_admin deinit to deinitialize Replication Agent for UDB and remove the truncation stored procedures and JARs from the database.
Generates a SQL script that deletes the tables and procedures required for the system objects in the primary database.
Saves the generated script in a file called partdeinit.sql in the RAX-15_5\inst_name\scripts\xlog directory, where inst_name is the name of the Replication Agent instance.
Executes the script to delete the Replication Agent objects from the primary database (if the value of the pdb_auto_run_scripts configuration parameter is true).
After the script completes successfully, moves the partdeinit.sql file to the RAX-15_5\inst_name\scripts\xlog\installed directory.
If the script fails, it is stored in a file (partdeinit.sql) in the RAX-15_5\inst_name\scripts\xlog directory and the Replication Agent objects are not deleted from the primary database. You can examine the script by viewing the partdeinit.sql file.
When you invoke ra_admin with the deinit keyword followed by the force keyword, the partdeinit.sql script continues executing, even if errors occur. The force keyword may be useful when a previous remove operation failed and the partdeinit.sql script terminated with an error.
If you invoke ra_admin with the deinit keyword, and Replication Agent objects do not exist in the primary database or the RASD has not been initialized (for Oracle or Microsoft SQL Server), ra_admin returns an error message.
If you invoke ra_admin with the deinit keyword and any objects in the primary database are still marked for replication, ra_admin returns an error message.
You can use the pdb_setrepproc and pdb_setreptable commands to determine which stored procedures and tables in the primary database are still marked. You also can use the pdb_setrepddl command to determine if DDL is enabled.
Even if objects are marked in the primary database, you can use ra_admin with the deinit keyword followed by the force keyword to unmark any marked objects, and then remove the transaction log objects.
If you invoke ra_admin with no option, the command is valid when the Replication Agent instance is in the Admin, Replicating, or Replication Down states.
If you invoke ra_admin with either the init or deinit keyword, the command is valid only when the Replication Agent instance is in the Admin or Replication Down state.
The ra_admin init command verifies that these privileges have been granted to pds_username:
These privileges are necessary for the ra_dumptran and ra_helpop commands to function properly. These privileges are not required for replication, only for using the ra_dumptran and ra_helpop commands, which are used in debugging and troubleshooting. If these privileges have not been granted at the time you invoke ra_admin init, a warning message is returned and logged in the Replication Agent log file.
For more information about the Replication Agent transaction log, see the section for your specific primary data server in the Replication Agent Primary Database Guide.