connect_proc - Connect procedure name database configuration parameter
This database configuration parameter allows you to input or update a two-part connect procedure name that will be executed every time an application connects to the database.
- Configuration type
- Database
- Parameter type
- Configurable Online
- Default
- NULL
The following connect procedure conventions must
be followed, otherwise an error is returned.
- The non-zero length string must specify a two-part procedure name (that is,[schema name].[procedure name])
- The connect procedure name (both schema and procedure name) can
only contain the following characters:
- A-Z
- a-z
- _ (underscore)
- 0-9
- In addition, the schema and procedure name need to follow the rules of an ordinary identifier.
Once the connect_proc parameter is configured to a non-zero length value, the server will implicitly execute the procedure specified on every new connection.
Usage Notes
- A connection to the database is required when updating this parameter. However, unsetting the parameter does not require a connection if the database is deactivated.
- The connect_proc parameter can only be set using the IMMEDIATE option of the UPDATE DATABASE CONFIGURATION command. The DEFERRED option cannot be used when setting the connect_proc parameter.
- Only a procedure with exactly zero parameters can be used as a connect procedure. No other procedure sharing the same two-part name can exist in the database as long as the connect_proc parameter is set.
- The connect procedure must exist in the database before updating the connect_proc parameter. The UPDATE DATABASE CONFIGURATION command will fail with an error if the connect procedure with zero parameters does not exist in the database or if there is more than one procedure with the same name.
- Use the same connect procedure on all partitions in a data-partitioned environment.
- Before
you perform a RESTORE DATABASE on an existing image
of the database, you must reset the connect_proc parameter
to NULL. If the connect_proc is
not set to NULL, you might encounter ERROR SQL0440N
when you attempt a connection or rollforward command. To avoid this
error, you must update the connect_proc parameter
to NULL by using the following command:
db2 update db cfg for <DATABASE> using connect_proc NULL