DSNC DISCONNECT
Use the CICS® DB2® attachment facility command DSNC DISCONNECT to disconnect threads. This command provides manual control to release resources being shared by normal transactions so that special purpose processes, such as DB2 utilities, can have exclusive access to the resources.
Environment
This command can be issued only from a CICS terminal.
Syntax
Abbreviation
DSNC DISC or DISC (using the DISC transaction from the CICS DB2 sample group DFH$DB2).
Authorization
Access to this command can be controlled using the CICS transaction attach security check for transaction DSNC and the CICS command security check for resource DB2CONN. This command requires READ access.
For more information about CICS security, see Security in a CICS DB2 environment.
Parameter description
- plan-name
- Specifies a valid application plan.
Usage notes
- Preventing creation of threads
- The command DSNC DISCONNECT does not prevent threads from being created on behalf of
transactions. The command only causes currently connected threads to be terminated as soon as they
are not being used by a transaction. To interrupt a transaction and cancel a thread faster, you can
use the DB2 CANCEL THREAD command.
You can stop the transactions associated with a particular plan ID in CICS with the MAXACTIVE setting for TRANCLASS. This prevents new instances of the transaction from causing a re-creation of a thread.
- Alternative for protected threads
- You might want to deallocate a plan for rebinding or for running a utility against the database. If you are using a protected thread use EXEC CICS SET DB2ENTRY(entryname) THREADLIMIT(0), or DSNC MODIFY rather than DSNC DISCONNECT, to send all the threads to the pool. The protected thread terminates on its own within two purge cycles. See the PURGECYCLE attribute of DB2CONN.
Example
DSNC DISC TESTP05