Cache General Connection Attributes
Cache general connection attributes are only used when caching Oracle Database data.
DynamicLoadEnable
This attribute enables or disables dynamic load of data from an Oracle database to a TimesTen dynamic cache group. By default, dynamic load of data from an Oracle database is enabled.
To enable or disable dynamic load at the statement level and temporarily override the setting of this attribute, set the DynamicLoadEnable
optimizer flag with the ttOptSetFlag
built-in procedure or using the statement level optimizer hint TT_DynamicLoadEnable
in a SQL statement.
Note:
The value of this attribute overrides the dynamic load behavior of all dynamic cache groups for the current connection to the database.
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 DynamicLoadEnable
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 |
DynamicLoadErrorMode
This attribute controls what happens when an application executes a SQL operation against a dynamic cache group and the SQL operation cannot use dynamic load.
With a value of 0, the SQL operation executes against whatever data is in the TimesTen tables and returns a result based on that data with no error indicated.
With a value of 1, any statement that cannot use dynamic load (even if it does not need dynamic load) fails with an error indicating that it is not dynamic load-compliant.
For more information on caching data from an Oracle database in a TimesTen cache group, see Dynamic Cache Groups in Oracle TimesTen In-Memory Database Cache Guide.
Note:
To override the value of this attribute at the statement level, set the DynamicLoadErrorMode
optimizer flag with the ttOptSetFlag
built-in procedure or using the statement level optimizer hint TT_DynamicLoadErrorMode
in a SQL statement.
For details, see Statement Level Optimizer Hints in Oracle TimesTen In-Memory Database SQL Reference.
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 DynamicLoadErrorMode
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 |
OracleNetServiceName
This attribute identifies the Service Name for the Oracle instance.
To cache Oracle database tables and enable communication with the Oracle database, you must specify an Oracle Service Name.
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 OracleNetServiceName
as follows:
Where to set the attribute | How the attribute is represented | Setting |
---|---|---|
C or Java programs or UNIX and Linux systems |
|
Character string specifying the Oracle Service Name that is to be used as the Oracle ID. |
Windows ODBC Data Source Administrator |
Not applicable |
OraclePWD
OraclePWD
attribute is the password the Oracle cache administration user provides to connect to the Oracle database to perform cache operations. These cache operations include, for example, cache group SQL, passthrough, and ttLoadFromOracle.
For more information about cache group SQL operations, see Getting Started; for passthrough, see Setting a Passthrough Level in Oracle TimesTen In-Memory Database Cache
Guide. For information about loading data from Oracle Database and using ttLoadFromOracle
, see Use TimesTen Built-In Procedures to Recommend a Table and Load SQL Query Results in Oracle TimesTen In-Memory Database Operations
Guide.
Notes:
-
The name for the Oracle cache administration user must be the same as the TimesTen cache administration user.
-
To specify the TimesTen cache administration user name, use
UID
. -
To specify the TimesTen cache administration password, use
PWD
. -
The value of the
OraclePWD
attribute can be different from the value specified for thePWD
attribute.
Required Privilege
No privilege is required to set the value of this attribute.
Usage in TimesTen Scaleout and TimesTen Classic
This attribute is supported in both TimesTen Classic and TimesTen Scaleout.
Setting
You can use the OraclePWD
attribute to register an Oracle password in the connection string. However, we recommend you to store your passwords in a wallet. See Providing Cache Administration User Credentials When Connecting in Oracle TimesTen In-Memory Database Cache
Guide.
If you decide to use the OraclePWD
attribute to create an Oracle password, suppose you have defined the following odbc.ini
file on Linux:
[myDSN] Datastore=/data/myDSN PermSize=512 TempSize=256 LogBufMB=256 LogFileSize=256 DatabaseCharacterSet=AL32UTF8 ConnectionCharacterSet=AL32UTF8 OracleNetServiceName=ttorcl
The example specifies OraclePWD
as myoraclepwd
for user cacheadmin
by connecting to myDSN
. The TimesTen cache administration password PWD
is pwd
. The Oracle cache administration user is not the instance administrator.
% ttisql Copyright (c) 1996, 2022, Oracle. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. Command> connect"DSN=myDSN;UID=cacheadmin;PWD=mypwd;OraclePWD=myoraclepwd"; Connection successful: DSN=myDSN;UID=cacheadmin;DataStore=/=/data/myDSN;DatabaseCharacterSet=AL32UTF8; ConnectionCharacterSet=AL32UTF8;LogFileSize=256;LogBufMB=256;PermSize=512; TempSize=256;OracleNetServiceName=ttorcl;(Default setting AutoCommit=1)
To connect using Windows, you must provide the OraclePWD
in the connect string. The following example provides the cache administration user, the TimesTen cache administration user password and the Oracle cache administration user password.
ttIsql -connStr "DSN=database1CS;UID=cacheadmin;PWD=mypwd;OraclePWD=orapwd;"In TimesTen Scaleout, this attribute can be set in a connectable or a connection string. See Connecting to a database in Oracle TimesTen In-Memory Database Scaleout User's Guide.
PassThrough
It specifies which SQL statements are executed only in the cache database and which SQL statements are passed through to the Oracle database. For more information see Setting a Passthrough Level in the Oracle TimesTen In-Memory Database Cache Guide and CREATE CACHE GROUP in Oracle TimesTen In-Memory Database SQL Reference.
The execution of a prepared PassThrough
command assumes that the schema of dependent objects in the Oracle database has not changed since the prepare. If the schema has changed the PassThrough
command may cause unexpected results from the Oracle database.
When passing SQL statements through to the Oracle database, use only TimesTen supported data types in column definitions. If the specified data type is not supported in TimesTen, the passthrough statement fails.
For information on changing the isolation level on the Oracle database connection, when using this attribute, see Isolation.
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 both TimesTen Classic and TimesTen Scaleout.Setting
Set PassThrough
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
Certain restrictions must be considered when using the passthrough feature. They include:
-
If the
PassThrough
attribute is set so that a query must be executed in the Oracle database, the query is sent to the Oracle database without any changes. If the query uses a synonym for a table in a cache group, then a synonym with the same name must be defined for the corresponding Oracle database table for the query to be successful. -
In the case that a SQL statement that uses TimesTen only syntax is passed through to the Oracle database, TimesTen returns an error message that indicates the syntax is not supported in the Oracle database.
-
Execution of a prepared passthrough command assumes that the schema of dependent objects in the Oracle database have not changed after the prepare. If the schema has changed, unexpected results can occur.
-
TimesTen does not include a cache invalidation feature. TimesTen does not verify that the cached tables are up to date. When a query is syntactically correct in TimesTen and the cache contains all the tables referenced in the query, the query is executed in TimesTen regardless of whether the cache is up to date.
-
The passthrough of Oracle
INSERT
,UPDATE
, orDELETE
operations depends on the setting of thePassThrough
attribute as described in the table above. TimesTen Cache cannot detectINSERT
,UPDATE
andDELETE
operations that are hidden in a trigger or stored procedure. Therefore, TimesTen cannot enforce the passthrough rule on hidden operations. -
You cannot pass PL/SQL blocks through to the Oracle database.
-
The effects of a passthrough
INSERT
,UPDATE
, orDELETE
operation on a read-only cache group are only seen after the transaction is committed and after the next autorefresh operation is completed. -
There is no mechanism to detect or block updates on an Oracle database table that is cached in a TimesTen synchronous writethrough cache group. Whether the updates are made by statements passed through the cache or from other Oracle database applications, the changes are never reflected in TimesTen.
-
Oracle Call Interface (OCI) does not support a mechanism to describe the binding type of the input parameters. Ensure that your application supplies the correct SQL types for passthrough statements. The ODBC driver converts the C and SQL types and presents the converted data and the SQL type code to TimesTen. TimesTen presents the information to OCI. The length of the input binding values is restricted to 4000 for
LONG
andLONG RAW
types. -
At all passthrough levels, passthrough execution of DDL statements does not result in commits on the TimesTen side.
-
A transaction that contains operations that are replicated with
RETURN TWOSAFE
cannot have aPassThrough
setting greater than0
. IfPassThrough
is greater than0
, an error is returned and the transaction must be rolled back. -
When
PassThrough
is set to0
,1
, or2
, the following behavior occurs when a dynamic load condition exists:-
A dynamic load can occur for a
SELECT
operation on cache tables in any dynamic cache group type. -
A dynamic load for an
INSERT
,UPDATE
, orDELETE
operation can only occur on cached tables with dynamic asynchronous or synchronous writethrough cache groups.
-
Refer to SQL Statements in Oracle TimesTen In-Memory Database SQL Reference for details about the INSERT
, UPDATE
, DELETE
, and SELECT
statements.
RACCallback
This attribute enables you to enable or disable the installation of Transparent Application Failover (TAF) and Fast Application Notification (FAN) callbacks when using Oracle Real Application Clusters (Oracle RAC) with TimesTen.
For more information, see Oracle TimesTen In-Memory Database Cache Guide and CREATE CACHE GROUP in Oracle TimesTen In-Memory Database SQL Reference.
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 RACCallback
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 |
StandbyNetServiceName
This attribute identifies the Service Name for the standby Oracle instance from an Oracle Active Data Guard environment.
To cache Oracle database tables and enable communication with the standby Oracle database, you must specify an Oracle Service Name.
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 StandbyNetServiceName
as follows:
Where to set the attribute | How the attribute is represented | Setting |
---|---|---|
C or Java programs or UNIX and Linux systems |
|
Character string specifying the Oracle Service Name that is to be used as the standby Oracle ID. |
Windows ODBC Data Source Administrator |
Not applicable |