Skip Headers
Oracle® TimesTen In-Memory Database Reference
Release 11.2.1

Part Number E13069-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

First connection attributes

First connection attributes are set when a connection is made to an idle data store (a data store created by the instance administrator which currently has no connections) and persist for that connection and all subsequent connections until the last connection to this data store is closed.

First connection attributes are listed in Table 1-2, "First connection attributes" and described in detail in this section.

If you try to connect to the data store using attributes that are different from the first connection attribute settings, the new connection may be rejected or the attribute value may be ignored. However, for example, if existing connections have a LogFileSize of one size and a new connection specifies a LogFileSize of another size, TimesTen ignores the new value and returns a warning.

Note:

Only the instance administrator can change a first connection attribute to a value other than the one currently in effect. To change the value of a first connection attribute, you must first shut down the data store.

AutoCreate

If you connect to a data store that has the AutoCreate attribute set and the data store does not exist yet, the data store is created automatically if you supplied a valid existing path. With AutoCreate set, TimesTen creates the data store, but not the path to the data store. If you attempt to connect to a data store that does not exist and the AutoCreate attribute is not set, the connection fails.

Required privilege

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

Setting

Set AutoCreate as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file AutoCreate 0 - Does not create new data store if data store does not exist.

1 - Creates new data store if data store does not exist (default).

Windows ODBC Data Source Administrator AutoCreate check box unchecked - Does not create new data store if data store does not exist.

checked - Creates new data store if data store does not exist (default).



CkptFrequency

Controls the frequency in seconds that TimesTen performs a background checkpoint. The counter used for the checkpoint condition is reset at the beginning of each checkpoint.

If both CkptFrequency and CkptLogVolume attributes have a value greater than 0, a checkpoint is performed when either of the two conditions becomes true. The values set by the ttCkptConfig built-in procedure replace the values set by these attributes.

In the case that your application attempts to perform a checkpoint operation while a background checkpoint is in process, TimesTen waits until the background checkpoint finishes and then executes the application's checkpoint. To turn off background checkpointing, set CkptFrequency=0 and CkptLogVolume=0.

The value of this attribute is "sticky" as it persists across data store loads and unloads unless it is explicitly changed. The default value is only used during data store creation. Subsequent first connections default to using the existing value stored in the data store. If left unspecified (or empty in the Windows ODBC Data Source Administrator), the stored setting is used. To turn the attribute off, you must explicitly specify a value of 0.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set CkptFrequency as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file CkptFrequency Enter a value in seconds for the frequency at which TimesTen should perform a background checkpoint. Default is 600 if Logging=1 is specified, otherwise it is 0. To specify the default or "existing" value, leave the value empty. A value of 0 means that checkpoint frequency is not considered when scheduling checkpoints.
Windows ODBC Data Source Administrator Ckpt Frequency (secs) field Enter a value in seconds for the frequency at which TimesTen should perform a background checkpoint. Default is 600 if Logging=1 is specified, otherwise it is 0. To specify the default or "existing" value, leave the field empty. A value of 0 means that checkpoint frequency is not considered when scheduling checkpoints.


CkptLogVolume

Controls the amount of data in megabytes that collects in the log between background checkpoints. The counter used for the checkpoint condition is reset at the beginning of each checkpoint.

If both CkptFrequency and CkptLogVolume attributes have a value greater than 0, a checkpoint is performed when either of the two conditions becomes true. The values set by the ttCkptConfig built-in procedure replace the values set by these attributes.

In the case that your application attempts to perform a checkpoint operation while a background checkpoint is in process, TimesTen waits until the background checkpoint finishes and then executes the application's checkpoint. To turn off background checkpointing, set CkptFrequency=0 and CkptLogVolume=0.

The value of this attribute is "sticky" as it persists across data store loads and unloads unless it is explicitly changed. The default value is only used during data store creation. Subsequent first connections default to using the existing value stored in the data store. If left unspecified (or empty in the Windows ODBC Data Source Administrator), the stored setting is used. To turn the attribute off, you must explicitly specify a value of 0.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set CkptLogVolume as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file CkptLogVolume Specify the amount of data in megabytes that can accumulate in the transaction log file between background checkpoints. The default is 0. To specify the default or "existing" value, leave the value empty. A value of 0 means that log volume is not considered when scheduling checkpoints.
Windows ODBC Data Source Administrator Ckpt LogVolume field Specify the amount of data in megabytes that can accumulate in the transaction log file between background checkpoints. The default is 0. To specify the default or "existing" value, leave the field empty. A value of 0 means that log volume is not considered when scheduling checkpoints.


