IBM DB2 Query Toolbox - Find the time when table was last accessed
A consulta abaixo retorna uma lista de tabelas e sua última data de uso. Query below returns list of tables and their last using date.
SELECT TABSCHEMA || '.' || TABNAME AS TABLE , LASTUSED AS LAST_USED , CREATE_TIME , ALTER_TIME FROM SYSCAT.TABLES WHERE TABSCHEMA NOT LIKE 'SYS%' AND TYPE = 'T' ORDER BY LASTUSED DESC;