Solved

corrupted index in system tablespace

Posted on 2004-08-03
13
1,433 Views
Last Modified: 2012-03-06
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.
0
Comment
Question by:harlemit
  • 3
  • 2
  • 2
  • +3
13 Comments
 
LVL 34

Accepted Solution

by:
Mark Geerlings earned 100 total points
Comment Utility
Start with taking a backup that you can restore that if necessary, to at least get back to where things are now.

If you've been taking backups regulary and are running in archivelog mode, you could consider restoring an older backup and running through the archived redo logs up to the point in time when the corruption occured (if you can determine when that was).

Do a complete export.  That should give you everything you need to rebuild your database completely, and you may have to do that.

I'm sure you know that Oracle usually does not support users or DBA directly changing objects in the SYS schema (the SYS.AUD$ table is an exception - you can truncate or delete rows from that table).  Have you contacted Oracle support for their help on this?
0
 
LVL 34

Assisted Solution

by:johnsone
johnsone earned 100 total points
Comment Utility
As this is an index, I would think you should be able to rebuild it.  I would do it in restricted mode with no users on the database.

You would definitely want an opinion from Oracle though.  They may consider your database unsupported if you do that.
0
 
LVL 23

Expert Comment

by:seazodiac
Comment Utility
@harlemit:


The easiest way, run this script:

$ORACLE_HOME/rdbms/admin/utlrp.sql


this will recompile all the invalid and corrupted objects.
0
 
LVL 34

Expert Comment

by:Mark Geerlings
Comment Utility
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.
0
 
LVL 23

Expert Comment

by:seazodiac
Comment Utility
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.


0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 23

Assisted Solution

by:seazodiac
seazodiac earned 100 total points
Comment Utility
I don't remember when, but I remembered
that Once I recompiled by invoking that script to recompile the invalid indexes in the database dictionary catalogs.


but I guess the poster's situation might be different.

I am not sure the word "corrupted" is the block corrupted physically or logically.

In the former case, he might need to rebuild the block or recover from the backup.

in the latter, he might be able to rebuild it manually.
0
 
LVL 13

Assisted Solution

by:anand_2000v
anand_2000v earned 100 total points
Comment Utility
Obviously the only option will be to recover using a backup file. A sys object should not be rebuilt as this will lead to other problems.  Markgeer's answer seems to be the best solution
0
 
LVL 47

Assisted Solution

by:schwertner
schwertner earned 100 total points
Comment Utility
Do a FULL export.
After that do import (only on SYS schema, I am not sure if it is possible, if not - do a full import).
But use
SHOW=yes
parameter and use also logfile parameter.
In the logfile you will have an section for creating indexes. Filter using text editor the name of the index and the creation statement. After that drop the index and recreate it using that script.
0
 
LVL 34

Expert Comment

by:johnsone
Comment Utility
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.
0
 

Expert Comment

by:alariver
Comment Utility
From SQL(DML) Level, You cannot rebuild OBJ$ about indexes, Even if you startup migrate/upgrade.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now