Link to home
Start Free TrialLog in
Avatar of harlemit
harlemit

asked on

corrupted index in system tablespace

I have corrupted index in system tablespace:
Index Name:         I_OBJ1
Table Name:         OBJ$
Owner:                 SYS
Tablespace:          SYSTEM
How do I rebuild this index and waht are the potensial problems?
The corruption was found through trace file.
ASKER CERTIFIED SOLUTION
Avatar of Mark Geerlings
Mark Geerlings
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@harlemit:


The easiest way, run this script:

$ORACLE_HOME/rdbms/admin/utlrp.sql


this will recompile all the invalid and corrupted objects.
To seazodiak,

That suggestion will not help.  Here is the documentation from the top of the "utlrp.sql" file:
Rem $Header: utlrp.sql 15-nov-2001.10:56:31 rburns Exp $
Rem
Rem utlrp.sql
Rem
Rem Copyright (c) 1998, 2001, Oracle Corporation.  All rights reserved.  
Rem
Rem    NAME
Rem      utlrp.sql - UTiLity script Recompile invalid Pl/sql modules
Rem
Rem    DESCRIPTION
Rem     This is a fairly general script that can be used at any time to
Rem     recompile all existing invalid PL/SQL modules in a database.
-- (end of clip from file)

Note that it only re-compiles PL\SQL objects.  It does not rebuild indexes that have problems.


To harlemit:

Your best option is to contact Oracle technical support and follow their recommendations.  If that is not an option for you (like if you are running an Oracle database without paying for support) then you are unsupported anyway, so login as SYS and drop, then recreate that index.

Of course, before doing that, make a complete backup and if possible a complete export, so if dropping and rebuilding this index creates more problems, you can go back to where you are now.
Markgeer:

I guess it's true by saying "nothing is what it seems" ;-)


though what you said is absolutely correct, but UTLRP.sql do a lot more than pl/sql recompilation.
it recompiles all the invalid objects instead.

Here is the evidence:

In the Header comments of UTLRP.SQL : REad the last line

************************************************
Rem    NAME
Rem      utlrp.sql - UTiLity script Recompile invalid Pl/sql modules
Rem
Rem    DESCRIPTION
Rem     This is a fairly general script that can be used at any time to
Rem     recompile all existing invalid PL/SQL modules in a database.
Rem
Rem     If run as one of the last steps during migration/upgrade/downgrade
Rem     (see the README notes for your current release and the Oracle
Rem     Migration book), this script  will validate all PL/SQL modules
Rem     (procedures, functions, packages, triggers, types, views, libraries)

######################################################




Now the story does not end here. if you look the contents below of this script, it will actually call another script:


UTLRCMP.SQL

In the header of this file:
em    DESCRIPTION
Rem     This script provides a packaged interface to recompile all
Rem     existing invalid PL/SQL modules, Java classes, indextypes and
Rem     operators in a database sequentially or in parallel.
**************************************************

again look at  the last line, it even recompile the JAVA CLASS , not to mentiion the index types.


SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I believe markgeer is pointing out that utlrp will not rebuild a corrupted index.  In fact, I would not be surprised if the status on the index was still VALID.

What is being described sounds like block corruption in an index.

If you don't have support, rebuild the index.  If you do, I would contact Oracle for their recommendation.

I don't see a need to rebuild a database for a corrupted index.  If this was user data and not dictionary, we would all just rebuild the index, not restore a backup.
Avatar of alariver
alariver

From SQL(DML) Level, You cannot rebuild OBJ$ about indexes, Even if you startup migrate/upgrade.