MemoryLock

Enables applications that connect to a shared database to specify whether the real memory should be locked during database loading.

On Linux, MemoryLock=4 will try to obtain a MemoryLock based on what the operating system allows. On Linux, locking all of the virtual memory size (physical + swap) can occur. TimesTen performs best if it does not use swap. Since the operating system allows locking more memory than is actually available, it is important to carefully configure the operating system memory management parameters to limit the amount of lockable memory. You can configure these parameters in the /etc/security/limits.conf file.

On AIX the MemoryLock attribute is not implemented.

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 database shared memory segment.

To restart the TimesTen daemons, in the new login shell, use:

% ttDaemonadmin -restart

Usage in TimesTen Scaleout and TimesTen Classic

This attribute is supported in both TimesTen Classic and TimesTen Scaleout.

Setting

Set MemoryLock as follows.

Where to set the attribute How the attribute is represented Setting

C or Java programs or UNIX and Linux systems odbc.ini file in TimesTen Classic or in the database definition (.dbdef) file in TimesTen Scaleout

MemoryLock

0 (default) - Does not lock memory.

1 - Tries to obtain a memory lock. If unable to lock, the connection succeeds. If a lock is obtained, it is released after the database 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 database 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 database is unloaded from memory.

4 - A memory lock is required and is held until the database 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 database is unloaded from memory.

Windows ODBC Data Source Administrator

Not applicable