Professional Oracle tablespace reconstruction technical guidance

Source: Internet
Author: User

We have previously introduced Oracle tablespace recovery. Before recreating an Oracle tablespace, we will first let you know about the user's tablespace errors and then introduce how to recreate an Oracle tablespace.

Error:

A ORA-01157, ORA-01110, or operating system-level error such as a ORA-07360 occurs when you start a database, which causes an incorrect ORA-01116, ORA-01110, and operating system-level error ORA-07368 when you close the database using shutdown normal or shutdown immediate.

There are two solutions:

1. the user's tablespace can be easily reconstructed
That is, the recently exported objects are available or the objects in the tablespace can be easily recreated. in this case, the easiest way is to offline and delete the data file, delete the tablespace, and recreate the Oracle tablespace and all objects.
Svrmgrl> startup mount
Svrmgrl> alter database datafile 'filename' offline drop;
Svrmgrl> alter database open;
Svrmgrl> drop tablespace tablespace_name including contents;
Recreate the Oracle tablespace and all objects.

2. the user's tablespace cannot be easily rebuilt
In most cases, it is impossible to reconstruct the Oracle tablespace. the method is back up and restore the media. if your system runs in NOARCHIVELOG mode, only the lost data in the online redo log can be recovered. The procedure is 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 runs in NOARCHIVELOG mode:
Svrmgrl> select file #, change # from v $ recover_file;
If CHANGE # is greater than FIRST_CHANGE #, the data file can be restored.
If CHANGE # is smaller than FIRST_CHANGE #, the data file cannot be recovered. Recover the last full backup or adopt solution 1.
5) svrmgrl> recover datafile filename;
6) Confirm that the recovery is successful
7) svrmgrl> alter database open resetlogs;

3. Read-Only tablespaces do not require media restoration. You only need to restore the backup. The only exception is:
◆ The tablespace is changed to read-write mode after the last backup.
◆ The tablespace is changed to read-only mode after the last backup.
◆ In this case, media recovery is required

  1. How to use Oracle password expiration and profile
  2. Two solutions for Oracle password loss
  3. Step 6: Understand the Oracle tablespace status
  4. Create and assign Oracle user permissions
  5. Introduction to Oracle user permissions and role management

Related Article

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.