CkptRate

Controls the maximum rate at which data should be written to disk during a checkpoint operation. This may be useful when the writing of checkpoints to disk interferes with other applications.

This rate is used by all background checkpoints and by checkpoints initiated by the ttCkpt and ttCkptBlocking built-in procedures. Foreground checkpoints (checkpoints taken during first connect and last disconnect) do not use this rate. The rate is specified in MB per second.

A value of 0 disables rate limitation. This is the default. The value can also be specified using the ttCkptConfig built-in procedure. The value set by the ttCkptConfig built-in procedure replaces the value set by this attribute.

The value of this attribute is "sticky" as it persists across data store loads and unloads unless it is explicitly changed. The default value is only used during data store creation. Subsequent first connections default to using the existing value stored in the data store. If left unspecified (or empty in the Windows ODBC Data Source Administrator), the stored setting is used. To turn the attribute off, you must explicitly specify a value of 0. For existing data stores that are migrated to this release, the value is initialized to 0. To use the current or default value, the attribute value should be left unspecified.

For more details about the benefits of and issues when using CkptRate, see "Setting the checkpoint rate for background checkpoints" in Oracle TimesTen In-Memory Database Operations Guide.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set CkptRate as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file CkptRate Specify the maximum rate in MB per second at which a checkpoint should be written to disk. A value of 0 indicates that the rate should not be limited. This is the default.
Windows ODBC Data Source Administrator CkptRate field Specify the maximum rate in MB per second at which a checkpoint should be written to disk. A value of 0 indicates that the rate should not be limited. This is the default.


Connections

Indicates the expected upper bound on the number of concurrent connections to the data store. TimesTen allocates one semaphore for each expected connection. If the number of connections exceeds the value of this attribute, the system still operates but may perform suboptimally.

The number of current connections to a data store can be determined by viewing the output from the ttStatus utility.

A Connections value of 0 or no value indicates that the default number should be used.

Note:

The kernel must be configured with enough semaphores to handle all active data stores. For details on setting semaphores for your system, see "Installation prerequisites" in Oracle TimesTen In-Memory Database Installation Guide.

Required privilege

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

Setting

Set Connections as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file Connections no value - Indicates that the default value is used.

0 - Indicates that the default value is used.

64 - Default value

An integer from 1 through 2047 -The value represents the expected maximum number of connections.

Windows ODBC Data Source Administrator Connections field no value - Indicates that the default value is used.

0 - Indicates that the default value is used.

64 - Default value

An integer from 1 through 2047 -The value represents the expected maximum number of connections.



ForceConnect

When return receipt replication is used with the NONDURABLE TRANSMIT option, a failed master data store is allowed to recover only by restoring its state from a subscriber data store using the -duplicate option of the ttRepAdmin utility. In other words, the failed data store cannot just come up and have replication bring it up to date because it may lose some transactions that were transmitted to the subscriber but not durably committed locally. The ForceConnect connection attribute overrides this restriction.

Required privilege

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

Setting

Set ForceConnect as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file ForceConnect 0 - Do not allow connection to failed data store if it is not properly restored from the corresponding subscriber data store (default).

1 - Allow connection to a failed data store even if it is not properly restored from the corresponding subscriber data store.

Windows ODBC Data Source Administrator ForceConnect check box unchecked - Do not allow connection to failed data store if it is not properly restored from the corresponding subscriber data store (default).

checked - Allow connection to a failed data store even if it is not properly restored from the corresponding subscriber data store.



LogAutoTruncate

Determines whether the first connection to the data store should proceed if TimesTen recovery encounters a defective log record.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set LogAutoTruncate as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file LogAutoTruncate 0 - If a defective log record is encountered, terminate recovery and return an error to the connecting application. Checkpoint and transaction log files remain unmodified.

1 - If a defective log record is encountered, truncate the log at the defective record's location and continue with recovery. The original transaction log files are moved to a directory called savedLogFiles, which is created as a subdirectory of the log directory. The transaction log files are saved for diagnostic purposes (default).

