Oracle7.X rolls back the table space data file deletion handling method

  • 2020-05-10 23:05:57
  • OfStack

The ORACLE tutorial you are looking at is: Oracle7.X rollback the table space data file deletion process. -- 1. Introduction:

The rollback segment is part 1 of the database that records information about database changes. Use this information to achieve read-1 specificity of the database and its recovery. If the rollback segment fails, the database cannot be started normally, resulting in the database being paralyzed and users unable to read and write data. If you can troubleshoot the rollback segment, the user's actual data will not be affected. Recently, the author encountered a problem in practical work: the user deleted the database file (rbs01.dbf) of the rollback segment tablespace (rbs) by mistake, so that the database could not run normally. The following processing steps of this method are excluded by the author.

-- 2. Steps:

-- 1. First, change the parameter file init.ora, so that the database can be mount.

-- there is an system rollback segment in the system tablespace. This rollback segment is required for the database, and when the database is first created, it is created and automatically online with the opening of the database. The rollback segment we usually use is the public rollback segment, not the system rollback segment. If the public rollback segment fails, we can temporarily use the system rollback segment instead, so that the database can be accessed by mount.

svrmgrl > Shutdown abort
$     vi     $ORACLE_HOME/dbs/init < sid > .ora
    rollback_segments=(system)
    _corrupted_rollback_segments=(r01,r02,r03,r04)
svrmgrl > Startup mount

-- 2. Restore the database and open it

-- take the data file rbs01.dbf from the control file of the database that rolls back the segment tablespace rbs, rbs01.dbf, offline and removed.

svrmgrl > alter database datafile
'# # # # / rbs01. dbf' offline drop;

-- restore the database.

svrmgrl > recover database using backup controlfile;

-- the screen might appear:

ORA_00280 Change #### for thread# is in sequence#
specify log:[ < RET > for suggested|AUTO|from
logsource|cancel]

You can find the online log file you need with the sequence# and enter the log file (including the full path). You can use svrmgrl to find the online log file > select * from v $log; The database recovery is now complete. Open the database again.

svrmgrl > alter database open resetlogs;

-- 3. Rebuild the new rollback segment

-- delete the old rollback segment and rollback table space.

svrmgrl > alter rollback_segment r01 offline drop;
svrmgrl > alter rollback_segment r02 offline drop;
svrmgrl > alter rollback_segment r03 offline drop;
svrmgrl > alter rollback_segment r04 offline drop;
svrmgrl > drop tablespace rbs including contents;

Rebuild the new rollback table space and rollback segment.

svrmgrl > connect internal
svrmgrl > create rollback segment ro tablespace system;
svrmgrl > alter rollback segment ro online;
svrmgrl > create tablespace rbs datafile
'# # # # / rbs01. dbf' size # # k;
svrmgrl > create rollback segment r01 tablespace rbs;
svrmgrl > create rollback segment r02 tablespace rbs;
svrmgrl > create rollback segment r03 tablespace rbs;
svrmgrl > create rollback segment r04 tablespace rbs;
svrmgrl > alter rollback segment r01 online;
svrmgrl > alter rollback segment r02 online;
svrmgrl > alter rollback segment r03 online;
svrmgrl > alter rollback segment r04 online;

-- 4. Use the newly created rollback segment to start the database

svrmgrl > Shutdown abort
$     vi     $ORACLE_HOME/dbs/init < sid > .ora
    rollback_segments=(r01,r02,r03,r04)
    removes the parameter _corrupted_rollback_segment
svrmgrl > Startup normal

-- 3. Conclusion:

-- the troubleshooting is carried out by the database in the way of archiving, which has been successfully passed on HP-UX 10.20 and Solaris2.5 system platforms.  


Related articles: