The MUTABLE and IMMUTABLE keywords are standard features of the SET ENVIRONMENT statement, but they are important in setting the USABLE_SPACES value. An error is issued if a user attempts to reset the USABLE_SPACES variable when its mutability for the session is IMMUTABLE.
When USABLE_SPACES is set to MUTABLE, any user can execute SET ENVIRONMENT USABLE_SPACES. Successful execution replaces the current USABLE_SPACES value with the new specified value, rather than appending the new value to the current space list.
The IMMUTABLE option is provided to prevent users from modifying the values defined by the DBA, and should be used after setting the USABLE_SPACES value:
SET ENVIRONMENT USABLE_SPACES 'space1, slice1'; SET ENVIRONMENT USABLE_SPACES IMMUTABLE;
Also supporting this feature is the keyword USABLE_SPACES as a new command-line option to the onmode utility. The DBA can use the following syntax of the onmode -q command to reset the mutability attribute of the USABLE_SPACES session environment variable:
>>-onmode -q--+-IMMUTABLE-+--USABLE_SPACES--session_id--------->< '-MUTABLE---'
Only a user who holds the DBA privilege can issue this command to change the mutability status of the USABLE_SPACES setting. After the onmode -q MUTABLE USABLE_SPACES session_id command executes successfully, a user in session_id can execute the SET ENVIRONMENT USABLE_SPACES statement of SQL to reset the session value for USABLE_SPACES to a different list of spaces.
The onstat utility can display information about the USABLE_SPACES value and mutability:
For more information about command-line options of the onmode and onstat utilities, see Appendix A. Syntax Summaries of Selected Utilities.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]