Oracle Database ODU recovery scenarios

Source: Internet
Author: User

Oracle DatabaseIt is a large database system. oracle databases are easy to operate and fast to operate, which has won the favor of many users.ODUThere are many commands, especially the key unload commands. This article will briefly introduce the command sequence used for data recovery using ODU in several scenarios.

Scenario 1: The database cannot be started, but the data dictionary in the system tablespace is complete.

Generate data dictionary: unload dict

List users: list users

List all tables of a user: list table username

Restore table: unload table username. tablename

It can also be restored by user: unload user username

Scenario 2: The table is TRUNCATE.

Table space of the OFFLINE table

Generate data dictionary: unload dict

Display the table field header: desc username. tablename

Find the actual data object id: dump datafile file # block #

Scan data: scan extent

Restore table: unload table username. tablename object object_id

UPDATE:

Starting from version 3.0.7, it is more convenient to restore the Truncate table. You only need to perform the following steps:

Table space of the OFFLINE table

Generate data dictionary: unload dict

Scan data: scan extent

Restore table: unload table username. tablename object auto

Scenario 3: The table is dropped.

Table space of the OFFLINE table

Use logminer to mine the data object id of the drop table from the log. If the data object id cannot be mined, use scenario 4 below to restore the table.

Scan data: scan extent

If there is no table structure information, you need to automatically determine: unload object data_object_id sample

Restore table: unload object data_object_id column coltype...

Scenario 4: The system tablespace is damaged.

Scan data: scan extent

Search data: unload object all sample

Search for the required data from the result file sample.txt

Restore the required table: unload object data_object_id column coltype...

Scenario 5: The table data is deleted.

Set the parameter unload_deleted to YES.

Generate data dictionary: unload dict

Restore table: unload table username. tablename

The preceding five recovery scenarios of oracle Database ODU are summarized and hope to help you.

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.