• No results found

Alter the isolation level to serializable:

In document Oracle TimesTen In-Memory Database (Page 66-78)

Isolation

4. Alter the isolation level to serializable:

Command> prepare 1 ALTER SESSION SET ISOLATION_LEVEL=serializable; Command> commit;

Command> exec=1;

Required privilege

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

Setting

Set Isolation as follows:

Where to set the attribute

How the attribute is

represented Setting

C or Java programs or UNIX ODBC.INI file

Isolation 0 - Connects to data store in serializable isolation mode.

Data Store Attributes 1-53

Windows ODBC Data Source Administrator

Isolation dropdown list 0 - Connects to data store in serializable isolation mode.

1 - Connects to data store in read committed isolation mode (default).

Where to set the attribute

How the attribute is

LockLevel

LockLevel

By default, TimesTen enables row-level locking for maximum concurrency. With row-level locking, transactions usually obtain locks on the individual rows that they access, although a transaction may obtain a lock on an entire table if TimesTen determines that doing so would result in better performance. Row-level locking is the best choice for most applications, as it provides the finest granularity of concurrency control. To use row-level locking, applications must set the LockLevel connection attribute to 0 (the default value). To cache Oracle tables, you must set row-level locking. In order to CREATE, DROP, or ALTER a user, you can only use row-level locking and thus, the Locklevel must be set to 0 before you can perform any of these operations.

To give every transaction in this connection exclusive access to the data store, you can enable data store-level locking by setting the LockLevel attribute to 1. Doing so may improve performance for some applications.

A connection can change the desired lock level at any time by calling the ttLockLevel

built-in procedure. Connections can also wait for unavailable locks by calling the

ttLockWait built-in procedure. Different connections can coexist with different levels of locking, but the presence of even one connection doing data store-level locking leads to loss of concurrency. To display a list of all locks on a particular data store you can use the ttXactAdmin utility.

When using PL/SQL in your applications, set LockLevel=0 and selectively change to data store level locking for specific transactions that require that level of locking by using the ttLockLevel built-in procedure.

Required privilege

Setting LockLevel to 1 requires ADMIN privilege.

Setting

Set LockLevel as follows: Where to set the

attribute

How the attribute is

represented Setting

C or Java programs or UNIX ODBC.INI file

LockLevel 0 - Transactions access data store using row-level locking (default).

1 - Transactions access data store by acquiring an exclusive lock on the entire data store. Windows ODBC

Data Source Administrator

DS-Level Locking

check box

unchecked - Transactions access data store using row-level locking (default).

checked - Transactions access data store by acquiring an exclusive lock on the entire data store.

Data Store Attributes 1-55

LockWait

Allows an application to configure the lock wait interval for the connection. The lock wait interval is the number of seconds to wait for a lock when there is contention on it. Sub-second LockWait values significant to tenths of a second can be specified using decimal format for the number of seconds. For example:

LockWait = 0.1

results in a lock wait of one tenth of a second.

LockWait may be set to any value between 0 and 1,000,000 inclusive to a precision of tenths of a second. The default is 10 seconds:

LockWait = 10.0

Actual lock wait response time is imprecise and may be exceeded by up to one tenth of a second, due to the scheduling of the agent that detects timeouts. This imprecision does not apply to zero second timeouts, which are always reported immediately. Cache grid uses message wait time with lock wait time. When using cache grid, lock wait times are approximately half the value you have specified. If your applications require the full lock wait time, specify twice the desired seconds.

A connection can change the lock wait interval at any time by calling the ttLockWait

built-in procedure.

To display a list of all locks on a particular data store you can use the TimesTen utility

ttXactAdmin.

Required privilege

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

Setting

Set LockWait as follows:

Where to set the attribute

How the attribute is

represented Setting

C or Java programs or UNIX ODBC.INI file

LockWait s - Seconds to wait for locking conflict resolution before timing out. Default is 10 seconds.

Windows ODBC Data Source Administrator

LockWait field s - Seconds to wait for locking conflict resolution before timing out. Default is 10 seconds.

MatchLogOpts

MatchLogOpts