Windows ODBC Data Source Administrator LogAutoTruncate box unchecked - If a defective log record is encountered, terminate recovery and return an error to the connecting application. Checkpoint and transaction log files remain unmodified.

checked - If a defective log record is encountered, truncate the log at the defective record's location and continue with recovery. The original transaction log files are moved to a directory called savedLogFiles, which is created as a subdirectory of the log directory. The transaction log files are saved for diagnostic purposes (default).



LogBufMB

The LogBufMB attribute specifies the size of the internal transaction log buffer in megabytes. The default log buffer size is 64 megabytes.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set LogBufMB as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file LogBufMB n - Size of log buffer in megabytes. The default is 64.
Windows ODBC Data Source Administrator Log Buffer Size (MB) field Size of log buffer, in megabytes. The default is 64.


LogBufParallelism

The LogBufParallelism attribute specifies the number of transaction log buffer strands to which TimesTen writes log files before the log is written to disk, allowing for improved log performance. Each buffer has its own insertion latch. Records are inserted in any of the strands. The log flusher gathers records from all strands and writes them to the log files.

The maximum number of strands is 16. The default is 4.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set LogBufParallelism as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file LogBufParallelism An integer value between 1 and 16. Default is 4.
Windows ODBC Data Source Administrator LogBufParallelism field An integer value between 1 and 16. Default is 4.


LogFileSize

The LogFileSize attribute specifies the maximum size of transaction log files in megabytes. The default value is 64. Actual transaction log file sizes may be slightly smaller or larger than LogFileSize because log records cannot span transaction log files.

A value of zero indicates that either the default transaction log file size should be used if the data store does not exist, or that the transaction log file size in effect for the most recent connection should be used if the data store does exist.

It is best to set the value of LogFileSize to match or exceed LogBufMB, although it is possible that the LogBufMB value can be greater than the LogFileSize value. The log buffer cannot be larger than the LogFileSize value, so if the buffer is not sized to match LogFileSize, the buffer capacity may not be fully utilized.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set LogFileSize as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file LogFileSize n - Size of transaction log file in megabytes. Default is 64 when the data store is created and 0 (current size in effect) on subsequent connections. The maximum value is 1024.
Windows ODBC Data Source Administrator Log files Size (MB) field Size of transaction log file in megabytes. Default is 64 when the data store is created and 0 (current size in effect) on subsequent connections. The maximum value is 1024.


LogFlushMethod

Controls the method used by TimesTen to write and sync log data to transaction log files. The overall throughput of a system can be significantly affected by the value of this attribute, especially if the application chooses to commit most transactions durably.

As a general rule, use the value 2 if most of your transactions commit durably and use the value 1 otherwise.

For best results, however, experiment with both values using a typical workload for your application and platform. Although application performance may be affected by this attribute, transaction durability is not affected. Changing the value of this attribute will not affect transaction durability in any way.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set LogFlushMethod as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file LogFlushMethod 0 - Write data to the transaction log files using the previously used value.

1 - Write data to transaction log files using buffered writes and use explicit sync operations as needed to sync log data to disk (for example with durable commits). (This is the default).

2 - Write data to transaction log files using synchronous writes such that explicit sync operations are not needed.

Windows ODBC Data Source Administrator Log Flush Method dropdown list 0 - Write data to the transaction log files using the previously used value.

1 - Write data to transaction log files using buffered writes and use explicit sync operations as needed to sync log data to disk (for example with durable commits). This is the default.

2 - Write data to transaction log files using synchronous writes such that explicit sync operations are not needed.


See also

DurableCommits


Logging

Logging to disk enables applications to roll back transactions. Logging to disk incurs a performance penalty due to both operations needed to maintain the log and delays incurred in writing the log to disk. Logging to disk enables applications to roll back unwanted transactions.

By default, transaction logging is enabled. This is the only mode currently available in TimesTen.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set Logging as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file Logging 1 - Logs modifications to the data store to disk (only value currently allowed).
Windows ODBC Data Source Administrator Not available Not available


LogPurge

If the LogPurge attribute is set, TimesTen automatically removes transaction log files when they have been written to both checkpoint files and there are no transactions that still need the transaction log files' contents. The first time checkpoint is called, the contents of the transaction log files are written to one of the checkpoint files. When checkpoint is called the second time, TimesTen writes the contents of the transaction log files to the other checkpoint file.

TimesTen purges the transaction log files if all of these conditions are met:

