Setting ddl_username and ddl_password

To replicate DDL in Oracle, the pdb_setrepddl command must be used to set filtering rules accordingly. You must also set the Replication Agent ddl_username and ddl_password parameters. The ddl_username parameter is the database user name that should be used to execute the replicated DDL command at the target database. This user must have permission to execute all replicated DDL commands at the target database. The ddl_password parameter is the password corresponding to the database user name. In addition, the ddl_username database user must have permission to issue the ALTER SESSION SET CURRENT_SCHEMA command for any primary database user that might issue a DDL command to be replicated. See the Replication Agent Reference Manual.


Special usage notes

The value of the ddl_username parameter cannot be the same as the value of the maintenance user defined in Replication Server for the replicate connection. If these names are the same, a Replication Server error results.

The value of the ddl_username parameter is sent in the LTL for all replicated DDL statements. When DDL is replicated, Replication Server connects to the replicate database using the user ID and password specified by the ddl_username and ddl_password parameters. Replication Server then issues the following command:

ALTER SESSION SET CURRENT_SCHEMA=user

Here, user is the user ID that generated the DDL operation at the primary database. The actual DDL command is then executed against the replicate database. If the user ID specified in ddl_username does not have permission to issue the ALTER SESSION SET CURRENT_SCHEMA or to execute the DDL command against the user schema, the command fails.

NoteTo replicate DDL, Replication Server must have a database-level replication definition with replicate DDL set in the definition. See the Replication Server Reference Manual.


DDL commands and objects filtered from replication

The following DDL commands are not replicated:

The following objects are not replicated:

NoteThe truncate table command is replicated as rs_truncate.