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!