onmode and a arguments: Add a shared-memory segment (SQL administration API)

Use the onmode and a arguments with the admin() or task() function to add a shared-memory segment.

Syntax

EXECUTE FUNCTION { admin | task } ( "onmode","a" , "memory_size" );
Element Description Key Considerations
memory_size The size, in kilobytes, of a new virtual shared-memory segment. The value of size must be a positive integer that does not exceed the operating-system limit on the size of shared-memory segments.

Usage

Ordinarily, you do not need to add segments to the virtual portion of shared memory because the database server automatically adds segments as they are needed. However, as segments are added, the database server might reach the operating-system limit for the maximum number of segments before it acquires the memory that it needs. This situation typically occurs when the SHMADD configuration parameter is set so small that the database server exhausts the number of available segments before it acquires the memory that it needs for some operation.

You can use this function to add a segment that is larger than the size specified by the SHMADD configuration parameter. By using this function to add a segment, you can adhere to the operating system limit for segments while meeting the need that the database server has for more memory.

This function is equivalent to the onmode -a command.

Example

The following example adds 500 KB of virtual shared-memory:
EXECUTE FUNCTION task("onmode","a","500");