Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am looking for a command like fschek or something similar for oracle to make sure that the indexing is proper . I am doing a HP UX server installation and there was some error while installing some depots , now I force removed that but I want to do a consistency check and then proceed with the installation .

Basically I want to Check Database Integrity of my db and looking for a simple xommand like fscheck !

share|improve this question

2 Answers 2

up vote 1 down vote accepted

SHORT EXPLAINATION: The way Oracle works in internal redundancy, IF the database can startup (from nomount to mount to open) without problems, AND all files appear present in v$datafile (none are marked "MISSING") then you should be ok.

STEPS: I have found the easiest way to "full scan" the database for broken objects (bad sectors/blocks, etc) would be a full export (and even further a full import into an empty shell instance). The expdp or exp with the FULL=Y flag, running as SYS should tell Oracle to extract EVERYTHING out of the database into a flat dump file. If you have problems in your extents (tables, indexes, etc) then it should show up then.

Of course all of this is assuming you have already done: select * from dba_objects where status = 'INVALID'; to make sure you don't have anything that it already knows is not right.

FURTHER INFO: With online redo logs, undo management, multiplexed controlfiles and the datafile headers themselves, the Oracle database is pretty good at making sure it is consistent.

share|improve this answer

Oracle will continuously validate indexes - you don't need to do it. If you want to see what indexes are in an invalid/unusable state, the following query may help:

SELECT owner, index_name, status from all_indexes WHERE status <> 'VALID';

Any index listed as being UNUSABLE needs to be rebuilt.

As @REW states, Oracle is very good at self checking it's own consistency, and pretty much refuses to start up if serious problems exist.

One of the major selling points of Oracle is that it is VERY hard to corrupt a database in the absence of hardware problems.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.