How to find out which applications are creating temporary tables in a user temporay tablespace
db2scope 310002R9XW Visits (1733)
You may need to find out which applications are creating temporary tables in a user temporary tablespace.
For instance, to drop a user temporary tablespace, you need to terminate all applications that create temporary
tables in the user temporary tablespace. Otherwise, SQL0290N error will be returned.
The following statement can be used to find out the application handles that responsible:
SELECT APPLICATION_HANDLE, TABSCHEMA, TABNAME,TBSP_ID FROM SYSI
You may also use the following command for more details of the temporary table:
db2pd -db sample -tcbstats <TBS