Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Fixing Corrupt System Managed Undo Segments

Oracle Tips by Mike Ault

September 16th, 2004

For additional information on handling corruption, see the BC expert notes on corruption and see MOSC Note 1088018.1 - Handling Oracle Database Corruption Issues.

Also see how to fix  undo log corruption (ORA-00375) with _undo_log_corruption

In Oracleand greater releases of Oracle the old rollback segment has been replaced with undo segments and for the most part, have become automatically sized and managed. However, what happens when one of these system created and managed undo segments becomes corrupt? Well, for one thing you will get errors in your alert log similar to the following:

Errors in file /oracle/admin/test/bdump/test2_smon_21466.trc:
ORA-00600: internal error code, arguments: [6006], [1], [], [], [], [], [], []
SMON: mark undo segment 29 as needs recovery

ORACLE Instance test2 (pid = 11) - Error 600 encountered while recovering
transaction (29, 42) on object 36.

(Note that this will show the same undo segment, transaction, and object number each time it occurs, if the undo segment and transaction number vary, then the problem is with the object number displayed)

In fact, you may get many of these over and over again.

So, what can you do about this?

If you attempt to alter the undo segment with the ALTER ROLLBACK SEGMENT command you will be told in no uncertain terms that this is system managed and can?t be altered.

So, here is what you need to do:

  1. Create a new system management undo tablespace:

           connect / as sysdba

create undo tablespace
   undotbs2
datafile
   ?/u02/oracle/oradata/test/undotbs2.dbf?
size
   500m;

  1. Determine the problem undo segment:

 select
   segment_name,
   status
fom
   dba_rollback_segs;

 The problem segment will show a ?Needs Recovery? status.

  1. Alter the system to use the new undo tablespace:

 alter system set undo_tablespace=undotbs2 scope=both;  (Note if you are not using an spfile, omit the scope command) 

  1. If you are using an spfile, create a pfile from it:

          connect / as sysdba

          create pfile=?/u01/oracle/admin/test/pfile/inittest.ora?
         from spfile; 

  1. Edit the inittest.ora pfile and add (using the undo segment from our example error):

   *._offline_rollback_segments=? _SYSSMU29$?

   *._corrupt_rollback_segments=?_SYSSMU29$? 

  1. Now shutdown your instance, this may require a shutdown abort, but try a shutdown immediate first.
     

  2. Startup using the manual startup command:

    startup pfile=?/u01/oacle/admin/test/pfile=inittest.ora? 

  1. Alter the old undo tablespace offline:

         alter tablespace undotbs1 offline; 

  1. Drop the offending tablespace:

         drop tablespace undotbs1 including contents and datafiles; 

  1. Shut down immediate.
     

  2. Edit the inittest.ora file to eliminate the underscore parameters.
     

  3. Restart the instance using the pfile option.
     

  4. Create an spfile from the pfile:

           create spfile from pfile=?/u01/oracle/admin/test/pfile/inittest.ora?;

Once step 13 is accomplished the database should be up normally. However, it might be wise to do a full backup and then rebuild using an export and import. Since we had to drop a undo segment that had some possibly active transactions un-applied the database may not be fully consistent.

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

��  
 
 
 
 

 
 
 

 
 
Oracle performance tuning software 
 
oracle dba poster
Oracle Linux poster
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright ? 1996 -  2014

All rights reserved by Burleson

Oracle ? is the registered trademark of Oracle Corporation.