DDLReplicationLevel

Enables replication of a subset of data definition language (DDL) statements (with restrictions) in an active standby replication scheme.

When the value of the DDLReplicationLevel connection attribute is set to 1, CREATE or DROP statements for tables, indexes, or synonyms are not replicated to the standby database. However, you can add or drop columns with the ALTER TABLE ADD or DROP COLUMN to or from a replicated table, and those actions are replicated to the standby database.

When the value of the DDLReplicationLevel connection attribute is set to 2 (the default), the following DDL statements (described in Oracle TimesTen In-Memory Database SQL Reference) are replicated to the standby and any subscribers:

When the value of the DDLReplicationLevel connection attribute is set to 3, the following DDL statements (described in Oracle TimesTen In-Memory Database SQL Reference) and those replicated when the value is set to 2 are replicated to the standby and any subscribers:

Some things to be aware of when setting this attribute to are:

  • If set to 0, open cursors are automatically closed with the implicit commit that occurs in a transaction that contains a DDL statement. You should not use cursors in this way in DDL transactions.

The value of this attribute can be modified by an ALTER SESSION statement, described in Oracle TimesTen In-Memory Database SQL Reference. For example:

ALTER SESSION SET DDL_REPLICATION_LEVEL=3;

Values set by ALTER SESSION override the value set by this attribute.

For examples of altering an active standby pair, see Altering an Active Standby Pair in Oracle TimesTen In-Memory Database Replication Guide.

To learn more about replicating DDL, see Making DDL Changes in an Active Standby Pair in Oracle TimesTen In-Memory Database Replication Guide.

Required Privilege

No privilege is required to change the value of this attribute.

Usage in TimesTen Scaleout and TimesTen Classic

This attribute is supported in TimesTen Classic but not supported in TimesTen Scaleout.

Setting

Set DDLReplicationLevel as follows:

Where to set the attribute How the attribute is represented Setting

C or Java programs or UNIX and Linux systems odbc.ini file in TimesTen Classic

DDLReplicationLevel

1 - Replicates ALTER TABLE ADD or DROP COLUMN to the standby database. Does not replicate CREATE and DROP operations for tables, indexes, or synonyms to the standby database.

2 (default) - Replicates creating and dropping of tables, indexes and synonyms.

3 - Replicates creating and dropping of views and sequences and replicates the results of the ttCacheUidPwdSet built-in procedure.

Windows ODBC Data Source Administrator

Not applicable

Restrictions

Replication of DDL operations has these restrictions:

  • CREATE TABLE AS SELECT statements are not replicated.

  • The CREATE INDEX statement is replicated only when the index is created on an empty table.

  • To control whether a table or sequence is included in an active standby pair replication scheme at the time of creation, use the DDLReplicationAction connection attribute.

  • Sequences with the CYCLE attribute cannot be replicated.

  • Objects are replicated only when the receiving database is of a TimesTen release that supports that level of replication, and is configured for an active standby pair replication scheme. For example, replication of sequences (requiring DDL_REPLICATION_LEVEL=3) to a database release prior to 11.2.2.7.0 is not supported. When DDLReplicationLevel value is set to 3, both the active and standby master databases need to be TimesTen Release 11.2.2.7 or later. When DDL_REPLICATION_LEVEL=2, the receiving database must be at least release 11.2.1.8.0 for replication of objects to be supported.

  • All restrictions for the ttCacheUidPwdSet built-in procedure apply.

  • When DDLReplicationLevel=1 or 2, you cannot alter a table to add a NOT NULL column to a table that is part of a replication scheme with the ALTER TABLE ... ADD COLUMN NOT NULL DEFAULT statement. You must remove the table from the replication scheme first before you can add a NOT NULL column to it. However, if DDLReplicationLevel=3, then you can alter a table to add a NOT NULL column to a table that is part of a replication scheme.