Checking table availability -
09-20-2010
, 03:52 AM
Hello,
I monitor our DB2s to catch situations where tables are in a bad state.
Currently, it's done like this:
SELECT count(*)
FROM syscat.tables
WHERE status<>'N'
However, this seems to miss tables which have been damaged by failed
actions on a table being in a NOT LOGGED INITIALLY state.
Googling a bit on the topic lead me to:
SELECT count(*)
FROM sysibmadm.admintabinfo
WHERE available='N'
However, it takes a long time to query the sysibmadm.admintabinfo view.
When selecting from the view while a table is not available, I get
ADM5570W messages in db2diag.log, leading me to think that the view
triggers table access in all tables; this could explain the view's
slowness.
Is there a more efficient way to discover tables which are not available?
--
Troels |