The first connection to a data store determines the type of logging that is performed and whether the transaction log files are purged. Any subsequent connection must specify the same values for the Logging and LogPurge attributes or TimesTen generates an error. If a connection does not know the current state of these attributes, MatchLogOpts can be set so that the logging attributes match.

Required privilege

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

Setting

Set MatchLogOpts as follows:

Note: If MatchLogOpts is set to True for the first connector, an error is generated and the connection fails. Because of this, use the attribute with caution.

Where to set the attribute

How the attribute is

represented Setting

C or Java programs or UNIX ODBC.INI file

MatchLogOpts 0 - Values of Logging and LogPurge are used (default).

1 - Values of Logging and LogPurge are ignored. Instead, values match those of current connections.

Windows ODBC Data Source Administrator

Match Log Opts check box unchecked - Values of Logging and LogPurge are used (default).

checked - Values of Logging and LogPurge are ignored. Instead, values match those of current connections.

Data Store Attributes 1-57

PermWarnThreshold

Indicates the threshold percentage at which TimesTen issues out-of-memory warnings for the permanent partition of the data store's memory. The data store is considered no longer out of permanent memory if it falls 10% below this threshold. An application must call the built-in procedure ttWarnOnLowMemory to receive out-of-memory warnings. The threshold also applies to SNMP warnings. See "ttWarnOnLowMemory"

on page 2-168 and "Diagnostics through SNMP Traps" in Oracle TimesTen In-Memory Database Error Messages and SNMP Traps.

Required privilege

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

Setting

Set PermWarnThreshold as follows:

Where to set the attribute

How the attribute is

represented Setting

C or Java programs or UNIX ODBC.INI file

PermWarnThreshold p - Percentage at which warning should be issued. Default is 90%

Windows ODBC Data Source Administrator

Low Memory Warning Thresholds for Permanent Data field

p - Percentage at which warning should be issued. Default is 90%.

PrivateCommands

PrivateCommands

When multiple connections execute the same command, they access common command structures controlled by a single command lock. To avoid sharing their commands and possibly placing contention on the lock, you can use

PrivateCommands. This gives you better scaling at the cost of increased temporary space usage.

By default, the PrivateCommands is turned off and commands are shared.

Required privilege

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

Setting

Set PrivateCommands as follows:

Notes

If there are many copies of the same command, all of them are invalidated by a DDL or statistics change. This means that reprepare of these multiple copies takes longer when PrivateCommands = 1. With more commands DDL execution can take slightly longer.

When using the PrivateCommands attribute, memory consumption can increase considerably if the attribute is not used cautiously. For example, if

PrivateCommands=1 for an application that has 100 connections with 100 commands, there are 10,000 commands in the system: one private command for each connection. Where to set the attribute

How the attribute is

represented Setting

C or Java programs or UNIX ODBC.INI file

PrivateCommands 0 - Commands are shared with other connections. (Default)

1 - Commands are not shared with any other connection. Windows ODBC Data Source

Administrator

Private Commands field 0 - Commands are shared with other connections. (Default)

1 - Commands are not shared with any other connection.

Data Store Attributes 1-59

PWDCrypt

The PWDCrypt contains an encrypted version of the corresponding PWD value. The value for PWD is stored in clear text, which does not allow special characters, in the

.odbc.ini file on UNIX and in the Windows Registry on Windows. Any users who have access to the .odbc.ini file or Windows Registry can view the value for this attribute. The PWDCrypt attribute allows special characters, is case sensitive and contains the value of the encrypted password.

For security reasons, the PWDCrypt attribute should only be placed in User DSNs or user private ODBCINI files. The presence of the PWDCrypt in System DSNs allows any user to use the PWDCrypt value to connect to TimesTen, even though they have no knowledge of the cleartext password.

To generate the value for this attribute, run the ttuser utility.

Required privilege

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

Notes

If PWD and PWDCrypt are both supplied, the PWD value is used. See "UID and PWD" on page 1-64.

The PWD is not stored anywhere in the TimesTen system.

Setting

Set PWDCrypt as follows:

Where to set the attribute

