pdb_setrepddl

(Oracle and Microsoft SQL Server only) Returns DDL replication status and enables or disables replication for DDL statements.

Note: This command is available only for Oracle and Microsoft SQL Server.

Syntax

For Replication Agent for Oracle:

pdb_setrepddl [ 
   {   tablename 
     | procname
     | sequence_name  
     | objects, all  
     | user, { all | user } ] 
     | stmt, { all | ddl_statement | ddl_statement_keyword } 
     | owner, { all | ownername } 
    } ] 
   [
        { enable[, override] | disable[, override] | default }
      | { enable, { all | marked | unmarked } }
    ]

For Replication Agent for Microsoft SQL Server:

pdb_setrepddl [enable|disable]

Parameters

Examples

Usage

  • In addition to enabling DDL replication using pdb_setrepddl command, you must set the Replication Agent ddl_username and ddl_password parameters.

  • A database replication definition that enables DDL is required for DDL replication. If the use_rssd configuration parameter is set to true, the database replication definition must exist in the RSSD of the primary Replication Server before the Replication Agent resume command is invoked.

  • Only DDL statements that have identical syntax in the primary and replicate databases can be replicated. Replication Agent sends DDL statements using the syntax of the statements in the primary database.

  • If Replication Agent has not been initialized, the pdb_setrepddl command returns an error.

  • The pdb_setrepddl command can only use the enable and disable options when the Replication Agent instance is in the Admin or Replication Down state.

  • When using the all, marked, and unmarked keywords for DDL replication and multiple Replication Agents:
    • You can also enable the replication of all DDL by omitting the all keyword:

      pdb_setrepddl enable
    • The marked and unmarked keywords do not override each other. For example, to enable the replication of both DDL for objects that have not been marked by any Replication Agent instance within the Replication Agent group and DDL for objects that have been marked by the invoking Replication Agent instance:

      pdb_setrepddl enable, unmarked
      pdb_setrepddl enable, marked

      However, marked and unmarked will override previous use of the all keyword, and the all keyword will override previous use of the marked and unmarked keywords.

Oracle Privileges for DDL Replication:
Note: Issuing GRANT ALL PRIVILEGES TO DDLUSER turns the DDL user into a superuser, like the SYS or SYSTEM user.
Revoke user permission from the DDL user to execute:
  • GRANT ALTER DATABASE
  • GRANT ALTER ROLLBACK SEGMENT
  • GRANT ALTER SYSTEM
  • GRANT ALTER TABLESPACE
  • GRANT ANALYZE ANY
  • GRANT AUDIT ANY
  • GRANT AUDIT SYSTEM
  • GRANT CREATE DATABASE LINK
  • GRANT CREATE ROLLBACK SEGMENT
  • GRANT CREATE TABLESPACE
  • GRANT DROP PUBLIC DATABASE LINK
  • GRANT DROP ROLLBACK SEGMENT
  • GRANT DROP TABLESPACE
  • GRANT LOCK ANY TABLE
Related reference
ddl_password
asm_username