gorddbds 060001JCXS Visits (970)
Handlers for SQL Routines.
A handler is usually a section of user declared code in an SQL routine that determines what to do when a condition occurs. DB2 will look for handler code for several conditions ranging from SQLWARNING to SQLEXCEPTION. One common type of handler is the NOT FOUND condition handler. When a record is not returned for a query or there are no more results DB2 will look for a NOT FOUND condition handler and turn control of the routine over to the section of code in this handler. This handler is often used to break out of loops that are fetching data or to test the SQLCODE or SQLSTATE returned. Starting with DB2 version 9.5, DB2 resets the value of SQLCODE and SQLSTATE after the first line of the handler is executed, so it is advised to save these values into variables in the first line of the handler.
For more information on the change in the NOT FOUND handler behavior please see the following technote.
For additional general information on handlers, see the following infocenter link.
gorddbds 060001JCXS Visits (1386)
100 Tech Tips: #86 What information is in the name of the db2fmp
The db2fmp or DB2 Fenced Mode Process is used to run untrusted external routines. These routines can be created in a variety of languages and can be thread-safe (meaning it is safe to run them in a multi-threaded db2fmp process with other unrelated routines), or not thread-safe (meaning they will be run in a single db2fmp process). The name of the db2fmp in the ps output can be used to determine the language and thread-safeness of the db2fmp. The name also indicates if the db2fmp is associated with one or more agents or is currently in the fenced pool. For example here is the output of the command ps -elf | grep db2fmp
242001 A nobody 6881336 10616948
0 60 20 850f65590 39372 * Apr 30 - 0:03 db2fmp
242001 A nobody 7143552 13697146
0 60 20 8f36cf590 4024 * 16:00:10 - 0:00 db2fmp (C)
242001 A nobody 36831440 22282262
0 60 20 892889590 2176 * 09:19:08 - 0:00 db2fmp
242001 A nobody 8913102 10616948 0 60 20 963616590 3876 * 14:54:10 - 0:00 db2fmp (idle)
The first db2fmp in the output with the (Java) in its name is associated with one or more agents and is being used to run thread-safe Java routines.
The second db2fmp with the (C) in its name is also associated with one or more agents and is being used to run thread-safe C routines.
The db2fmp with the (2829) in its name is currently associated with a single agent with the thread or process id that matches the number in the brackets. The routine run by this db2fmp is not thread-safe. If it were thread-safe the db2fmp name would contain the name of the routine's programming language instead of a number.
The db2fmp with (idle) in its name is currently in the fenced pool waiting for reuse and not associated with an agent.