Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table/Index corruption check

Status
Not open for further replies.

craig322

MIS
Apr 19, 2001
108
US
Is there a way to check if a table and/or its indexes are corrupt? We are getting an error message that indicates the table/index may be corrupted. I am able to do normal selects out of the table.

TIA

Craig
 
This wont be much help, but I am pretty sure you need to use oncheck (at least as a starting point) but I am sorry - I dont know what parms will help you.
 
Hi,

If you would like to scan a single table for possible page corruption execute statement:
oncheck -cDI testdb:table1

Obviously, to scan all tables:
oncheck -cDI testdb

But it is not suggested, to improve the performance of the checking process, instead unload table names from the systables and generate script, like:

unload to 'check.sql'
select 'oncheck -cDI testdb:'||tabname||';' from systables where tabid>99

Regards,
Shriyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top