If this attribute is set to 0 or unchecked, unneeded transaction log files are appended with the.arch suffix. Applications can then delete the files.

This attribute is relevant only if Logging is set to 1. See also "MatchLogOpts".

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set LogPurge as follows:

Where to set the attributes How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file LogPurge 0 - Does not remove old transaction log files at connect and checkpoint.

1 - Removes old transaction log files at connect and checkpoint (default).

Windows ODBC Data Source Administrator LogPurge check box unchecked - Does not remove old transaction log files at connect and checkpoint.

checked - Removes old transaction log files at connect and checkpoint (default).



MemoryLock

On Solaris, Linux, Windows 64-bit and HP-UX 11 systems, TimesTen allows applications that connect to a shared data store to specify whether the real memory should be locked while the data store is being loaded into memory or while the store is in memory. If the physical memory used for the data store is locked, the operating system's virtual memory sub-system cannot borrow that memory for other uses. No part of the data store will ever be paged out but this could lead to memory shortages in a system that is under configured with RAM. While memory locking can improve data store load performance, it may impede other applications on the same machine.

The PL/SQL shared memory segment is not subject to MemoryLock.

Required privilege

Only the instance administrator can change the value of this attribute.

On Linux systems, set the groupname in the memlock setting to be the same as the instance administrator in the /etc/security/limits.conf file. Set the value of memlock to be at least as large as the TimesTen data store shared memory segment.

On Solaris systems, the instance administrator must be root to set MemoryLock to 1 or 2. Setting MemoryLock to 3 or 4 enables use of Solaris "intimate shared memory".

On HP-UX systems, users need the MLOCK privilege, which is enabled with the setprivgrp command.

Setting

Set MemoryLock as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file MemoryLock 0 - Does not lock memory (default).

1 - Tries to obtain a memory lock. If unable to lock, the connection succeeds. If a lock is obtained, it is released after the data store is loaded into memory (recommended).

2 - A memory lock is required. If unable to lock, the connection fails. If a lock is obtained, the connection succeeds and the lock is released after the data store is loaded into memory.

3 - Tries to obtain and keep a memory lock. If unable to lock, the connection succeeds. If a memory lock is obtained, the connection succeeds and the memory lock is held until the data store is unloaded from memory.

4 - A memory lock is required and is held until the data store is unloaded from memory. If unable to lock, the connection fails. If a lock is obtained, the connection succeeds and the memory lock is held until the data store is unloaded from memory.

Windows ODBC Data Source Administrator Memory Lock field 0 - Does not lock memory (default).

1 - Tries to obtain a memory lock. If unable to lock, the connection succeeds. If a lock is obtained, it is released after the data store is loaded into memory (recommended).

2 - A memory lock is required. If unable to lock, the connection fails. If a lock is obtained, the connection succeeds and the lock is released after the data store is loaded into memory.

3 - Tries to obtain and keep a memory lock. If unable to lock, the connection succeeds. If a memory lock is obtained, the connection succeeds and the memory lock is held until the data store is unloaded from memory.

4 - A memory lock is required and is held until the data store is unloaded from memory. If unable to lock, the connection fails. If a lock is obtained, the connection succeeds and the memory lock is held until the data store is unloaded from memory.



Overwrite

If the Overwrite attribute is set and there is an existing data store with the same data store path name as the new data store, TimesTen destroys the existing data store and creates a new empty data store, as long as the existing data store is not in use. If the Overwrite attribute is set and there is not a data store with the specified data store path name, TimesTen only creates a new data store if the AutoCreate attribute is also set (see "AutoCreate"). Overwrite is ignored if AutoCreate is set to 0. Applications should use caution when specifying the Overwrite =1 attribute.

Required privilege

Only the instance administrator can change the value of this attribute. If a user other than an instance administrator attempts to connect to a data store with OVERWRITE=1, TimesTen returns an error.

Setting

Set Overwrite as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file Overwrite 0 - Does not overwrite existing data store with the same path name (default).

1 - Overwrites existing data store with the same path name.

Windows ODBC Data Source Administrator Not available Not available


PermSize

Indicates the size in MB of the permanent memory region for the data store. You may increase PermSize at first connect but not decrease it. TimesTen returns a warning if you attempt to decrease the permanent memory region size. If the data store does not exist, a PermSize value of 0 or no value indicates that the default size should be used. Default size is 32 MB. For an existing data store, a value of 0 or no value indicates that the existing size should not be changed.

