SQLRULES bind option

The SQLRULES option determines whether you can execute a type 2 CONNECT statement to an existing SQL connection, according to Db2 rules.

Command option Option values Used with
SQLRULES
  • ( )
  • ( STD )

Alternatively, the statement causes an error, according to the ANSI/ISO SQL standard of 1992. This option applies to any application process that uses the plan and executes type 2 CONNECT statements. It has no effect on type 1 CONNECT statements.

Option descriptions for SQLRULES

()
No error occurs if CONNECT identifies an existing SQL connection. If X is an existing SQL connection, CONNECT TO X makes X the current connection. If X is already the current connection, CONNECT TO X has no effect on the state of any connections.
(STD)
An error occurs if CONNECT identifies an existing SQL connection. Therefore, if X is a dormant SQL connection, you must use the SQL statement SET CONNECTION to make X the current connection.

For local operations, the value of SQLRULES is used for the initial value of the SQL special register CURRENT RULES.

Default values for SQLRULES

Process Default value
BIND PLAN DB2
BIND PACKAGE N/A
REBIND PLAN Existing value
REBIND PACKAGE N/A

Catalog records for SQLRULES

See the SQLRULES column in SYSPLAN catalog table.