IBM DB2 Query Toolbox - Find recently modified tables in Db2 database



Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

IBM Db2 Query Toolbox - Find recently modified tables in Db2 database

A consulta abaixo lista todas as tabelas que foram modificadas nos últimos 30 dias.
The query below lists all tables that was modified in the last 30 days.

Consulta - Query

SELECT TABSCHEMA  AS SCHEMA_NAME
,      TABNAME    AS TABLE_NAME
,      ALTER_TIME AS MODIFY_DATE
  FROM SYSCAT.TABLES
 WHERE TYPE IN ('T')
   AND ALTER_TIME > CURRENT DATE - 30 DAYS
   AND TABSCHEMA NOT LIKE 'SYS%'
 ORDER BY ALTER_TIME DESC;

Colunas

  • database_name - nome do esquema
  • table_name- nome da tabela
  • modify_date - hora da última modificação da tabela pela instrução ALTER

Linhas

  • Uma linha: representa uma tabela em um esquema
  • Escopo das linhas: todas as tabelas que foram modificadas pela última vez nos últimos 30 dias em todos os esquemas
  • Ordenado por: modificar o tempo decrescente

Columns

  • database_name - schema name
  • table_name - table name
  • modify_date - last modify time of table by ALTER statement

Rows

  • One row: represents one table in a schema
  • Scope of rows: all tables which was last modified in the last 30 days in all schemas
  • Ordered by: modify time descending

Resultado - Sample results


Copyright © Dataedo.