Oracle7.X rollback table space data file error delete handling method

  • 2020-05-06 11:50:50
  • OfStack

The ORACLE tutorial you are looking at is: Oracle7.X rollback tablespace data file deletion handling method. -- i. introduction:

The rollback segment is part of the database that records information about database changes. Use this information to achieve database read consistency and its recovery. If the rollback segment fails, the database cannot be started normally, resulting in the database paralysis and the user's inability to read and write data. If the rollback segment can be troubleshooted, the actual data of the user will not be affected. I recently encountered a problem in my practical work: the user mistakenly deleted the database file (rbs01.dbf) of the rollback segment tablespace (rbs), so that the database could not run normally.

-- step 2:

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

There is an system rollback segment in the system table space that is necessary for the database to be created when the database is first created and automatically brought online when the database is opened. 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 mount.

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

-- 2. Restore the database and open

-- take the data file rbs01.dbf for rollback segment rbs from the control file of the database offline and remove it.

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

-- restore the database.

svrmgrl >recover database using backup controlfile;

--

may appear on the screen

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

-- you can find the online log file you need according to the sequence# and input the log file (including the full path). When looking for the online log file, you can use svrmgrl >select * from v$log; At this point, the database recovery is 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. Start database

with the newly created rollback segment

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

-- conclusion:

-- the troubleshooting of this fault is carried out by the database in the way of archiving, which has been successfully passed by the author on HP-UX 10.20 and Solaris 2.5 system platforms.


Related articles: