-DISPLAY THREAD command (Db2)
The Db2 command DISPLAY THREAD displays current status information about Db2 threads.
A Db2 thread can be an allied thread, a database access thread, or a parallel task thread. Threads can be active, inactive, indoubt, or postponed.
Distributed threads are those threads that have a connection with a remote location (active or inactive) or that had a connection with a remote location (indoubt). An allied thread and a parallel task thread can be distributed or non-distributed; a database access thread is always distributed.
- Active threads, inactive threads, indoubt threads, postponed threads, procedure threads, system threads, or the set of active, indoubt, postponed, and system threads (see the descriptions under the TYPE option for more information)
- Allied threads, including those threads that are associated with the address spaces whose connection names are specified
- Distributed threads, including those threads that are associated with a specific remote location
- Detailed information about connections with remote locations
- A specific logical unit of work ID (LUWID)
The information that is returned by the DISPLAY THREAD command reflects a dynamic status. When the information is displayed, it is possible that the status has changed. Moreover, the information is consistent only within one address space and is not necessarily consistent across all address spaces displayed.
Abbreviation: -DIS THD
Environment
This command can be issued from a z/OS® console, a DSN session under TSO, a DB2I panel (DB2 COMMANDS), an IMS or CICS® terminal, or a program using the instrumentation facility interface (IFI).
Data sharing scope: Group or member
Authorization
- DISPLAY privilege
- System DBADM authority
- SYSOPR authority
- SYSCTRL authority
- SYSADM authority
Db2 commands that are issued from a logged-on z/OS console or TSO SDSF can be checked by Db2 authorization using primary and secondary authorization IDs. A logged-on z/OS user ID must be defined in RACF or a similar security server.
Syntax
Option descriptions
Only under certain conditions, as described in the following lists, are any of the following options required.
- If the command is issued from a DSN session under TSO, a DB2I panel (DB2 COMMANDS), or an IMS or CICS terminal, the connection name is inherited from the associated address space.
- If the command is not issued from one of those environments, the
following rules apply:
- If you do not specify either LOCATION or LUWID, processing terminates with a DSNV413I message.
- If you do specify LOCATION or LUWID, only distributed threads of the type selected by the TYPE option are displayed.
- When you explicitly specify location-name , only distributed threads of the type selected by the TYPE option that either have (active or inactive threads) or had (indoubt threads) a connection with the specified location are displayed.
- ( connection-name , …)
- Lists
one or more connection names (of 1 to 8 characters each). Allied threads
are selected only from the address spaces associated with those connection
names. The LOCATION option can restrict what is displayed:
- If you specify LOCATION(*), only distributed threads of the type specified in the TYPE option are displayed.
- When you explicitly specify location-name , only distributed threads of the specified type that either have or had a connection with the specified location are displayed.
- ( partial-connection* , …)
- Selects the connections that begin with the string partial-connection and can end with any string, including the empty string. For example, DISPLAY THREAD(CICS*,IMS*) selects all connection names that begin with the string 'CICS' or 'IMS'. The LOCATION option can restrict the display exactly the same way as previously described for location-name .
- (*)
- Displays
all threads in all address spaces attached to Db2 and all database access threads of the types
specified in the TYPE option. The LOCATION option can restrict what
is displayed:
- If you specify LOCATION(*), only distributed threads are displayed.
- When you explicitly specify location-name , only distributed threads that either have (active or inactive threads) or had (indoubt threads) a connection with the specified location are displayed.
The default is to display only the connections that are associated with the transaction manager from which the command was entered.
- SCOPE
- Specifies
the scope of the command.
- ( LOCAL )
- Displays threads on only the current member.
- (GROUP)
- Displays all threads on the data sharing group.
- TYPE
- Tells
the type of thread to display. Abbreviation: T
- ( ACTIVE )
- Displays only active threads. An active allied thread
is connected to Db2 via TSO,
BATCH, IMS, CICS or CAF. An active database access thread
is connected by a network connection to another system and is performing
work on behalf of that system. If, during command processing, an active
thread becomes indoubt, it can appear twice—once as active and once
as indoubt.
Abbreviation: A
The information that is produced by ACTIVE can be useful for debugging purposes, especially message DSNV402I.
- (INDOUBT)
- Displays
only indoubt threads.
An indoubt thread is a participant in a two-phase commit protocol that has completed the first phase of commit, and has then lost communication with the commit coordinator and does not know whether to commit or roll back the updates that have been made.
The indoubt thread information that is displayed includes threads for which Db2 has a coordinator role, a participant role, or both coordinator and participant roles.
The commit coordinator for an allied thread is either a transaction manager (for example, IMS or CICS) or z/OS RRS for threads that use RRSAF. The commit coordinator for a database access thread is a requester at a remote system.
Indoubt threads hold locks on all resources that were updated.
Abbreviation: I
- (*)
- Displays active, indoubt, postponed, and system threads.
- (INACTIVE)
- Displays
only inactive database access threads and connections that are connected
by a network connection to another system. An inactive thread is idle
and waits for a new unit of work to begin from that system.
Abbreviation: INA
Use qualifiers such as complete location names or LUWIDs with this option. When there are large numbers of inactive database access threads, unqualified display requests can temporarily change the Db2 working set, which can temporarily affect the performance of active threads.
- (POSTPONED)
- Displays
information about units of work whose back-out processing has been
postponed.
Abbreviation: P
After you have identified postponed threads, use the RECOVER POSTPONED command, described, to complete backout processing for the postponed units of work.
- (PROC)
- Displays information about threads that are executing stored procedures and user-defined functions. All -DISPLAY THREAD keywords are valid when TYPE(PROC) is specified.
- (SYSTEM)
- Displays a subset of system
agent threads with message DSNV402I. The system agent threads displayed
are deemed useful for serviceability purposes. Not all system threads
are displayed.
Abbreviation SYS
If the command or system agent can be canceled, then the associated token is displayed in the output. You can specify this option from early in the restart to late in the shutdown process. If you issue this command before or after release work, then the restart or shutdown status is displayed in the output.
When the token is identified for the database command or systems agent, you can use the CANCEL THREAD(token) command to cancel it.
- LOCATION( location-name , …)
- Limits
the display to distributed threads as described. Abbreviation: LOC
- location-name
- Displays only distributed threads of the specified type that either
have (active or inactive threads) or had (indoubt threads) a remote
connection with the specified location-name .
Db2 does not receive a location name from requesters that are not Db2 for z/OS subsystems. To display information about a requester that is not a Db2 for z/OS subsystem, enter its LU name or IP address. Enclose the LU name in the less-than (<) and greater-than (>) symbols. For example, the following command displays information about a remote location (that is not Db2 for z/OS) with the LU name of LULA:
The following command displays information about a remote location (that is not Db2 for z/OS) with an IP address of ::FFFF:123.34.101.98:-DISPLAY THREAD (*) LOCATION (<LULA>)
-DISPLAY THREAD (*) LOCATION (::FFFF:123.34.101.98)
Db2 uses the <LU name> notation or IP address in messages displaying information about requesters other than Db2.
- partial-location *
- Selects all location names that begin with the string partial-location and
can end with any string, including the empty string. For example,
LOCATION(SAN*)
selects all location names that begin with the string 'SAN'.You can use an asterisk (*) when specifying an LU name in the same manner as previously described for other location names that are not Db2 for z/OS subsystems. For example,
LOCATION(<LULA*)
selects all remote locations (that are not Db2 for z/OS) with an LU name that begins with the string 'LULA'.You cannot use an asterisk when you specify an IP address.
- ( * )
- Display all distributed threads of the specified type.
- LUWID( luwid , …)
- Displays
information about the distributed threads that have the specified
LUWID. It is possible for more than one thread to have the same LUWID.
- luwid
- Consists of a fully qualified LU network name followed by a period
and an LUW instance number.
The LU network name consists of a one- to eight-character network ID, a period, and a one- to eight-character network LU name. The LUW instance number consists of 12 hexadecimal characters that uniquely identify the unit of work.
- partial-luwid *
- Selects all LUWIDs that begin with the string partial-luwid and can end with any string, including the empty string. For example, LUWID(NET1.*) selects all LUWIDs with a network name of 'NET1'.
- token
- Identifies a specific thread in an alternate way. Db2 assigns a token to each distributed thread
it creates. A token is a one- to six-digit decimal number that appears
after the equal sign in all Db2 messages
that display a LUWID.
If you do not include any periods nor a '*' in the LUWID specification, Db2 assumes that you are supplying a token. The token that Db2 assigns to a specific LUWID is unique for that Db2 subsystem, but not necessarily unique across subsystems.
- ACCEL( accelerator-name , …)
- Limits the list to threads with active accelerator processes executing
within the specified accelerator server.
- accelerator-name
- The specific accelerator server name. If ACCEL(accelerator-name) is specified, only threads active in that specific ACCEL will be displayed.
Supplying an asterisk (*) as the accelerator-name indicates that the display must include all threads with any accelerator server. If ACCEL(*) is specified, only threads currently active in an accelerator will be displayed.
- DETAIL
- Displays additional information about active, inactive, and indoubt threads.
- LIMIT
- Accepts numeric input that specifies the number of lines of output that you want. The default limit is 512, so you must use the limit keyword if you want to set a different limit.
- RRSURID( rrs-urid )
- Specifies
that only threads that match the specified RRSURID selection criteria
are to be displayed.
- If RRSURID( rrs-urid ) is specified, any thread involved in the RRSURID that has the value rrs-urid , and that meets any other specified selection criteria, will be displayed.
- If RRSURID(*) is specified, any thread involved in any RRSURID, and that meets any other specified selection criteria, will be displayed.
Usage notes
- Formatted report for distributed threads
- The series of messages, DSNV444I through DSNV446I, augment the formatted report for DISPLAY THREAD TYPE (ACTIVE or INACTIVE) for distributed threads.
- Threads for connections to remote servers
- A database access thread that is connected to a requester can also be connected to another database server location using DRDA access. In that case, Db2 issues message DSNV445I for the requester, and message DSNV444I and zero or more DSNV446I messages for the remote server connections. In addition, the database access thread acts as an intermediate database server.
- Participant threads waiting for the commit or abort decision
- A DSNV465I message is issued for an active participant thread that has completed phase 1 of commit processing and has been waiting for the commit or abort decision from the coordinator for more than 60 seconds.
- DISPLAY THREAD output limit
- If a DISPLAY THREAD command is issued from the z/OS console, the maximum number of lines of output for a single invocation of the command is 512 lines (at which time a DSNV513I, DSNV514I, or DSNV515I message is printed). If you do not receive the required information in the first 255 lines of output, issue the command again, specifying the TYPE option and a specific connection name, location, LUWID, or a combination of these, as appropriate, to reduce the output.
- Showing parallel tasks
- The DISPLAY THREAD command shows parallel tasks by using a status type of PT. The parallel tasks are displayed immediately after the originating task. If the thread has a status of PT, the connection name contains blanks if the thread of the originating task is running on the same Db2 subsystem. This shows that these parallel tasks are related to the originating task.
- Displaying the XID
- If the DISPLAY THREAD command is issued with the TYPE ACTIVE and
DETAIL options, or with the TYPE INDOUBT option, message DSNV440I
displays the contents of the XID. The contents of the XID are displayed
as a hexadecimal value.
The XID is displayed in the DISPLAY THREAD TYPE INDOUBT report if the indoubt transaction is XID related.
- Threads associated with trusted context
- If a thread is associated with a trusted context, message DSNV485I displays the trusted context name, system authorization ID, and role.
- Displaying threads while Db2 is active
- All -DISPLAY and -CANCEL commands are allowed to run concurrent to other command issued through the console. This ensures thread tokens can be identified and used for soft thread cancels, even while long running console commands are in progress. The majority of system threads displayed cannot be canceled. For example, a 0 thread token is provided for DSNV402I messages.
- Displaying threads during shutdown
- All commands will be quiesced at the beginning of shutdown. Only -DISPLAY THREAD(*) commands will be accepted after this point, and these will be valid until the last stages of shutdown. Much like -DISPLAY THD(*) during restart, only -DISPLAY THREAD(*) TYPE(SYSTEM) will produce meaningful thread information. All other variations of -DISPLAY THREAD(*) will terminate without thread data. If SCOPE(GROUP) is specified during shutdown, then a DSNV495I message will be displayed and the command will only execute locally.
- Trace information for commands issued with group scope
- If this command is issued with options that specify group scope in a Db2 data sharing member, it also runs on all other active members. IFICID 090 trace records for other group members can show that the same command was issued by the SYSOPR authorization ID from the 016.TLPKN5F correlation ID, in addition to the trace records from the member where the original command was issued. See Command scope in Db2 data sharing.
Output
Message DSNV401I indicates the beginning of the output of the command.
Examples
- Example: Displaying information about a local thread
- The output of the command DISPLAY THREAD shows a token for every
thread, distributed or not. This example shows the token for an allied
thread that is not distributed. The token is 123. You can use the
thread's token as the parameter in the CANCEL THREAD command.
-DISPLAY THREAD(*)
This command produces output similar to the following output:
DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV402I - ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN BATCH T * 5 BKH2C SYSADM BKH2 000D 123 DISPLAY ACTIVE REPORT COMPLETE DSN9022I - DSNVDT '-DIS THD' NORMAL COMPLETION
- Example: Displaying information about threads at all locations
- This example shows information about conversation activity when
distribution information is displayed for active threads. Db2 returns the following output,
indicating that the local site application is waiting for a conversation
to be allocated in Db2, and
that a Db2 server is accessed
by a DRDA client using TCP/IP.
-DISPLAY THREAD(*) LOCATION(*) DETAIL
This command produces output similar to the following output:
DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV402I - ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN TSO TR * 9 SYSADM SYSADM DSNESPRR 0029 30 V441-ACCOUNTING=D1001 V436-PGM=DSNESPRR.DSNESM68, SEC=1, STMNT=137, THREAD-INFO=SYSADM:*:*: *:*:*:*:* V444-USIBMSY.SYEC717A.BD6E55DCF589=30 ACCESSING DATA AT ( 1)STL716A-SYEC716A V447--INDEX SESSID A ST TIME V448-- ( 1) 0000000000000000 N A4 0522008555443 TSO RA * 2 SYSADM SYSADM DSNESPRR 0033 28 V441-ACCOUNTING=D1001 V445-USIBMSY.SYEC716A.BD6E543A7BDF=28 ACCESSING DATA FOR ( 1)::FFFF:9.30.115.136 V447--INDEX SESSID A ST TIME V448--( 1) 446:1027 W R2 0522008483849 DISPLAY ACTIVE REPORT COMPLETE DSN9022I - DSNVDT '-DIS THD' NORMAL COMPLETION
- Example: Displaying information about indoubt threads
- In this example, a system at Site 1 has a TSO application and
an IMS application. The system
at Site 1 fails after Db2 commits
the TSO application, but before the commit decision has been communicated
to the participant subsystems at Site 2. The failure occurs before IMS has communicated the commit or
rollback decision to the Site 1 Db2 subsystem.
The DISPLAY THREAD commands that are issued at Site 1 and 2 show report
output similar to the following:
The following DISPLAY THREAD command is issued at Site 1:
-DISPLAY THREAD(*) TYPE(INDOUBT)
This command produces output similar to the following output:
DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV406I - INDOUBT THREADS - COORDINATOR STATUS RESET URID AUTHID TEST0001 INDOUBT 00000EA8BD60 SYSADM V449-HAS NID= DONSQLXX.F100000000 AND ID= CTHDCORID001 V467-HAS LUWID USIBMSY.SYEC717A.BD6E5A52FFd1.0001=49 V466-THREAD HAS BEEN INDOUBT FOR 00:06:03 V450-HAS PARTICIPANT INDOUBT AT STL717B-SYEC717B STL717A COMMITTED 00000EA8C6CE SYSADM V467-HAS LUWID USIBMSY.SYEC717A.BD6E5BOA1F94.0001=52 V450-HAS PARTICIPANT INDOUBT AT STL717B-SYEC717B STL716A-SYEC716A DISPLAY INDOUBT REPORT COMPLETE DSN9022I - DSNVDT '-DISPLAY THREAD' NORMAL COMPLETION
The following DISPLAY THREAD command is issued at Site 2:
-DISPLAY THREAD(*) TYPE(INDOUBT)
This command produces output similar to the following output:
DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV406I - INDOUBT THREADS - COORDINATOR STATUS RESET URID AUTHID STL717A-SYEC717A INDOUBT 00000DAC6538 SYSADM V467-HAS LUWID USIBMSY.SYEC717A.BD6E5A52FFD1.0001=26 V466-THREAD HAS BEEN INDOUBT FOR 00:14:29 STL717A-SYEC717A INDOUBT 00000DAC792C SYSADM V467-HAS LUWID USIBMSY.SYEC717A.BD6E5BOA1F94.0001=28 V466-THREAD HAS BEEN INDOUBT FOR 00:09:45 DISPLAY INDOUBT REPORT COMPLETE DSN9022I - DSNVDT '-DIS THREAD' NORMAL COMPLETION
- Example: Displaying information about a stored procedure thread that is waiting
- This example shows a thread executing within a stored procedure
and a thread waiting for a stored procedure to be scheduled. Assume
that an application makes a call to stored procedure PROC1 and then
to stored procedure PROC2. PROC2 is in a STOP QUEUE state.
The output for PROC1 while it is executing shows a status of SP in the ST column, which indicates that a thread is executing within a stored procedure:
-DISPLAY THREAD(*)
This command produces output similar to the following output:
DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV402I - ACTIVE THREADS - 176 NAME ST A REQ ID AUTHID PLAN ASID TOKEN BATCH SP 3 RUNAPPL SYSADM PL01AP01 001D 43 V429 CALLING STORED PROCEDURE PROC1, LOAD MODULE LMPROC1 DISPLAY ACTIVE REPORT COMPLETE DSN9022I - DSNVDT '-DISPLAY THREAD' NORMAL COMPLETION
The output for PROC2, while it is queued, shows a status of SW in the ST column, which indicates that a thread is waiting for a stored procedure to be scheduled:
-DISPLAY THREAD(*)
This command produces output similar to the following output:
DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV402I - ACTIVE THREADS - 198 NAME ST A REQ ID AUTHID PLAN ASID TOKEN BATCH SW * 13 RUNAPPL SYSADM PL01AP01 001D 43 V429 CALLING STORED PROCEDURE PROC2, LOAD MODULE DISPLAY ACTIVE REPORT COMPLETE DSN9022I - DSNVDT '-DISPLAY THREAD' NORMAL COMPLETION
- Example: Displaying information about autonomous procedures
- The following example shows a thread that invokes an autonomous
procedure. The autonomous procedure and its token are identified by
a DSNV520I message. You can cancel the autonomous
procedure by canceling the invoking thread. In this example that thread
with token 13 invoked the autonomous procedure.
19.26.27 >dis thd(*) service(stg) 19.26.27 STC00065 DSNV401I > DISPLAY THREAD REPORT FOLLOWS - 19.26.27 STC00065 DSNV402I > ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN BATCH RA * 1 TMH11003 SYSADM PLAN2 003D 13 V492-LONG 12K 64VLONG 196K 64LONG 200K ; V442-CRTKN=USIBMSY.SYEC1DB2.C760EC93ED89 ; V445-USIBMSY.SYEC1DB2.C760EC93ED89=13 ACCESSING DATA FOR <SYEC1DB2>-SYEC1DB2 ; BATCH AT * 0 TMH11003 SYSADM PLAN2 003D 0 V520-AUTONOMOUS PROCEDURE INVOKED BY THREAD WITH TOKEN = 13 V492-LONG 12K 64VLONG 136K 64LONG 260K ; DISPLAY ACTIVE REPORT COMPLETE
- Example: Displaying information about an allied, non-distributed originating thread and its parallel tasks
- This example shows an allied, non-distributed originating thread
(TOKEN=30) that is established (allocated according to plan) in addition
to all of its parallel tasks (PT), which are running on the same Db2 system. All parallel tasks are
displayed immediately following their corresponding originating thread.
16.32.57 DB1G DISPLAY THREAD(*) 16.32.57 STC00090 DSNV401I DB1G DISPLAY THREAD REPORT FOLLOWS - 16.32.57 STC00090 DSNV402I DB1G ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN BATCH T * 1 PUPPYDML USER001 MYPLAN 0025 30 PT * 641 PUPPYDML USER001 MYPLAN 002A 40 PT * 72 PUPPYDML USER001 MYPLAN 002A 39 PT * 549 PUPPYDML USER001 MYPLAN 002A 38 PT * 892 PUPPYDML USER001 MYPLAN 002A 37 PT * 47 PUPPYDML USER001 MYPLAN 002A 36 PT * 612 PUPPYDML USER001 MYPLAN 002A 35 PT * 545 PUPPYDML USER001 MYPLAN 002A 34 PT * 432 PUPPYDML USER001 MYPLAN 002A 33 PT * 443 PUPPYDML USER001 MYPLAN 002A 32 PT * 252 PUPPYDML USER001 MYPLAN 002A 31 DISPLAY ACTIVE REPORT COMPLETE 16.32.58 STC00090 DSN9022I DB1G DSNVDT '-DISPLAY THREAD' NORMAL COMPLETION
- Example: Displaying detailed information TCP/IP threads from remote locations
- This example shows the detail report for a Db2 client that uses TCP/IP to access a remote DRDA server.
-DISPLAY THREAD(*) LOCATION(*) DETAIL
This command produces output similar to the following output:
DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV402I - ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN BATCH TR * 4 AAAAAAA ADMF001 AAAAAAA 0024 61 V441-ACCOUNTING=KEITH:AAAAAAA V436-PGM=MYPLAN.AAAAAAA, SEC=1, STMNT=1973, THREAD-INFO=SYSADM:*:*:*: *:*:*:* V444-USIBMSY.SYEC717A.BD6E60CE2BD3=61 ACCESSING DATA AT ( 1)STL717B-::FFFF:9.30.115.135..447 V447--INDEX SESSID A ST TIME V448--( 1) 1027:447 N R2 0522009445180 DISPLAY ACTIVE REPORT COMPLETE DSN9022I - DSNVDT '-DIS THD' NORMAL COMPLETION
- Example: Displaying information about TCP/IP threads that use IPv6 addressing
- This example shows the detail report for a client that supports
IPv6 addressing and provides a 58-character extended correlation token
to the Db2 server. That token
is displayed in message V442.
-DISPLAY THREAD(*)
This command produces output similar to the following output:
DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV402I - ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN SERVER RA * 1 db2bp ADMF001 DISTSERV 003A 3 V437-WORKSTATION=hornet, USERID=admf001, APPLICATION NAME=db2bp V442-CRTKN=1111:2222:3333:4444:5555:6666:7777:8888.65535.123456789ABC V445-G91A0D32.EBCF.C0C44BBCCFF4=3 ACCESSING DATA FOR 1111:2222:3333:4444:5555:6666:7777:8888 DISPLAY ACTIVE REPORT COMPLETE DSN9022I - DSNVDT '-DIS THD' NORMAL COMPLETION
- Example: Displaying information about units of work with postponed back-out processing
- This example shows information about units of work whose back-out
processing has been postponed.
This command produces output similar to the following output:-DISPLAY THREAD (*) TYPE (POSTPONED)
DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV431I - POSTPONED ABORT THREADS - COORDINATOR STATUS RESET URID AUTHID BATCH ABORT-P 000002FF98EA ADMF001 BATCH ABORT-P 000002FF9000 ADMF001 DISPLAY POSTPONED ABORT REPORT COMPLETE DSN9022I - DSNVDT '-DISPLAY THREAD' NORMAL COMPLETION
- Example: Displaying detailed information about threads that are processing under a user-defined function
- This example shows the token for a thread that is processing a
user-defined function. The token is 18.
-DISPLAY THREAD(*) DETAIL
This command produces output similar to the following output:
DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV402I - ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN BATCH T * 231 DISTHD ADMF001 0021 95 BATCH SW * 38 INSERT ADMF001 MYPLAN 0025 18 V436-PGM=CLIP74C1.UFIP74C1, SEC=0, STMNT=0, THREAD-INFO=SYSADM:*:*:*: *:*:*:* V429 CALLING FUNCTION =SCIP7401.SP_UFIP74C1 , PROC=V61AWLM3, ASID=0030, WLM_ENV=WLMENV3 DISPLAY ACTIVE REPORT COMPLETE DSN9022I - DSNVDT '-DISPLAY THREAD' NORMAL COMPLETION
- Example: Displaying information about threads that are involved in an RRS unit of recovery
- This example shows information about a thread that is involved
in an RRS unit of recovery.
-DISPLAY THREAD(*) RRSURID(*)
This command produces output similar to the following output:
- 08.23.58 STC00149 DSNV401I ( DISPLAY THREAD REPORT FOLLOWS - - 08.23.58 STC00149 DSNV402I ( ACTIVE THREADS - - NAME ST A REQ ID AUTHID PLAN ASID TOKEN - RRSAF T 8 TGXID-111 ADMF001 TGXIDR 0023 35 - V481-DB2 IS PARTICIPANT FOR RRS URID B4D0FC267EB020000000001101010000 - DISPLAY ACTIVE REPORT COMPLETE - 08.23.58 STC00149 DSN9022I ( DSNVDT '-DIS THD' NORMAL COMPLETION
- Example: Displaying information about threads when Db2 is the coordinator for an indoubt RRS unit of recovery
- This example shows information about a thread where Db2 is the coordinator for an indoubt RRS unit
of recovery. Db2 has committed
the thread but has not been able to resolve the RRS UR with RRS.
-DISPLAY THREAD(*) TYPE(I) RRSURID(*)
This command produces output similar to the following output:
- 09.27.21 STC00185 DSNV406I ( INDOUBT THREADS - - COORDINATOR STATUS RESET URID AUTHID - UNKNOWN COMMITTED 123456789ABC UNKNOWN - V480-DB2 IS COORDINATOR FOR RRS URID C4D4FA267EB040000000001201020000 00- DISPLAY INDOUBT REPORT COMPLETE - 09.27.21 STC00185 DSNV434I ( DSNVDT NO POSTPONED ABORT THREADS FOUND - 09.27.21 STC00185 DSN9022I ( DSNVDT '-DIS THD' NORMAL COMPLETION
- Example: Displaying detailed information about threads in a distributed transaction
- This example shows the XID for an active thread that is associated
with an XA transaction manager:
-DISPLAY THREAD(*) DETAIL
This command produces output similar the following output:
#dis thd(*) det DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV402I - ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN SERVERRX * 3 xidappl AdMF001 DISTSERV 0036 50 V440-XID=53514C20 00000017 00000000 544D4442 00000000 002F93DD A92F8C4F F3000000 0000BD V445-G91E1F24.BAC1.01E098172410=50 ACCESSING DATA FOR ( 1)::FFFF:9.30.31.36 V447--INDEX SESSID A ST TIME V448-- ( 1) 447:47809 W R2 0522010250267 DISPLAY ACTIVE REPORT COMPLETE DSN9022I - DSNVDT '-DIS THD' NORMAL COMPLETION
- Example: Displaying information about threads that are associated with a trusted context
- This example shows a DISPLAY report of a thread associated with
a trusted context.
-DIS THD(*) DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV402I - ACTIVE THREADS - 133 NAME ST A REQ ID AUTHID PLAN ASID TOKEN BATCH T * 10 JOB01 ADMF001 APPL01 0027 12 V485-TRUSTED CONTEXT=DOMINOCONTEXT, SYSTEM AUTHID=SYSADM, ROLE=USRROLE DISPLAY ACTIVE REPORT COMPLETE DSN9022I - DSNVDT '-DIS THD' NORMAL COMPLETION
- Example: Displaying information about threads during Db2 restart
- This example shows the command during restart. A DSNV506I message
indicates the state that Db2 is
in, such as STARTING, ACTIVE, STOPPING. The message will also indicate
the phase of restart or shutdown, if available.
-DIS THD(*) TYPE(SYSTEM) DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV497I - SYSTEM THREADS - DB2 STARTING PHASE=Subsystem Startup Recovery Log Manager NAME ST A REQ ID AUTHID PLAN ASID TOKEN V91A N * 0 031.GlmTsk00 SYSOPR 002D 0 V490-SUSPENDED 05136-13:53:12.73 DSN7LSTK +00000D0C 05.45 V91A N * 0 023.GCSCNM03 SYSOPR 002D 0 DISPLAY SYSTEM THREAD REPORT COMPLETE DSN9022I ) DSNVDT '-DIS THD' NORMAL COMPLETION
- Example: Displaying information about suspended threads
- This example
shows the command executing while Db2 is
active. Many system threads are suspended as shown in the DSNV490I messages.
In addition, system thread 023.GSCN6 03 is currently executing the
-DISPLAY THREAD(*) TYPE(SYSTEM) command.
-DIS THD(*) TYPE(SYSTEM) DSNV401I ) DISPLAY THREAD REPORT FOLLOWS - DSNV497I ) SYSTEM THREADS - DB2 ACTIVE NAME ST A REQ ID AUTHID PLAN ASID TOKEN V91A N * 0 020.PEXCTL00 SYSOPR 002E 0 V490-SUSPENDED 05136-13:53:29.55 DSNTLCTL +000004F0 16.31 V91A N * 0 010.PMICMS01 SYSOPR 002E 0 V490-SUSPENDED 05136-13:53:47.29 DSNB1CMS +000005E8 12.21 V91A N * 0.010.PMITMR02 SYSOPR 002E 0 ... ... V91A N * 0.004.JW007 01 SYSOPR 002D 0 V490-SUSPENDED 05136-13:54:03.60 DSNJW107 +000002B2 12.27 V91A N * 0.004.JTIMR 00 SYSOPR 002D 0 V91A N * 0.016.WVSMG 00 SYSOPR 002D 0 V490-SUSPENDED 05136-13:53:23.83 DSNWVSMG +00000534 01.54 V91A N * 0.026.WVZXT 01 SYSOPR 002D 0 V91A N * 0.016.WVSMT 01 SYSOPR 002D 0 V490-SUSPENDED 05136-13:53:48.10 DSNWVSMT +00000D7C 01.54 V91A N * 0.023.GSCN6 03 SYSOPR 002D 0 V501-COMMAND EXECUTING: -DIS THD(*) TYPE(SYSTEM) DISPLAY SYSTEM THREAD REPORT COMPLETE DSN9022I ) DSNVDT '-DIS THD' NORMAL COMPLETION DISPLAY SYSTEM THREAD REPORT COMPLETE DSN9022I ) DSNVDT '-DIS THD' NORMAL COMPLETION
- Example: Displaying information about threads when Db2 is stopping
- This display shows the command executing while Db2 is stopping. The DSNV506I message
identifies the phase of shutdown.
-DIS THD(*) TYPE(SYSTEM) DSNV401I - DISPLAY THREAD REPORT FOLLOWS - DSNV497I - SYSTEM THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN V91A N * 0 020.PEXCTL00 SYSOPR 002E 0 V490-SUSPENDED 05136-13:53:29.55 DSNTLCTL +000004F0 16.31 V91A N * 0 010.PMICMS01 SYSOPR 002E 0 V490-SUSPENDED 05136-13:53:47.29 DSNB1CMS +000005E8 12.21 V91A N * 0.010.PMITMR02 SYSOPR 002E 0 V91A N * 0.022.SPQMON01 SYSOPR 002E 0 V91A N * 0.014.RTSTST00 SYSOPR 002E 0 V490-SUSPENDED 05136-13:53:45.79 DSNB1TMR +00000B74 16.27 V91A N * 0.010.PM2PCP01 SYSOPR 002E 0 V490-SUSPENDED 05136-13:53:47.33 DSNB1TMR +00000B74 16.27 V91A N * 0 010.PM2CSX01 SYSOPR 002E 0 V490-SUSPENDED 05136-13:53:47.30 DSNB1TMR +00000B74 16.27 V91A N * 0 010.PM2PCK02 SYSOPR 002E 0 V490-SUSPENDED 05136-13:54:17.31 DSNB1TMR +00000B74 16.27 V91A N * 0 031.GlmTsk00 SYSOPR 002D 0 V490-SUSPENDED 05136-13:53:12.73 DSN7LSTK +00000D0C 05.45 V91A N * 0 023.GCSCNM03 SYSOPR 002D 0 V91A N * 0 004.JW007 01 SYSOPR 002D 0 V490-SUSPENDED 05136-13:54:31.62 DSNJW107 +000002B2 12.27 V91A N * 0 023.GSCN6 03 SYSOPR 002D 0 V501-COMMAND EXECUTING: -DIS THD(*) TYPE(SYSTEM) DISPLAY SYSTEM THREAD REPORT COMPLETE DSN9022I ) DSNVDT '-DIS THD' NORMAL COMPLETION
- Example: Displaying information about disconnected database access threads
- This example shows information about an active database access
thread that is disconnected.
-DISPLAY THREAD(*) DETAIL
This command produces output that is similar to the following output:
13.23.46 =dis thread(*) detail 13.23.46 STC00067 DSNV401I = DISPLAY THREAD REPORT FOLLOWS - 13.23.46 STC00067 DSNV402I = ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN DISCONN DA * 8 NONE NONE DISTSERV 003B 11 V471-USIBMSY.SYEC1DB2.C1C38BDE809D=11 DISPLAY ACTIVE REPORT COMPLETE 13.23.46 STC00067 DSN9022I = DSNVDT '-DIS THREAD' NORMAL COMPLETION
- Example: Displaying information about inactive threads
- This example shows information about an inactive connection.
-DISPLAY THREAD(*) TYPE(INACTIVE)
This command produces output that is similar to the following output:
- 13.27.47 =dis thread(*) type(inactive) - 13.27.47 STC00067 DSNV401I = DISPLAY THREAD REPORT FOLLOWS - - 13.27.47 STC00067 DSNV424I = INACTIVE THREADS - - NAME ST A REQ ID AUTHID PLAN ASID TOKEN - SERVER R2 0 javaw.exe ADMF001 DISTSERV 003B 12 - V437-WORKSTATION=KFUKUSH, USERID=admf001, - APPLICATION NAME=javaw.exe - V445-G91E1686.EF04.080107212323=12 ACCESSING DATA FOR ::FFFF:9.30.22.134 - SERVER R2 0 db2bp.exe ADMF001 DISTSERV 003B 14 - V437-WORKSTATION=KFUKUSH, USERID=admf001, - APPLICATION NAME=db2bp.exe - V445-G91E1686.F104.080107212343=14 ACCESSING DATA FOR ::FFFF:9.30.22.134 - DISPLAY INACTIVE REPORT COMPLETE - 13.27.47 STC00067 DSN9022I = DSNVDT '-DIS THREAD' NORMAL COMPLETION
- Example: Displaying information about threads that use an accelerator server
- This example shows the details for an active
thread that is using an accelerator server.
-DISPLAY THREAD(*) ACCEL(ACCEL1) DETAIL
This command produces output similar to the following output:
-DIS THD(*) ACC(ACCEL1) DETAIL DSNV401I # DISPLAY THREAD REPORT FOLLOWS - DSNV402I # ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN BATCH AC * 231 BI ADMF001 DSNTEP2 0053 55 V666 ACC=ACCEL1,ADDR=::FFFF:9.30.30.133..446:1076 DISPLAY ACTIVE REPORT COMPLETE DSN9022I - DSNVDT '-DISPLAY THREAD' NORMAL COMPLETION
- Example: Displaying information about threads for secondary connections
- Suppose that a distributed application is using package-based
continuous block fetch to access data on a server. The requester has
opened a secondary connection for each cursor in the application.
You issue the following command at the requester:
-DB2B DIS THD(*) DETAIL
The command produces the following output:
DSNV401I -DB2B DISPLAY THREAD REPORT FOLLOWS - DSNV402I -DB2B ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN DB2CALL TR * 3 RTESTSI SYSADM TESTS 002C 2 V437-WORKSTATION=DB2CALL, USERID=SYSADM, APPLICATION NAME=RTESTSI V436-PGM=TESTS.TESTS, SEC=2, STMNT=170, THREAD-INFO=SYSADM:DB2CALL: SYSADM:RTESTSI:*:*:*:* V482-WLM-INFO=*:364029760:*:2127818752 V444-USIBMSY.SYEC4B.CA57F2850247=2 ACCESSING DATA AT ( 1)STLEC4-::FFFF:127.0.0.1..446 V447--INDEX SESSID A ST TIME V448--( 1) 1038:446 N R5 1229312543740 DISPLAY ACTIVE REPORT COMPLETE DSN9022I -DB2B DSNVDT '-DIS THD' NORMAL COMPLETION
In the V448 information, a status of R5 means that the requester is receiving a response from the server, and that the thread with LUWID USIBMSY.SYEC4B.CA57F2850247 is processing a secondary connection in support of application RTESTSI, which is using package-based continuous block fetch.
You issue the following command at the server:
-DB2A DIS THD(*) DETAIL
The command produces the following output:
DSNV401I -DB2A DISPLAY THREAD REPORT FOLLOWS - DSNV402I -DB2A ACTIVE THREADS - NAME ST A REQ ID AUTHID PLAN ASID TOKEN DB2CALL RA * 1 RTESTSI SYSADM TESTS 005E 2 V437-WORKSTATION=DB2CALL, USERID=SYSADM, APPLICATION NAME=RTESTSI V436-PGM=TESTS.TESTS, SEC=2, STMNT=0, THREAD-INFO=SYSADM:DB2CALL:SY SADM:RTESTSI:STATIC:41823:*:<9.30.115.64.5002.CA57F2850247> V442-CRTKN=9.30.115.64.5002.CA57F2850247 V482-WLM-INFO=ALLTSO:1:1:550 V445-G91E7340.H38A.CA57F2850247=2 ACCESSING DATA FOR ( 1)::FFFF:127.0.0.1 V447--INDEX SESSID A ST TIME V448--( 1) 446:1038 W S5 1229312543741 DISCONN DA * 0 NONE NONE DISTSERV 005E 4 V471-USIBMSY.SYEC4DB2.CA57F2861190=4 DISPLAY ACTIVE REPORT COMPLETE DSN9022I -DB2A DSNVDT '-DIS THD' NORMAL COMPLETION
In the V448 information, a status of S5 means that the server is sending or preparing a response to the requester, and that the thread with LUWID USIBMSY.SYEC4DB2.CA57F2861190 is processing a secondary connection in support of application RTESTSI, which is using package-based continuous block fetch.