dbTalk Databases Forums  

Checking table availability

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss Checking table availability in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Troels Arvin
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.