How the attribute is

represented Setting

C or Java programs or UNIX ODBC.INI file

PWDCrypt Enter the value generated by the ttuser utility.

Windows ODBC Data Source Administrator

PWDCrypt field Enter the value generated by the ttuser utility.

QueryThreshold

QueryThreshold

Use this attribute to write a warning to the support log and throw an SNMP trap when the execution time of a SQL statement exceeds the specified value. For queries

executed by the replication agent, see Oracle TimesTen In-Memory Database TimesTen to TimesTen Replication Guide. You cannot set a query threshold for a SQL statement that is executed by the cache agent. The value of QueryThreshold applies to all

connections. It applies to all SQL statements except those executed by the replication agent or the cache agent.

The value of this attribute can be any integer equal to or greater than 0. The default value is 0. A value of 0 indicates that no warning is issued. The unit is seconds.

Required privilege

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

Setting

Set QueryThreshold as follows:

Where to set the attribute

How the attribute is

represented Setting

C or Java programs or UNIX ODBC.INI file

QueryThreshold A non-negative integer. Default is 0 and indicates that TimesTen does not return a warning.

Windows ODBC Data Source Administrator

QueryThreshold (secs) field A non-negative integer. Default is 0 and indicates that TimesTen does not return a warning.

Data Store Attributes 1-61

ReplicationTrack

Assigns a connection to a replication track. All transactions issued by the connection are assigned to this track, unless the track is altered.

To start user-specified parallel replication you must set a value for the

ReplicationParallelism attribute, specifying the number of replication tracks to be applied in parallel. You must also set ReplicationApplyOrdering to 1.

The TTREP.REPPEERS system table Track_ID column shows the track associated with the connection.

You can use the ALTER SESSION SQL statement to assign or change the value of this attribute within a session.

Required privilege

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

Setting

Set ReplicationTrack as follows:

Where to set the attribute

How the attribute is

represented Setting

C or Java programs or UNIX ODBC.INI file

ReplicationTrack n - An integer between 1 and 64 that specifies the

replication track to be used by transactions issued by the connection.

Windows ODBC Data Source Administrator

Replication Track field n - An integer between 1 and 64 that specifies the

replication track to be used by transactions issued by the connection.

SQLQueryTimeout

SQLQueryTimeout

Use this attribute to specify the time limit in seconds within which the data store should execute SQL statements.

The value of this attribute can be any integer equal to or greater than 0. The default value is 0. A value of 0 indicates that the query does not time out.

This attribute does not stop IMDB Cache operations that are being processed on Oracle. This includes passthrough statements, flushing, manual loading, manual refreshing, synchronous writethrough, and propagating.

Required privilege

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

Setting

Set SQLQueryTimeout as follows:

Where to set the attribute

How the attribute is

represented Setting

C or Java programs or UNIX ODBC.INI file

SQLQueryTimeout n - Time limit in seconds for which the data store should execute SQL queries. Windows ODBC Data Source

Administrator

QueryTimeout (secs) field n - Time limit in seconds for which the data store should execute SQL queries.

Data Store Attributes 1-63

TempWarnThreshold

Indicates the threshold percentage at which TimesTen issues out-of- memory warnings for the temporary partition of the data store's memory. The data store is considered no longer out of temporary memory if it falls 10% below this threshold. An application must call the built-in procedure ttWarnOnLowMemory to receive

out-of-memory warnings. The threshold also applies to SNMP warnings. See

"ttWarnOnLowMemory" on page 2-168 and "Diagnostics through SNMP Traps" in

Oracle TimesTen In-Memory Database Error Messages and SNMP Traps

Required privilege

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

Setting

Set TempWarnThreshold as follows:

Where to set the attribute

How the attribute is

represented Setting

C or Java programs or UNIX ODBC.INI file

TempWarnThreshold p - Percentage at which warning should be issued. Default is 90%.

Windows ODBC Data Source Administrator

Low Memory Warning Thresholds for Temporary Data field

p - Percentage at which warning should be issued. Default is 90%

In document Oracle TimesTen In-Memory Database (Page 66-78)