How to delete tablespace data files in Oracle7.X rollback by mistake

Source: Internet
Author: User

The ORACLE tutorial is: how to accidentally delete the tablespace data file for Oracle7.X rollback. ---- 1. Introduction:

---- The rollback segment is a part of the database, which records the database change information. Use this information to achieve database read consistency and restoration. If the rollback segment fails, the database cannot be started normally, resulting in database paralysis and the user cannot read or write data. If the rollback segment can be eliminated, the actual data of the user will not be affected. I recently encountered a problem in my practical work: the user deleted the database file rbs01.dbf In the rollback segment tablespace (rbs) by mistake, so that the database could not run properly, next I will exclude the processing steps of this method.

---- Step 2:

---- 1. First, modify the parameter file init. ora so that the database can be mounted.

---- There is a system rollback segment in the system tablespace, which is required by the database on the rollback segment. When the database is created for the first time, it is created accordingly, and automatically online as the database is opened. We usually use a public rollback segment instead of a system rollback segment. If a public rollback segment fails, we can replace the system rollback segment temporarily, enables the database to be mounted.

Svrmgrl> Shutdown abort
$ Vi $ ORACLE_HOME/dbs/init <sid>. ora
Rollback_segments = (system)
_ Uploupted_rollback_segments = (r01, r02, r03, r04)
Svrmgrl> Startup mount

---- 2. Restore the database and open it again

---- Remove the rbs data file rbs01.dbf In the rollback segment from the Database Control File.

Svrmgrl> alter database datafile
'##// Rbs01.dbf' offline drop;

---- Recover the database.

Svrmgrl> recover database using backup controlfile;

---- The screen may appear at this time:

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 based on sequence # And enter the log file (including the full path ), when searching online log files, you can use svrmgrl> select * from v $ log. At this time, the database is restored. Then open the database.

Svrmgrl> alter database open resetlogs;

---- 3. re-create a rollback segment

---- Delete the old rollback segment and the rollback tablespace.

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;

---- Create a new table space and segment for rollback.

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 new rollback segment to start the database

Svrmgrl> Shutdown abort
$ Vi $ ORACLE_HOME/dbs/init <sid>. ora
Rollback_segments = (r01, r02, r03, r04)
Remove the parameter _ uploupted_rollback_segment.
Svrmgrl> Startup normal

---- 3. Conclusion:

---- The troubleshooting of this fault is performed by the database in archive mode. The author has successfully passed through the two system platforms of HP-UX 10.20 and Solaris2.5.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.