| Oracle® TimesTen In-Memory Database System Tables and Limits Reference Release 11.2.1 Part Number E17114-01 |
|
|
View PDF |
TimesTen stores metadata about replication in replication tables in your data store.
Your applications can read the replication tables, but it cannot update them. If your application defines a table with the same name as a replication table, then your application can read a replication table by prefixing the replication table name with TTREP. For example, SELECT * FROM TTREP.REPTABLES selects rows from the REPTABLES replication table.
Information specific to replication tables:
Locks acquired by users on replication tables may prevent others from defining data or executing the SQLPrepare ODBC function or the Connection.prepareStatement JDBC method.
The last character in name columns is always a space. Therefore, while the column length for name columns is 31, the maximum object name length is 30.
On 64-bit systems, TimesTen replication tables declare certain fields as data type TT_BIGINT. When retrieving these columns with an ODBC program, the application must bind them using SQL_C_BINARY. For information about SQL_C_BINARY, see ODBC documentation.
Note:
Some tables contain columns namedSYSnumber. Because these columns contain values used internally by TimesTen, they are not documented in this chapter.The TTREP.CLIENTFAILOVER table is reserved for internal or future use.
By default PUBLIC has SELECT privileges on various system and replication tables and EXECUTE privileges on various PL/SQL objects. You can see the list of objects by using this query:
SELECT * FROM sys.dba_tab_privs WHERE grantee='PUBLIC';
The ADMIN or SELECT ANY TABLE privilege is required to access other system and replication tables and views unless otherwise noted in the description of the table or view.
The TTREP.REPELEMENTS table describes elements in a replication scheme. In this release, the only elements recorded are tables.
Columns
| Column name | Type | Description |
|---|---|---|
| REPLICATION_
NAME |
TT_CHAR(31) NOT NULL | Name for a replication scheme. |
| REPLICATION_
OWNER |
TT_CHAR(31) NOT NULL | The replication scheme's owner. |
| ELEMENT_NAME | TT_CHAR(31) NOT NULL | The replication name for this element, logically different from the DS_OBJ_NAME of the underlying data base object. For example, the ELEMENT_NAME for a replicated table may differ from the table name. This name must be unique in a replication scheme. |
| ELEMENT_TYPE | TT_CHAR (1) NOT NULL | The type of this replication element:
'T' – Table 'D' – Data store 'S' – Sequence |
| OWNED_BY_
SYSTEM |
BINARY (1) NOT NULL | 0x01 - Element is maintained by the system and cannot be directly referenced by SQL statements.
0x00 - Element is defined and maintained by a user. |
| MASTER_ID | TT_BIGINT NOT NULL | The TT_STORE_ID for the master or propagator of this element. |
| OLD_MASTER_ID | TT_BIGINT NOT NULL | The TT_STORE_ID for the immediately preceding MASTER for this element. -1 if none. |
| IS_PROPAGATOR | BINARY (1) NOT NULL | 0 if the MASTER_ID identifies a true MASTER store. 1 if it, in fact, identifies a -PROPAGATOR. |
| DS_OBJ_NAME | TT_CHAR(31) NOT NULL | If this replication refers to a single, underlying data base object, then this is its name. Specifically, it is the name of the replicated table if ELEMENT_TYPE = 'T'.
it is NULL if ELEMENT _TYPE = 'D'. DS_OBJ_OWNER._DS_OBJ_NAME need not be unique in a replication scheme, but each occurrence must be associated with a distinct ELEMENT_NAME. |
| DS_OBJ_OWNER | TT_CHAR(31) NOT NULL | The owner of the replication element – if defined. NULL otherwise. This is always the owner of the table. DS_OBJ_OWNER._DS_
OBJ_NAME need not be unique in a replication scheme, but each occurrence must be associated with a distinct ELEMENT_NAME. |
| DS_OBJ_ID | TT_INTEGER | If the ELEMENT_TYPE = 'T':
Table ID - Table is in the owning (master or propagator) data store. 1- Table is in the subscriber data store. If the ELEMENT_TYPE = 'D': 0 - Data store is a master or propagator. 1- Data store is a subscriber. NULL - If the store has been migrated, restored or upgraded from an earlier version. |
| DURABLE_
TRANSMIT |
BINARY (1) NOT NULL | 0 - Transactions are made durable before they are transmitted (default).
1 - Transactions are not made durable before they are transmitted. |
| CONFLICT_CHECKS | BINARY (8) NOT NULL | A bit map indicating which conflict detectors are enabled. This field is either: 0x0000000000000000 (no configured conflict detector, the default) or: 0x0000000000000001 (ROW TIMESTAMP conflict detector). |
| TS_COLUMN_NAME | TT_CHAR (31) | The name of the timestamp column specified in the CheckConflicts portion of a CREATE MATERIALIZED VIEW statement. This column must be of type BINARY(8) and permit NULL values. |
| TS_EXCEPTION_
ACTION |
TT_CHAR (1) NOT NULL | The action to take upon detecting a conflict by a timestamp-based detector. The action is specified by the ON EXCEPTION clause in the CheckConflicts portion of a CREATE MATERIALIZED VIEW statement. They appear in this column as:
'\0' - action not defined 'N' - NO ACTION 'R' - rollback transaction (default) |
| TS_UPDATE_RULE | TT_CHAR (1) NOT NULL | The rule for maintaining the timestamp for a timestamp-based conflict detector:
'\0'- rule not defined 'U' - by user 'S' - by system (default) |
| TS_REPORT_FILE | TT_VARCHAR (1000) NOT INLINE | The name of the file to which the replication agent reports timestamp conflicts.
This file is specified by the REPORT TO clause in the |
| IS_MASTER_
PROPAGATOR |
BINARY (1) NOT NULL | Indicates if the store is both a master and a propagator. |
| EXTERNAL_DB | TT_CHAR (1) | |
| REPORT_FORMAT | TT_CHAR(1) | The report format for the replication conflict file:
NULL - No report file specified, therefore no format 'S' - Standard format 'X' - XML format |
The REPLICATIONS table collects together general information about all replication schemes in which the local store participates. The table indicates whether a replication scheme was created by ttRepAdmin -upgrade or by a CREATE MATERIALIZED VIEW statement.
Columns
| Column name | Type | Description |
|---|---|---|
| REPLICATION_NAME | TT_CHAR(31) NOT NULL | Name for a replication scheme. |
| REPLICATION_OWNER | TT_CHAR (31) NOT NULL | The replication scheme's owner. |
| REPLICATION_ORIGIN | TT_CHAR (1) NOT NULL | 'U' - created by ttRepAdmin -upgrade
'C' - created by CREATE REPLICATION (or a ttRepAdmin command that was translated into CREATE REPLICATION). |
| REPLICATION_VERSION | TT_INTEGER NOT NULL | The number of ALTER REPLICATION commands applied to this replication scheme after its initial creation. |
| SOURCE_STORE_ID_ALIGN | TT_INTEGER NOT NULL | Used internally to properly align the SOURCE_STORE_ID column. |
| SOURCE_STORE_ID | TT_BIGINT NOT NULL | If this replication scheme was created by restoring it from a backup, the store ID of the store from which this replication scheme was backed up and restored. otherwise -1 (the invalid store ID). |
| CHECKSUM | TT_BIGINT | Indicates that the replication scheme has been updated. |
The REPNETWORK table stores information on interfaces used by the replication agent when two peers communicate. Each row represents a communication path between master and subscriber and describes either the sending or receiving interface used.
Columns
| Column name | Type | Description |
|---|---|---|
| REPLICATION_NAME | TT_CHAR (31) NOT NULL | Name of the replication scheme. |
| REPLICATION_OWNER | TT_CHAR (31) NOT NULL | The owner of the replication scheme. |
| TT_STORE_ID | TT_BIGINT NOT NULL | Unique, system-generated identifier for a HOST_NAME/TT_STORE_NAME pair. |
| SUBSCRIBER_ID | TT_BIGINT NOT NULL | The identifier for a store that subscribes to at least one replication element owned by TT_STORE_ID. |
| HOST_NAME | TT_VARCHAR (200) NOT NULL NOT INLINE | Name associated with the network interface. |
| PRIORITY | TT_INTEGER NOT NULL | Integer from 1-99 that denotes the priority of the IP address. |
| INTERFACE | TT_CHAR (1) | Indicates whether the HOST_NAME refers to an interface on the sending side ('S') or on the receiving side ('R'). |
The REPPEERS table displays status information about the stores in a replication scheme. After the initial upgrade, the REPPEERS table contains peer information only about the local store and other stores that it transmits updates to.
Columns
| Column name | Type | Description |
|---|---|---|
| REPLICATION_NAME | TT_CHAR(31) NOT NULL | Name for a replication scheme. |
| REPLICATION_OWNER | TT_CHAR(31) NOT NULL | The replication scheme's owner |
| TT_STORE_ID | TT_BIGINT NOT NULL | Unique, system-generated identifier for a HOST_NAME/TT_STORE_NAME pair. |
| SUBSCRIBER_ID | TT_BIGINT NOT NULL | The identifier for a store that subscribes to at least one replication element owned by TT_STORE_ID. If a valid ID then this record describes the status of TT_STORE_ID/SUBSCRIBER_ID as a sender/subscriber pair. |
| COMMIT_TIMESTAMP | TT_INTEGER | This field and COMMIT_SEQNUM together store the value of the Commit Ticket Number of the refreshed transaction that the subscriber has just committed. |
| COMMIT_SEQNUM | TT_INTEGER | This field and COMMIT_TIMESTAMP together store the value of the Commit Ticket Number of the refreshed transaction that the subscriber has just committed. |
| SENDLSNHIGH | TT_INTEGER | The log file number of the highest TT_STORE_ID log sequence number sent to and acknowledged by SUBSCRIBER_ID. |
| SENDLSNLOW | TT_INTEGER | The log file offset of the highest TT_STORE_ID log sequence number sent to and acknowledged by SUBSCRIBER_ID. |
| REPTABLESLSNHIGH | TT_INTEGER | For TimesTen internal use. |
| REPTABLESLSNLOW | TT_INTEGER | For TimesTen internal use. |
| STATE | TT_INTEGER | The state of replication kept by TT_STORE_ID with respect to this SUBSCRIBER_ID:
0 - START: Replication is in the active state and all log updates are retained until they have been applied at SUBSCRIBER_ID. 1 - PAUSE: Replication is not in the active state but all log updates are retained until they have been applied at SUBSCRIBER_ID. 2 - STOP: Replication is not in the active state and log updates are not retained. 4 - FAILED: Replication is not in the active state, log updates are not retained, and the log updates that need to be retained exceed the user defined threshold - TTREP.REPSTORES.FAIL_ THRESHOLD. When this state has been communicated to SUBSCRIBER_ID it is changed to STOP. |
| TIMESEND | TT_INTEGER | The timestamp (in seconds) for the time of the last known successful transmission from TT_STORE_ID to SUBSCRIBER_ID. |
| TIMERECV | TT_INTEGER | The timestamp (in seconds) for the time TT_STORE_ID last received a transmission from SUBSCRIBER_ID. |
| PROTOCOL | TT_INTEGER | A number in the range 0 to 5 indicating the protocol level that replication uses for communication between TT_STORE_ID and SUBSCRIBER_ID. A higher number indicates a newer protocol. |
| LATENCY | BINARY_DOUBLE | An estimate of the time interval (in seconds) from the commit of a transaction on TT_STORE_ID to its receipt of acknowledgement that it has been applied at the subscriber identified by SUBSCRIBER_ID. |
| TPS | TT_INTEGER | An estimate of the number of transactions per second that are committed on TT_STORE_ID and successfully received by the subscriber identified by SUBSCRIBER_ID. |
| RECSPERSEC | TT_INTEGER | An estimate of the number of records per second retrieved by the subscriber identified by SUBSCRIBER_ID from the store TT_STORE_ID. |
| TRACK_ID | TT_TINYINT | Identifies a replication track used in application-directed parallel replication. |
| CTNLISTINDEX | TT_INTEGER | For internal use by the replication agent. |
The REPSTORES table lists the replication attributes of store's that participate in every TimesTen replication scheme in which the local store participates. Each store is identified by a unique TT_STORE_ID that TimesTen replication assigns to it. A TT_STORE_ID may appear at most once for a given replication scheme, but may appear multiple times in the REPSTORES table. Various replication schemes may define different replication store attributes for the same store.
Columns
| Column name | Type | Description | |
|---|---|---|---|
| REPLICATION_NAME | TT_CHAR(31) NOT NULL | Name for a replication scheme. | |
| REPLICATION_OWNER | TT_CHAR(31) NOT NULL | The replication scheme's owner | |
| TT_STORE_ID | TT_BIGINT NOT NULL | Unique, system-generated identifier for a HOST_NAME/TT_STORE_NAME pair. | |
| PEER_TIMEOUT | TT_INTEGER NOT NULL | The number of seconds for this store to wait for a subscriber response before trying to reconnect. | |
| FAIL_THRESHOLD | TT_INTEGER NOT NULL | The number of log files whose accumulation makes this store, in this replication scheme, mark subscribers "failed." (See the STATE field.) | |
| HEARTBEAT_FACTOR | BINARY_DOUBLE | A multiplier of the current heartbeat frequency. |
The REPSBUBSCRIPTIONS table registers each subscribing store that maintains a secondary copy of a replication element.
Columns
| Column name | Type | Description |
|---|---|---|
| REPLICATION_NAME | TT_CHAR (31) NOT NULL | Name for a replication scheme. |
| REPLICATION_OWNER | TT_CHAR (31) NOT NULL | The replication scheme's owner. |
| ELEMENT_NAME | TT_CHAR(31) NOT NULL | The replication name for this element, logically distinct from the name of an underlying data store object. |
| SUBSCRIBER_ID | TT_BIGINT NOT NULL | The TT_STORE_ID for a subscriber to this element. A subscriber may not subscribe more than once to a replication element in a replication scheme. |
| RETURN_SERVICE | TT_CHAR (1) NOT NULL | Return service for this subscriber with respect to this replication element:
'C' - RETURN COMMIT 'R' - RETURN RECEIPT '\0' - No RETURN services '2' - RETURN TWOSAFE |
| RETURN_BY_REQUEST | BINARY(1) NOT NULL | The type of return services for this element.
0 - RETURN services are provided unconditionally 1 - RETURN services are provided only BY REQUEST This field is ignored if RETURN_SERVICES = '\0'. |
| PRIVILEGES | TT_CHAR (1) NOT NULL | Privileges for this subscriber with respect to this replication element:
'\0' - no special subscriber privileges |
The REPTABLES table contains subscriber-relative information about each of the columns in each table transmitted to a subscriber. This information appears in REPTABLES in the owner (transmitter) store but not in REPTABLES in the subscriber store.
Columns
| Column name | Type | Description |
|---|---|---|
| REPLICATION_NAME | TT_CHAR (31) NOT NULL | Name for a replication scheme. |
| REPLICATION_OWNER | TT_CHAR (31) NOT NULL | The replication scheme's owner. |
| ELEMENT_NAME | TT_CHAR (31) NOT NULL | The replication name for this element, logically different from the REF_NAME of the underlying data base object. For example, the ELEMENT_NAME for a replicated table may differ from the table name. This name must be unique in a replication scheme. |
| SUBSCRIBER_ID | TT_BIGINT NOT NULL | The TT_STORE_ID for a subscriber to this element. A subscriber may not subscribe more than once to a replication element in a replication scheme. |
| COLNUM | TT_SMALLINT NOT NULL | Ordinal number of column in table (starting at 1). |
| COLOPTIONS | BINARY (1) NOT NULL | Column specification flags:
0x01 - column is in a primary key. 0x02 - column value is varying-length (VARCHAR[2], NVARCHAR[2], VARBINARY) 0x04 - column value can be NULL. 0x08 - column values are unique. |
| COLTYPE | TT_INTEGER NOT NULL | Data type of column 1 TT_CHAR 2 TT_DECIMAL 3 TT_DECIMAL 4 TT_INTEGER 5 TT_SMALLINT 6 BINARY_FLOAT 7 BINARY_FLOAT 8 BINARY_DOUBLE 9 TT_DATE 10 TIME 11 TT_TIMESTAMP 12 TT_VARCHAR 13 DATE 14 TIMESTAMP 15 NUMBER 16 CHAR 17 VARCHAR2 18 NCHAR 19 NVARCHAR2 - 1 LONGVARCHAR - 2 binary - 3 VARBINARY - 4 LONGVARBINARY - 5 TT_BIGINT - 6 TT_TINYINT - 7 BIT - 8 WCHAR - 9 WVARCHAR - 10 WLONGVARCHAR Note: If you are using TimesTen type mode, for information on COLTYPE, refer to documentation from previous releases of TimesTen. For information on TimesTen type mode, see "TimesTen type mode (backward compatibility" in Oracle TimesTen In-Memory Database SQL Reference. |
| COLLEN | TT_INTEGER NOT NULL | Length of the column
(maximum length for varying-length columns). |
| COLPRECISION | TT_INTEGER NOT NULL | The number of digits in a fixed-point number, or the number of digits in the mantissa of a floating point number |
| COLSCALE | TT_INTEGER NOT NULL | A non-negative number. A scale of 0 indicates an integer with no digits to the right of a decimal point. For a scale of S, the exact numeric value is the integer value of the significant digits multiplied by:
10 (exp -S). |
| PTNNUM | TT_SMALLINT NOT NULL | The table partition that contains the column. |
| PTNCOLOFF | TT_INTEGER NOT NULL | The offset of the column within the partition. |
| PTNNULLOFF | TT_INTEGER NOT NULL | The offset to the null byte within the partition. |
| REPKEYPOSITION | TT_SMALLINT NOT NULL | The ordinal position of this column in the replication key described by the REPKEYCOLS. |
| TS_EXCEPTION_ACTION | TT_CHAR (1) NOT NULL | The action to take upon detecting a conflict by a timestamp-based detector. The action is specified by the ON EXCEPTION clause in the CheckConflicts portion of a CREATE MATERIALIZED VIEW statement. They appear in this column as:
\0' - action not defined 'N' - NO ACTION 'R' - ROLLBACK WORK (default) |
| COLNAME | TT_CHAR (31) | Column name |
The TTSTORES table maps the host name and data store name to a unique TT_STORE_ID. The TT_STORE_ID is a foreign key for all other replication schema tables that refer to a store in a replication scheme.
Columns
| Column name | Type | Description |
|---|---|---|
| TT_STORE_ID | TT_BIGINT NOT NULL | Unique, system-generated identifier for a HOST_NAME/TT_STORE_NAME pair. |
| HOST_NAME | TT_VARCHAR (200) NOT NULL NOT INLINE | Name of the participating host node. |
| TT_STORE_NAME | TT_VARCHAR (200) NOT NULL NOT INLINE | The name for this data store. |
| IS_LOCAL_STORE | BINARY (1) NOT NULL | 1 if this TT_STORE_ID -represents the local data store. 0 -otherwise. |
| MAJOR_RELEASE | TT_INTEGER NOT NULL | The major release part of this data store's TimesTen release number. 0 indicates the current release. |
| MINOR_RELEASE | TT_INTEGER NOT NULL | The minor release part of this store's TimesTen release number. |
| REP_SCHEMA_VERSION | TT_INTEGER NOT NULL | The version of the replication schema in this data store. |
| REP_PORT_NUMBER | TT_INTEGER NOT NULL | The port number that replication uses to communicate with this data store. 0 if automatically assigned. |
| RRPOLICY | TT_CHAR (1) | Subscribers affected by return service failure policy. Legal values are:
'S' - Single subscriber 'A' - All subscribers 'N' No policy |
| RRTRIGGER | TT_INTEGER | Number of timeouts before the return service failure policy is triggered |
| RRRESUME_LATENCY | TT_INTEGER | Resume latency in milliseconds. |
| RRDURABLE | BINARY (1) | Durable commits on RETURN RECEIPT failure. Legal values are:
1 - True 0 - False |
| RET_LOCAL_ACTION | TT_CHAR (1) | Default commit behavior for RETURN TWOSAFE transactions:
'C' - COMMIT 'N' - NO ACTION |
| RET_WAIT_TIME | TT_INTEGER | The defaulted timeout value for RETURN TWOSAFE transactions. |
| RET_WHEN_STOPPED | BINARY (1) | If either the replication agent for the data store is stopped or if the data store is used as master and the replication agent for the data store is set to STOP, then if the value of the column is a non-zero value, return services for the data store are suspended. |
| COMPRESSION | TT_CHAR (1) | If Y, indicates compression of all data from the data store. |
| MASTER | TT_CHAR (1) | Active or standby data store or subscriber data store. Values are:
'Y' - active or standby store 'N' - subscriber store NULL - all other cases. |
| ROLE | TT_CHAR (1) | Role is one of:
'A' - active 'S' - standby NULL - all other cases. |
| TS | TT_BIGINT | The timestamp at which the specified role change was made. |
| CONFLICT_REPORT_
STOP |
TT_INTEGER | The threshold at which conflict reporting is stopped. |
| CONFLICT_REPORT_
RESTART |
TT_INTEGER | The rate at which conflict reporting is resumed. |
| CONFLICT_REPORT_
FLUSH_METHOD |
TT_INTEGER | Reserved for future use. |
| TABLECHECK | TT_CHAR (1) | One of the following values:
E (exact) - The table structures on the master and subscriber data stores must be identical for replication to occur. R (relaxed) - Replication can occur between master and subscriber if a relaxed table check has been passed. This means that the number of columns and column data types match for the tables in the master and subscriber data stores. NULL (default) - all other cases |