[Incomplete recovery], [non-recovery]

Source: Internet
Author: User

[Incomplete recovery], [non-recovery]
Incomplete recovery
Set until scn <scn No.>
Set until time | timestamp... the most common
Set until logseq <>

Example of Incomplete recovery:
SQL> conn scott/tiger
Connected.
SQL> select to_char (sysdate, 'yyyy-mm-dd hh24: mi: ss') from dual;
TO_CHAR (SYSDATE, 'yy
-------------------
18:32:14

SQL> drop table emp purge;

Table dropped.

If the table is not completely restored after the table is deleted, the table can be queried. Otherwise, the table cannot be recovered.

You can use log mining to obtain the recovery time point:
SQL> select group #, status from v $ log;
GROUP # STATUS
--------------------------
1 INACTIVE
2 INACTIVE
3 CURRENT
SQL> select member from v $ logfile;
MEMBER
--------------------------------------------------------------------------------
/U01/oracle/oradata/jadl10g/redo03.log
/U01/oracle/oradata/jadl10g/redo02.log
/U01/oracle/oradata/jadl10g/redo01.log
SQL> exec dbms_logmnr.add_logfile ('/u01/oracle/oradata/jadl10g/redo03.log ');

PL/SQL procedure successfully completed.

SQL> execute dbms_logmnr.start_logmnr (options => dbms_logmnr.dict_from_online_catalog );

PL/SQL procedure successfully completed.

SQL> select scn, to_char (timestamp, 'yyyy-mm-dd hh24: mi: ss') time, SQL _redo from v $ logmnr_contents where table_name = 'emp ';

SCN TIME
-----------------------------
SQL _REDO
--------------------------------------------------------------------------------
483041 18:32:29
Drop table emp purge;

SQL> exec dbms_logmnr.end_logmnr;
PL/SQL procedure successfully completed.
[Oracle @ oracle ~] $ Rman target/
Recovery Manager: Release 10.2.0.5.0-Production on Thu Nov 6 19:37:08 2014
Copyright (c) 1982,200 7, Oracle. All rights reserved.
Connected to target database: JADL10G (DBID = 2011530396)

RMAN> shutdown immediate
Using target database control file instead of recovery catalog
Database closed
Database dismounted
Oracle instance shut down

RMAN> startup mount
Connected to target database (not started)
Oracle instance started
Database mounted
Total System Global Area 599785472 bytes
Fixed Size 2098112 bytes
Variable Size 163580992 bytes
Database Buffers 427819008 bytes
Redo Buffers 6287360 bytes

RMAN> run {
2> set until time "to_date ('2017-11-06 18:32:28 ', 'yyyy-mm-dd hh24: mi: ss')"; --- set until scn 2014
3> restore database;
4> recover database;
5> alter database open resetlogs;
6>}

Executing command: SET until clause
Starting restore at 06-NOV-14
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 155 devtype = DISK
Channel ORA_DISK_1: starting datafile backupset restore
Channel ORA_DISK_1: specifying datafile (s) to restore from backup set
Restoring datafile 00001 to/u01/oracle/oradata/jadl10g/system01.dbf
Restoring datafile 00002 to/u01/oracle/oradata/jadl10g/undotbs01.dbf
Restoring datafile 00003 to/u01/oracle/oradata/jadl10g/sysaux01.dbf
Restoring datafile 00004 to/u01/oracle/oradata/jadl10g/users01.dbf
Restoring datafile 00005 to/u01/oracle/oradata/jadl10g/example01.dbf
Channel ORA_DISK_1: reading from backup piece/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T160359_b5pbvjts _. bkp
Channel ORA_DISK_1: restored backup piece 1
Piece handle =/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/empty _. bkp tag = TAG20141106T160359
Channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 06-NOV-14
Starting recover at 06-NOV-14
Using channel ORA_DISK_1
Starting media recovery
Media recovery complete, elapsed time: 00:00:04
Finished recover at 06-NOV-14
Database opened
The following operations show that the table exists:
Select * from scott. emp;

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.