Go Premium for a chance to win a PS4. Enter to Win

x
?

Index Corruption HADR environment

Posted on 2017-04-30
0
Medium Priority
?
43 Views
Last Modified: 2017-07-31
Hello,

We have an index corruption Issue at (HADR environment ) founded into db2diag of primary caused crash , this corruption occurred on primary. I've decided to

1-takeover on standby as no page corruption there and deactivated primary to avoid this corruption moved to standby
2-backup (new primary ) and drop db on old primary
3-restore on old primary (standby) , then working successfully

but doesn't know what the root cause of this page corruption I faced this issue twice during 40 days. My suspect is maybe index not building at true bases, even db2support hadn't got particularity more details they said maybe application code

Is there any way to ensure an index is working fine or not?
As my understanding, there are many flavors of index-related corruption problems, for instance:

Unique index contains duplicates with different RID(s) or same RID(s)
Multiple index entries pointing to the same RID
Index key is out of place (wrong index key order)
Row exists, but index keys do not exist in any or some of the indexes
Index entry pointing to an empty data slot or unused data slot or RID is invalid
Incorrect previous or next index page pointers, incorrect high key or other corruptions on index pages

And if this happens again, is there any different method unless backup and restore?

I found This maybe can be a solution could you  please give me your thoughts  can i do this as a solution ???

REORG the corrupted indexes or mark the index as bad by using the db2dart option /MI.  When completed, rebuild it by accessing
the table.

I found some solutions here also i can provide

Depending on when index corruption was detected, we had 2 ways to solve the problem

1. During crash recovery

1.1 db2stop force

1.2 db2dart <dbname> /MI /TSI 2 /OI 2

1.3 db2 update dbm cfg using indexrec access

1.3 db2start

1.4 db2 connect to <dbname>

1.5 db2 "select tabschema, tabname from syscat.tables where tbspaceid=2 and tableid=2"

1.6 db2 "select count(*) from <tabschema>.<tabname>" ---> this will trigger an index rebuilding

2. When database is accessable

2.1 get the tabschema and tabname from syscat.table

db2 "select tabschema, tabname from syscat.tables where tbspaceid=2 and tableid=2"

2.2 db2 reorg indexes all for table <tabschema>.<tabname>


Please give me your recommendations
Thanks
0
Comment
Question by:Tarek Zidane
0 Comments

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Join & Write a Comment

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question