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

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-49
Considerations for CONTROL TABLE
Considerations for CONTROL TABLE
Scope of CONTROL TABLE
The result of the execution of a CONTROL TABLE statement stays in effect until the
current process terminates or until the execution of another CONTROL TABLE
statement for the same control-table-option overrides it. For a detailed list of
the precedence of default settings, see System Defaults Table on page 10-30.
A CONTROL TABLE table statement overrides the effect of a CONTROL TABLE *
statement for the specified table or view.
Relationship to CONTROL QUERY DEFAULT
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. Use the CONTROL QUERY DEFAULT statement to override
system-level default settings for these attributes and other attributes for all tables in the
current process. For example, the statement CONTROL TABLE * TIMEOUT '3000'
has the same effect as the statement CONTROL QUERY DEFAULT TIMEOUT
'3000'. See CONTROL QUERY DEFAULT Statement on page 2-33.
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 TABLE
Turn off MDAM for the JOB table:
CONTROL TABLE PERSNL.JOB MDAM 'OFF';
If you want to enable or turn on MDAM for subsequent queries, you must specify
the table name in the same way; for example, PERSNL.JOB.
Set the length of the timeout for the current process to 30 seconds. To do so,
change the static TIMEOUT attribute for the current process for all referenced
tables and views. This setting overrides any system-level default settings for the
TIMEOUT attribute.
CONTROL TABLE * TIMEOUT '3000';
The value 3000 is in hundredths of seconds, which is equivalent to 30 seconds.
Cancel all previously set control options and use only the system-defined default
setting:
CONTROL TABLE * RESET;