Oracle Table Space Recovery scheme

Source: Internet
Author: User

First, user table space

Error: ORA-01157,ORA-01110 or operating system-level errors, such as ORA-07360, occur when you start the database

Error ora-01116,ora-01110 and operating system-level errors are caused when the database is closed (using shutdown normal or shutdown immediate) ORA-07368

There are two solutions to this problem:

1. User's table space can be easily rebuilt

That is, the most recently exported object is available or the objects in the tablespace can be easily rebuilt, and so on. In this case, the easiest way to do this is to offline and delete the data file, delete the table space, and rebuild the table space and all the objects.

Svrmgrl> Startup Mount

svrmgrl> ALTER DATABASE datafile filename offline drop;

svrmgrl> ALTER DATABASE open;

Svrmgrl> drop tablespace tablespace_name including contents;

Rebuilds the table space and all objects.

2. User's table space cannot be easily rebuilt

In most cases, rebuilding tablespaces is impossible and too hard work. The method is to back up and do media recovery. If your system is running in Noarchivelog mode, only the missing data is available. On the online redo log The Chinese can be restored, as follows:

1) Restore The lost datafile from a backup

2) svrmgrl> startup mount

3) svrmgrl> Select v1.group#,member,sequence#,first_change#

> From V$log v1,v$logfile v2

> where v1.group#=v2.group#;

4 If the database is running in Noarchivelog mode:

Svrmgrl> select file#,change# from V$recover_file;

If the change# is greater than the smallest first_change# the data file can be restored.

If the change# is less than the smallest first_change# the data file is not recoverable. Restore the most recent one

Times full backup or adoption scheme one.

5) svrmgrl> recover datafile filename;

6) Confirm the successful recovery

7) svrmgrl> ALTER DATABASE open resetlogs;

3. read-only table space does not require media recovery, as long as the backup can be restored. The only exception is:

Tablespace is changed to Read-write mode after last backup

Tablespace is changed to read-only mode after last backup

In this case, media recovery is required

Second, temporary table space

The temporary tablespace does not contain real data, and the method of recovery is to delete the temporary table space and rebuild it.

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.