Monday, 30 June 2014

How to know when an "alter table" statement was last executed

How to know when an "alter table" statement was last executed

from syscat.tables using the column ALTER_TIME on DB2 9.5, or using column INVALIDATE_TIME in other DB2 versions

Perform the select below to find out when a table was last modified:

On DB2 9.5:


db2 "select substr(tabname,1,20) as TABLE, alter_time from syscat.tables where tabname='<table_name>'"


Other Versions:


db2 "select substr(tabname,1,20) as TABLE, invalidate_time from syscat.tables where tabname='<table_name>'"

No comments:

Post a Comment