Oracle Database uses log mining to restore accidentally deleted data

Source: Internet
Author: User


In database operations, when we accidentally delete tables, data, or views, we can use log mining to restore Oracle from Incomplete recovery, this article describes how to use log mining to recover data from incomplete Oracle recovery. Next we will introduce this process.
The implementation of this method must meet two conditions: 1. DB works in archive mode; 2. There are cold data files.
Next we will introduce the recovery process in the following format:
Www.2cto.com
-- Concatenate the statement where to dig
-- Where to dig
-- Start digging
-- Find the result --> the timestamp of the statement to be restored; -- disable DB
-- Copy the cold backup file-*. dbf to the directory of the data file and overwrite it. Because the log is used to redo the data in the table space such as sys and user;
-- Start to mount
-- Restore to the time point of 1037333 drop table scott. emp purge; -- Requirement: trc
-- Start DB in resetlogs;
Principle: 1. cold backup data file *. dbf is older than the current one, so the scn of the data file must be smaller than the current one; 2. use the log mining method to find the scn for table deletion in the log; 3. use a cold backup data file * When the database is shut down *. dbf, overwrite the current *. dbf file; -- ensure data file integrity 4. start DB to mount and restore to the time point of log mining (redo the data file once using logs. open in resetlog mode --- previous logs are overwritten;
PS: www.2cto.com database has four statuses: shutdown, nomount, mount, and open. Shutdown refers to the shutdown status. Nomount indicates that the Root parameter file has constructed the instance status. Mount refers to opening the control file for the instance and reading the relevant information in the control file, but it is not verified. Open is used to verify the relevant files. If there is no problem, open the file so that users can access it. Here is an introduction to the use of log mining to restore accidentally deleted tables, data, and views that are not completely restored in Oracle. Hope to bring you some benefits!

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.