SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-34
Examples of CONTROL QUERY DEFAULT
Relationship to CONTROL TABLE
Use the CONTROL QUERY DEFAULT statement to override system-level default
settings for various attributes for all tables in the current process. Use the CONTROL
TABLE statement to override system-level default settings for the TABLELOCK,
TIMEOUT, and SIMILARITY_CHECK attributes per table or for all tables in the current
process. For example, the statement CONTROL QUERY DEFAULT TIMEOUT '3000'
has the same effect as the statement CONTROL TABLE * TIMEOUT '3000'. See
CONTROL TABLE Statement on page 2-46.
The CONTROL TABLE statement has precedence over the CONTROL QUERY
DEFAULT statement. For a detailed list of the precedence of default settings, see
System Defaults Table on page 10-30.
Examples of CONTROL QUERY DEFAULT
Change the ISOLATION_LEVEL attribute for the current process:
CONTROL QUERY DEFAULT ISOLATION_LEVEL 'READ UNCOMMITTED';
Change the static TIMEOUT attribute for the current process:
CONTROL QUERY DEFAULT TIMEOUT '3000';
The value 3000 is in hundredths of seconds, which is equivalent to 30 seconds.
Reset the TIMEOUT attribute to its initial value in the current process:
CONTROL QUERY DEFAULT TIMEOUT RESET;
Specify which volumes to use for scratch disks and which volume is preferred:
CONTROL QUERY DEFAULT SCRATCH_DISKS
'$data01, $data02, \tstnode.$scr';
CONTROL QUERY DEFAULT SCRATCH_DISKS_PREFERRED '$data02';