pdb_setrepddl

Returns DDL replication status and enables or disables replication for DDL statements.

Syntax

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 } }
    ]

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.
For Oracle 10g and 11g, grant user permission to the DDL user to execute:
  • GRANT ALTER ANY INDEX
  • GRANT ALTER ANY INDEXTYPE
  • GRANT ALTER ANY PROCEDURE
  • GRANT ALTER ANY TABLE
  • GRANT ALTER ANY TRIGGER
  • GRANT ALTER ANY TYPE
  • GRANT ALTER SESSION
  • GRANT BECOME USER
  • GRANT CREATE ANY INDEX
  • GRANT CREATE ANY INDEXTYPE
  • GRANT CREATE ANY PROCEDURE
  • GRANT CREATE ANY SYNONYM
  • GRANT CREATE ANY TABLE
  • GRANT CREATE ANY TRIGGER
  • GRANT CREATE ANY TYPE
  • GRANT CREATE ANY VIEW
  • GRANT CREATE INDEXTYPE
  • GRANT CREATE MATERIALIZED VIEW
  • GRANT CREATE PROCEDURE
  • GRANT CREATE PUBLIC SYNONYM
  • GRANT CREATE SYNONYM
  • GRANT CREATE TABLE
  • GRANT CREATE TRIGGER
  • GRANT CREATE TYPE
  • GRANT CREATE VIEW
  • GRANT DELETE ANY TABLE
  • GRANT DROP ANY INDEX
  • GRANT DROP ANY INDEXTYPE
  • GRANT DROP ANY MATERIALIZED VIEW
  • GRANT DROP ANY PROCEDURE
  • GRANT DROP ANY SYNONYM
  • GRANT DROP ANY TABLE
  • GRANT DROP ANY TRIGGER
  • GRANT DROP ANY TYPE
  • GRANT DROP ANY VIEW
  • GRANT DROP PUBLIC SYNONYM
  • GRANT INSERT ANY TABLE
  • GRANT SELECT ANY TABLE
  • GRANT UPDATE ANY TABLE
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