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:
-
CREATE TABLE or DROP TABLE (including global temporary tables but not
CREATE TABLE AS SELECT
)
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:
-
Replication of the results to the standby master when setting the cache administration user name and password with the
ttCacheUidPwdSet
built-in procedure. You do not need to stop and restart the cache agent or replication agent to execute thettCacheUidPwdSet
built-in procedure. For more information, see Changing Cache User Names and Passwords in Oracle TimesTen In-Memory Database Cache Guide or ttCacheUidPwdSet.
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 |
|
|
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. WhenDDLReplicationLevel
value is set to 3, both the active and standby master databases need to be TimesTen Release 11.2.2.7 or later. WhenDDL_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
or2
, you cannot alter a table to add aNOT NULL
column to a table that is part of a replication scheme with theALTER TABLE ... ADD COLUMN NOT NULL DEFAULT
statement. You must remove the table from the replication scheme first before you can add aNOT NULL
column to it. However, ifDDLReplicationLevel=3
, then you can alter a table to add aNOT NULL
column to a table that is part of a replication scheme.