Once you have created a data store, you can make the permanent partition larger, but not smaller. See "Changing data store size" in Oracle TimesTen In-Memory Database Operations Guide.

The ttMigrate and ttDestroy utilities can also be used to change the Permanent Data Size, when appropriate.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set PermSize as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file PermSize n - Size of permanent partition of the data store, in megabytes; default is 32 MB for both 32-bit systems and 64-bit systems. Minimum size is 32 MB.
Windows ODBC Data Source Administrator Permanent Data Size field n - Size of permanent partition of the data store, in megabytes; default is 32 MB for both 32-bit systems and 64-bit systems. Minimum size is 32 MB.


ReceiverThreads

This attribute controls the number of threads used to apply changes on the active master data store to the standby master data store in an active standby pair replication scheme. The default is 1. You can also set this attribute on one or more read-only subscribers in an active standby pair replication scheme to increase replication throughput from the standby master data store to the subscribers.

By default, a receiver thread in the replication agent applies the changes to the standby master data store. When this attribute is set to 2, an additional thread applies the changes. Data stores must be hosted on systems that are 2-way or larger to take advantage of setting this attribute to 2.

If you set this attribute to 2 on the standby master data store, you should also set it to 2 on the active master data store to maintain increased throughput if there is a failover.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set ReceiverThreads as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file ReceiverThreads n - The number of threads used to apply changes from the active master data store to the standby master data store. You can also set this attribute on one or more read-only subscribers in an active standby pair replication scheme to increase replication throughput from the standby master data store to the subscribers.

The possible values are 1 and 2. Default is 1.

Windows ODBC Data Source Administrator ReceiverThreads field n - The number of threads used to apply changes from the active master data store to the standby master data store. You can also set this attribute on one or more read-only subscribers in an active standby pair replication scheme to increase replication throughput from the standby master data store to the subscribers.

The possible values are 1 and 2. Default is 1.



RecoveryThreads

The RecoveryThreads attribute determines the number of threads used to rebuild indexes during recovery.

If RecoveryThreads=1, during recovery, indexes that need to be rebuilt are done serially. If you have enough processors available to work on index rebuilds on your machine, setting this attribute to a number greater than 1 can improve recovery performance. The performance improvement occurs only if different processors can work on different indexes. There is no parallelism in index rebuild within the same index.

The value of RecoveryThreads can be any value up to the number of CPUs available on your system.

The default is 1 when the database is created. Upon subsequent connections, if the database needs to be recovered and RecoveryThreads is unspecified or has a value of 0, then TimesTen uses the previous setting for this attribute.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set RecoveryThreads as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file RecoveryThreads n - The number of threads to use when rebuilding indexes during recovery. Default is 1 when the database is created and 0 on subsequent connections.
Windows ODBC Data Source Administrator RecoveryThreads field n - The number of threads to use when rebuilding indexes during recovery. Default is 1 when the database is created and 0 on subsequent connections.

Notes

For a progress report on the recovery process, see the rebuild messages in the support log.

Set the number of threads low enough to leave sufficient resources on the server machine for other services/processes.


TempSize

TempSize indicates the total amount of memory in MB allocated to the temporary region. TempSize has no pre-defined fixed default value. If left unspecified, its value is determined from PermSize as follows:

TimesTen rounds the value up to the nearest MB.

If PermSize is greater than 64MB, TempSize =14 MB + ceiling(PermSize / 8 MB).

If PermSize is less than 64MB, TempSize = 6 MB + ceiling(PermSize / 4 MB).

If specified, TimesTen always honors the TempSize value. Since the temporary data partition is recreated each time a data store is loaded, the TempSize attribute may be increased or decreased each time a data store is loaded. For an existing data store, a value of 0 or no value indicates that the existing size should not be changed. The minimum TempSize is 32 MB.

Required privilege

Only the instance administrator can change the value of this attribute.

Setting

Set TempSize as follows:

Where to set the attribute How the attribute is represented Setting
C or Java programs or UNIX ODBC.INI file TempSize n - Size of temporary partition of the data store, in megabytes. Minimum size is 32 MB on all platforms.
Windows ODBC Data Source Administrator Temporary Data Size field n - Size of temporary partition of the data store, in megabytes. Minimum size is 32 MB on all platforms.