Connecting Tech Pros Worldwide Help | Site Map

how to detect unavailable tables?

Newbie
 
Join Date: Feb 2009
Posts: 2
#1: Jun 23 '09
We recently identified a table on a primary HADR database that had been
loaded with the parm "nonrecoverable" thus the table was unavailable to
the HADR standby copy. The table was identified by the diag log message
ADM5571. After we resolved the problem (resync'ing the HADR standby) we
have been investigating the best way to report on any tables that may
become "unavailable" to the HADR standby database. The main reason for
the concern is that we have a lot of tables in one database that have
been defined as not logged initially and we need to verify that there
HADR standby copy for these tables is available.

There does not appear to be any one command that verifies the
availability of the HADR standby tables. The only way to regenerate the
ADM5571 message is to reorg the HADR primary tables and then review the
diag log on the standby, searching for the ADM5571 msg.

Is there a way to identify unavailable tables on the HADR standby
database without having to failover or reorg the primary tables?

1) we cannot use db2look as it don't record the ALTERs with NLI and we have many tables which are altered after some time of creation.
2) we are on v9.1 aix 5.3
so newly (v9.5fp4) introduced para BLOCKNONLOGGED is not helpful.

-TAC
vijay2082's Avatar
Newbie
 
Join Date: Aug 2009
Location: UK
Posts: 22
#2: Aug 20 '09

re: how to detect unavailable tables?


Probably you can create a script as below and run the desired schema.

db2 -x "select 'load query table
'||ltrim(rtrim(tabschema))||'.'||ltrim(rtrim(tabna me))|| ' ;' from
syscat.tables where TYPE='T' and tabschema='DB2ADMIN' with ur" >
chk_tbl.sql

db2 -tvf chk_tbl.sql -z out_tbl.txt


Look for output like :

load query table DB2ADMIN.MYTABLE1
Tablestate:
Unavailable


Cheers, Vijay
Reply