During a session, users can set the values of some environment variables depending on their usage requirements. However, this can often conflict with the resource usage policy set by the DBA. The following environment variables frequently have the most impact on the resource utilization within a user's session:
By changing the mutability property of these environment variables, a DBA can have more accurate control over resource allocation during a user's session. For example, a DBA might want to prevent a user from modifying the value of PDQPRIORITY or to be able to deny all users the ability of changing the default table type.
You can alter the mutability property for an environment variable within the sysdbopen() procedure using various versions of the SET statement. Since sysdbopen() is run with DBA privileges when a user session is initiated, any environment variables set to MUTABLE in the sysdbopen() procedure cannot be altered later in the session. For more information on using sysdbopen(), see Specifying the Initial Environment for Sessions.
The exact syntax of the SET statement depends on the environment variable. The following sections show which version of the SET statement syntax is used for each environment variable. See the IBM Informix Guide to SQL: Syntax for the complete syntax of the SET statement.
The following environment variables have their mutability set using the SET ENVIRONMENT statement:
The following examples demonstrate how to use the SET ENVIRONMENT statement. For the complete syntax, see the IBM Informix Guide to SQL: Syntax.
SET ENVIRONMENT BOUND_IMPL_PDQ IMMUTABLE SET ENVIRONMENT MAXSCAN MUTABLE
To set the mutability property for the PDQPRIORITY environment variable, use the SET PDQPRIORITY statement.
SET PDQPRIORITY MUTABLE
For more information on the syntax of the SET PDQPRIORITY statement, see the IBM Informix: Guide to SQL Syntax. For more information on setting PDQ Priority to improve database performance, see Overriding PDQPRIORITY Settings.
Use the SET Default Table Type statements to specify the default table type for tables created later in the current session. You can change the mutability setting for these statements so that a user can not alter the default table type during a session.
... SET TABLE_TYPE TO IMMUTABLE ... SET TEMP_TABLE_TYPE TO IMMUTABLE
For more information on the syntax of these statements, see the IBM IIBM Informix: Guide to SQL Syntax.
Use the SET Default Type Space statements to specify the default storage space used by subsequent CREATE TABLE statements in the same session. You can change the mutability setting for these statements so that a user can not alter the default table space during a session.
SET TABLE_SPACE TO IMMUTABLE ... SET TEMP TABLE_SPACE TO IMMUTABLE
To set the mutability property of all environment variables with a mutability property, use the SET ALL_MUTABLES statement. The following example shows how to use this command:
SET ALL_MUTABLES TO MUTABLE
To determine the mutability properties of environment variables during a session, use the onstat -g mut command.
Mutability of environment variables for Session: 1.41 Environment variable Mutability MAXSCAN IMMUTABLE TEMP_TAB_EXT_SIZE MUTABLE TEMP_TAB_NEXT_SIZE MUTABLE COMPUTE_QUOTA MUTABLE IMPLICIT_PDQ IMMUTABLE BOUND_IMPL_PDQ MUTABLE TMPSPACE_LIMIT MUTABLE CLIENT_TZ IMMUTABLE PDQPRIORITY IMMUTABLE TABLE_SPACE MUTABLE TABLE_TYPE MUTABLE TEMP_TABLE_SPACE MUTABLE TEMP_TABLE_TYPE MUTABLE
For more information on using the onstat commands see the IBM Informix: Extended Parallel Server Administrator's Reference.
To change the mutability property of an environment variable after a session has been initiated, use the onmode -q command. This command also allows a DBA to set the mutability property of an environment variable in an active session without making changes to the sysdbopen() procedure. Any changes made using onmode -q are not preserved after the session is terminated.
The following example demonstrates how to use this command:
onmode -q MUTABLE TMPSPACE_LIMIT 19
Here, the mutability property of the TMPSPACE_LIMIT environment variable is changed for the session whose connection id is 19. The session id must correspond to the session id on the connection coserver. For more information, see the IBM Informix: Extended Parallel Server Administrator's Reference.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]