Stopping user-defined functions
You can prevent Db2 from accepting SQL statements with invocations of specific functions by using the STOP FUNCTION SPECIFIC command. This command does not prevent SQL statements with invocations of the functions from running if they have already been queued or scheduled by Db2.
About this task
You cannot stop built-in functions or user-defined functions that are sourced on another function.
Procedure
To stop access to all or a specific set of external functions:
Issue the STOP FUNCTION SPECIFIC command.
Example
For example, issue a command like the following one, which stops functions USERFN1 and USERFN3 in the PAYROLL schema:
STOP FUNCTION SPECIFIC(PAYROLL.USERFN1,PAYROLL.USERFN3)
The following output is produced:
DSNX974I STOP FUNCTION SPECIFIC SUCCESSFUL FOR PAYROLL.USERFN1
DSNX974I STOP FUNCTION SPECIFIC SUCCESSFUL FOR PAYROLL.USERFN3
While the STOP FUNCTION SPECIFIC command is in effect, attempts to execute the stopped functions are queued.