If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to fix database's inconsistency

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-23-06, 22:39
DBA-Jr DBA-Jr is offline
Registered User
 
Join Date: Mar 2005
Posts: 108
How to fix database's inconsistency

Hi All,
My DB2 ESE 8.1 with FP6 on RedHat Linux has this problem:

DB cfg shows:
Database is consistent = NO

Since there is no current connection, I believe the normal state should be consistent = Yes. I RESTARTed the DB, but it didn't solve the problem.

I ran db2dart, It showed inconsistency in SYSIBM.SYSCOLUMNS's two indexes. I also tried to REORG the indexes. The REORG was successful but didn't solve the problem either.

Because the indexes are on a catalog table, I can not drop and recreate them. How can I "rebuild" the indexes, or how can I solve this problem? On DB2 for z/OS, there is a utility REBUILD INDEX. Is there anything like this on DB2/LUW?

Appreciate your advice in advance.
Reply With Quote
  #2 (permalink)  
Old 03-23-06, 23:18
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Check the status of each of the tablespaces:
db2 list tablespaces show detail
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 03-23-06, 23:23
DBA-Jr DBA-Jr is offline
Registered User
 
Join Date: Mar 2005
Posts: 108
Every TS state is Normal.
Reply With Quote
  #4 (permalink)  
Old 03-23-06, 23:44
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Try to deactivate the database
db2 deactivate db db-name

Then disconnect all applications. To be sure that all apps are disconnected, issue:
db2 force application all

do a: db2stop and db2start.

check the status again.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 03-24-06, 08:56
DBA-Jr DBA-Jr is offline
Registered User
 
Join Date: Mar 2005
Posts: 108
Thanks Marcus_A. Your advice worked perfectly.
After I deactivated the DB, I got consistent status. Does this mean this DB had been activated by CMD ACTIVATE because earlier, when the DB was not consistent, there was no application connections.

After this problem is solved, I am still wondering the normal way to rebuild an index. Any advice on that?

Thanks so much!!!!!!!!!!!!!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On