- 在网络上看到12c的rman可以进行table 级别的恢复,由于自己就做一下试验。本试验测试了rman基于时间点恢复一个被删除表的操作过程。
[oracle@ol6 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Nov 19 15:05:09 2014
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select con_id,dbid,name,open_mode from v$pdbs;
CON_ID DBID NAME OPEN_MODE
---------- ---------- ------------------------------ ----------
2 500891672 PDB$SEED READ ONLY
3 1722454057 PDBCDB1 READ WRITE
SQL> alter session set container=pdbcdb1;
Session altered.
SQL> create table abraham.test(id number,insert_date date);
Table created.
SQL> insert into abraham.test values(1,sysdate);
1 row created.
SQL> commit;
Commit complete.
SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
TO_CHAR(SYSDATE,'YY
-------------------
2014-11-19 15:06:35
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@ol6 ~]$ rman target sys/Sino2034
Recovery Manager: Release 12.1.0.2.0 - Production on Wed Nov 19 15:07:55 2014
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: CDB1 (DBID=837685586)
RMAN> backup as compressed backupset database;
Starting backup at 19-NOV-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=264 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/cdb1/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/cdb1/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/cdb1/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/cdb1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 19-NOV-14
channel ORA_DISK_1: finished piece 1 at 19-NOV-14
piece handle=/u01/app/oracle/fast_recovery_area/CDB1/backupset/2014_11_19/o1_mf_nnndf_TAG20141119T150812_b6rjgxjb_.bkp tag=TAG20141119T150812 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/u01/app/oracle/oradata/cdb1/pdbcdb1/sysaux01.dbf
input datafile file number=00010 name=/u01/app/oracle/oradata/cdb1/pdbcdb1/pdbcdb1_users01.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/cdb1/pdbcdb1/system01.dbf
channel ORA_DISK_1: starting piece 1 at 19-NOV-14
channel ORA_DISK_1: finished piece 1 at 19-NOV-14
piece handle=/u01/app/oracle/fast_recovery_area/CDB1/081DDD8AE0D23A74E053DE00A8C0E259/backupset/2014_11_19/o1_mf_nnndf_TAG20141119T150812_b6rjjngn_.bkp tag=TAG20141119T150812 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/u01/app/oracle/oradata/cdb1/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/cdb1/pdbseed/system01.dbf
channel ORA_DISK_1: starting piece 1 at 19-NOV-14
channel ORA_DISK_1: finished piece 1 at 19-NOV-14
piece handle=/u01/app/oracle/fast_recovery_area/CDB1/081DC73CC41A37CDE053DE00A8C050F3/backupset/2014_11_19/o1_mf_nnndf_TAG20141119T150812_b6rjkqmg_.bkp tag=TAG20141119T150812 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
Finished backup at 19-NOV-14
Starting Control File and SPFILE Autobackup at 19-NOV-14
piece handle=/u01/app/oracle/fast_recovery_area/CDB1/autobackup/2014_11_19/o1_mf_s_864054618_b6rjltvx_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 19-NOV-14
RMAN> exit
Recovery Manager complete.
[oracle@ol6 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Nov 19 15:10:28 2014
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> alter session set container=pdbcdb1;
Session altered.
SQL> insert into abraham.test values(2,sysdate);
1 row created.
SQL> commit;
Commit complete.
SQL> insert into abraham.test values(3,sysdate);
1 row created.
SQL> commit;
Commit complete.
SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
TO_CHAR(SYSDATE,'YY
-------------------
2014-11-19 15:11:27
SQL> drop table abraham.test purge;
Table dropped.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@ol6 ~]$ rman target sys/Sino2034
Recovery Manager: Release 12.1.0.2.0 - Production on Wed Nov 19 15:11:39 2014
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: CDB1 (DBID=837685586)
RMAN> RECOVER TABLE ABRAHAM."TEST" OF PLUGGABLE DATABASE PDBCDB1 UNTIL TIME "to_date('2014-11-19 15:11:27','YYYY-MM-DD:HH24:MI:SS')" AUXILIARY DESTINATION '/tmp' DATAPUMP DESTINATION '/tmp' DUMP FILE 'tst_dump.dmp';
还原代码如下:
点击(此处)折叠或打开
- RMAN> RECOVER TABLE ABRAHAM.\"TEST\" OF PLUGGABLE DATABASE PDBCDB1 UNTIL TIME \"to_date(\'2014-11-19 15:11:27\',\'YYYY-MM-DD:HH24:MI:SS\')\" AUXILIARY DESTINATION \'/tmp\' DATAPUMP DESTINATION \'/tmp\' DUMP FILE \'tst_dump.dmp\';
-
- Starting recover at 19-NOV-14
- using target database control file instead of recovery catalog
- current log archived
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=258 device type=DISK
- RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time
-
- List of tablespaces expected to have UNDO segments
- Tablespace SYSTEM
- Tablespace UNDOTBS1
-
- Creating automatic instance, with SID=\'ewFk\'
-
- initialization parameters used for automatic instance:
- db_name=CDB1
- db_unique_name=ewFk_pitr_PDBCDB1_CDB1
- compatible=12.1.0.2.0
- db_block_size=8192
- db_files=200
- diagnostic_dest=/u01/app/oracle
- _system_trig_enabled=FALSE
- sga_target=2560M
- processes=200
- db_create_file_dest=/tmp
- log_archive_dest_1=\'location=/tmp\'
- enable_pluggable_database=true
- _clone_one_pdb_recovery=true
- #No auxiliary parameter file used
-
-
- starting up automatic instance CDB1
-
- Oracle instance started
-
- Total System Global Area 2684354560 bytes
-
- Fixed Size 2928008 bytes
- Variable Size 587203192 bytes
- Database Buffers 2080374784 bytes
- Redo Buffers 13848576 bytes
- Automatic instance created
-
- contents of Memory Script:
- {
- # set requested point in time
- set until time \"to_date(\'2014-11-19 15:11:27\',\'YYYY-MM-DD:HH24:MI:SS\')\";
- # restore the controlfile
- restore clone controlfile;
-
- # mount the controlfile
- sql clone \'alter database mount clone database\';
-
- # archive current online log
- sql \'alter system archive log current\';
- }
- executing Memory Script
-
- executing command: SET until clause
-
- Starting restore at 19-NOV-14
- allocated channel: ORA_AUX_DISK_1
- channel ORA_AUX_DISK_1: SID=165 device type=DISK
-
- channel ORA_AUX_DISK_1: starting datafile backup set restore
- channel ORA_AUX_DISK_1: restoring control file
- channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/CDB1/autobackup/2014_11_19/o1_mf_s_864054618_b6rjltvx_.bkp
- channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/CDB1/autobackup/2014_11_19/o1_mf_s_864054618_b6rjltvx_.bkp tag=TAG20141119T151018
- channel ORA_AUX_DISK_1: restored backup piece 1
- channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
- output file name=/tmp/CDB1/controlfile/o1_mf_b6rjprrq_.ctl
- Finished restore at 19-NOV-14
-
- sql statement: alter database mount clone database
-
- sql statement: alter system archive log current
-
- contents of Memory Script:
- {
- # set requested point in time
- set until time \"to_date(\'2014-11-19 15:11:27\',\'YYYY-MM-DD:HH24:MI:SS\')\";
- # set destinations for recovery set and auxiliary set datafiles
- set newname for clone datafile 1 to new;
- set newname for clone datafile 4 to new;
- set newname for clone datafile 3 to new;
- set newname for clone datafile 8 to new;
- set newname for clone datafile 9 to new;
- set newname for clone tempfile 1 to new;
- set newname for clone tempfile 3 to new;
- # switch all tempfiles
- switch clone tempfile all;
- # restore the tablespaces in the recovery set and the auxiliary set
- restore clone datafile 1, 4, 3, 8, 9;
-
- switch clone datafile all;
- }
- executing Memory Script
-
- executing command: SET until clause
-
- executing command: SET NEWNAME
-
- executing command: SET NEWNAME
-
- executing command: SET NEWNAME
-
- executing command: SET NEWNAME
-
- executing command: SET NEWNAME
-
- executing command: SET NEWNAME
-
- executing command: SET NEWNAME
-
- renamed tempfile 1 to /tmp/CDB1/datafile/o1_mf_temp_%u_.tmp in control file
- renamed tempfile 3 to /tmp/CDB1/datafile/o1_mf_temp_%u_.tmp in control file
-
- Starting restore at 19-NOV-14
- using channel ORA_AUX_DISK_1
-
- channel ORA_AUX_DISK_1: starting datafile backup set restore
- channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
- channel ORA_AUX_DISK_1: restoring datafile 00001 to /tmp/CDB1/datafile/o1_mf_system_%u_.dbf
- channel ORA_AUX_DISK_1: restoring datafile 00004 to /tmp/CDB1/datafile/o1_mf_undotbs1_%u_.dbf
- channel ORA_AUX_DISK_1: restoring datafile 00003 to /tmp/CDB1/datafile/o1_mf_sysaux_%u_.dbf
- channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/CDB1/backupset/2014_11_19/o1_mf_nnndf_TAG20141119T150812_b6rjgxjb_.bkp
- channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/CDB1/backupset/2014_11_19/o1_mf_nnndf_TAG20141119T150812_b6rjgxjb_.bkp tag=TAG20141119T150812
- channel ORA_AUX_DISK_1: restored backup piece 1
- channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:15
- channel ORA_AUX_DISK_1: starting datafile backup set restore
- channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
- channel ORA_AUX_DISK_1: restoring datafile 00008 to /tmp/CDB1/datafile/o1_mf_system_%u_.dbf
- channel ORA_AUX_DISK_1: restoring datafile 00009 to /tmp/CDB1/datafile/o1_mf_sysaux_%u_.dbf
- channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/CDB1/081DDD8AE0D23A74E053DE00A8C0E259/backupset/2014_11_19/o1_mf_nnndf_TAG20141119T150812_b6rjjngn_.bkp
- channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/CDB1/081DDD8AE0D23A74E053DE00A8C0E259/backupset/2014_11_19/o1_mf_nnndf_TAG20141119T150812_b6rjjngn_.bkp tag=TAG20141119T150812
- channel ORA_AUX_DISK_1: restored backup piece 1
- channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:35
- Finished restore at 19-NOV-14
-
- datafile 1 switched to datafile copy
- input datafile copy RECID=8 STAMP=864054861 file name=/tmp/CDB1/datafile/o1_mf_system_b6rjpytd_.dbf
- datafile 4 switched to datafile copy
- input datafile copy RECID=9 STAMP=864054861 file name=/tmp/CDB1/datafile/o1_mf_undotbs1_b6rjpywg_.dbf
- datafile 3 switched to datafile copy
- input datafile copy RECID=10 STAMP=864054861 file name=/tmp/CDB1/datafile/o1_mf_sysaux_b6rjpywc_.dbf
- datafile 8 switched to datafile copy
- input datafile copy RECID=11 STAMP=864054861 file name=/tmp/CDB1/datafile/o1_mf_system_b6rjsb86_.dbf
- datafile 9 switched to datafile copy
- input datafile copy RECID=12 STAMP=864054861 file name=/tmp/CDB1/datafile/o1_mf_sysaux_b6rjsb6t_.dbf
-
- contents of Memory Script:
- {
- # set requested point in time
- set until time \"to_date(\'2014-11-19 15:11:27\',\'YYYY-MM-DD:HH24:MI:SS\')\";
- # online the datafiles restored or switched
- sql clone \"alter database datafile 1 online\";
- sql clone \"alter database datafile 4 online\";
- sql clone \"alter database datafile 3 online\";
- sql clone \'PDBCDB1\' \"alter database datafile
- 8 online\";
- sql clone \'PDBCDB1\' \"alter database datafile
- 9 online\";
- # recover and open database read only
- recover clone database tablespace \"SYSTEM\", \"UNDOTBS1\", \"SYSAUX\", \"PDBCDB1\":\"SYSTEM\", \"PDBCDB1\":\"SYSAUX\";
- sql clone \'alter database open read only\';
- }
- executing Memory Script
-
- executing command: SET until clause
-
- sql statement: alter database datafile 1 online
-
- sql statement: alter database datafile 4 online
-
- sql statement: alter database datafile 3 online
-
- sql statement: alter database datafile 8 online
-
- sql statement: alter database datafile 9 online
-
- Starting recover at 19-NOV-14
- using channel ORA_AUX_DISK_1
-
- starting media recovery
-
- archived log for thread 1 with sequence 51 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB1/archivelog/2014_11_19/o1_mf_1_51_b6rjpdjs_.arc
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB1/archivelog/2014_11_19/o1_mf_1_51_b6rjpdjs_.arc thread=1 sequence=51
- media recovery complete, elapsed time: 00:00:01
- Finished recover at 19-NOV-14
-
- sql statement: alter database open read only
-
- contents of Memory Script:
- {
- sql clone \'alter pluggable database PDBCDB1 open read only\';
- }
- executing Memory Script
-
- sql statement: alter pluggable database PDBCDB1 open read only
-
- contents of Memory Script:
- {
- sql clone \"create spfile from memory\";
- shutdown clone immediate;
- startup clone nomount;
- sql clone \"alter system set control_files =
- \'\'/tmp/CDB1/controlfile/o1_mf_b6rjprrq_.ctl\'\' comment=
- \'\'RMAN set\'\' scope=spfile\";
- shutdown clone immediate;
- startup clone nomount;
- # mount database
- sql clone \'alter database mount clone database\';
- }
- executing Memory Script
-
- sql statement: create spfile from memory
-
- database closed
- database dismounted
- Oracle instance shut down
-
- connected to auxiliary database (not started)
- Oracle instance started
-
- Total System Global Area 2684354560 bytes
-
- Fixed Size 2928008 bytes
- Variable Size 603980408 bytes
- Database Buffers 2063597568 bytes
- Redo Buffers 13848576 bytes
-
- sql statement: alter system set control_files = \'\'/tmp/CDB1/controlfile/o1_mf_b6rjprrq_.ctl\'\' comment= \'\'RMAN set\'\' scope=spfile
-
- Oracle instance shut down
-
- connected to auxiliary database (not started)
- Oracle instance started
-
- Total System Global Area 2684354560 bytes
-
- Fixed Size 2928008 bytes
- Variable Size 603980408 bytes
- Database Buffers 2063597568 bytes
- Redo Buffers 13848576 bytes
-
- sql statement: alter database mount clone database
-
- contents of Memory Script:
- {
- # set requested point in time
- set until time \"to_date(\'2014-11-19 15:11:27\',\'YYYY-MM-DD:HH24:MI:SS\')\";
- # set destinations for recovery set and auxiliary set datafiles
- set newname for datafile 10 to new;
- # restore the tablespaces in the recovery set and the auxiliary set
- restore clone datafile 10;
-
- switch clone datafile all;
- }
- executing Memory Script
-
- executing command: SET until clause
-
- executing command: SET NEWNAME
-
- Starting restore at 19-NOV-14
- allocated channel: ORA_AUX_DISK_1
- channel ORA_AUX_DISK_1: SID=12 device type=DISK
-
- channel ORA_AUX_DISK_1: starting datafile backup set restore
- channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
- channel ORA_AUX_DISK_1: restoring datafile 00010 to /tmp/EWFK_PITR_PDBCDB1_CDB1/datafile/o1_mf_users_%u_.dbf
- channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/CDB1/081DDD8AE0D23A74E053DE00A8C0E259/backupset/2014_11_19/o1_mf_nnndf_TAG20141119T150812_b6rjjngn_.bkp
- channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/CDB1/081DDD8AE0D23A74E053DE00A8C0E259/backupset/2014_11_19/o1_mf_nnndf_TAG20141119T150812_b6rjjngn_.bkp tag=TAG20141119T150812
- channel ORA_AUX_DISK_1: restored backup piece 1
- channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
- Finished restore at 19-NOV-14
-
- datafile 10 switched to datafile copy
- input datafile copy RECID=14 STAMP=864054925 file name=/tmp/EWFK_PITR_PDBCDB1_CDB1/datafile/o1_mf_users_b6rjw60o_.dbf
-
- contents of Memory Script:
- {
- # set requested point in time
- set until time \"to_date(\'2014-11-19 15:11:27\',\'YYYY-MM-DD:HH24:MI:SS\')\";
- # online the datafiles restored or switched
- sql clone \'PDBCDB1\' \"alter database datafile
- 10 online\";
- # recover and open resetlogs
- recover clone database tablespace \"PDBCDB1\":\"USERS\", \"SYSTEM\", \"UNDOTBS1\", \"SYSAUX\", \"PDBCDB1\":\"SYSTEM\", \"PDBCDB1\":\"SYSAUX\" delete archivelog;
- alter clone database open resetlogs;
- }
- executing Memory Script
-
- executing command: SET until clause
-
- sql statement: alter database datafile 10 online
-
- Starting recover at 19-NOV-14
- using channel ORA_AUX_DISK_1
-
- starting media recovery
-
- archived log for thread 1 with sequence 51 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB1/archivelog/2014_11_19/o1_mf_1_51_b6rjpdjs_.arc
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB1/archivelog/2014_11_19/o1_mf_1_51_b6rjpdjs_.arc thread=1 sequence=51
- media recovery complete, elapsed time: 00:00:00
- Finished recover at 19-NOV-14
-
- database opened
-
- contents of Memory Script:
- {
- sql clone \'alter pluggable database PDBCDB1 open\';
- }
- executing Memory Script
-
- sql statement: alter pluggable database PDBCDB1 open
-
- contents of Memory Script:
- {
- # create directory for datapump import
- sql \'PDBCDB1\' \"create or replace directory
- TSPITR_DIROBJ_DPDIR as \'\'
- /tmp\'\'\";
- # create directory for datapump export
- sql clone \'PDBCDB1\' \"create or replace directory
- TSPITR_DIROBJ_DPDIR as \'\'
- /tmp\'\'\";
- }
- executing Memory Script
-
- sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as \'\'/tmp\'\'
-
- sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as \'\'/tmp\'\'
-
- Performing export of tables...
- EXPDP> Starting \"SYS\".\"TSPITR_EXP_ewFk_rjaD\":
- EXPDP> Estimate in progress using BLOCKS method...
- EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
- EXPDP> Total estimation using BLOCKS method: 64 KB
- EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
- EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
- EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
- EXPDP> . . exported \"ABRAHAM\".\"TEST\" 5.515 KB 3 rows
- EXPDP> Master table \"SYS\".\"TSPITR_EXP_ewFk_rjaD\" successfully loaded/unloaded
- EXPDP> ******************************************************************************
- EXPDP> Dump file set for SYS.TSPITR_EXP_ewFk_rjaD is:
- EXPDP> /tmp/tst_dump.dmp
- EXPDP> Job \"SYS\".\"TSPITR_EXP_ewFk_rjaD\" successfully completed at Wed Nov 19 15:16:19 2014 elapsed 0 00:00:25
- Export completed
-
-
- contents of Memory Script:
- {
- # shutdown clone before import
- shutdown clone abort
- }
- executing Memory Script
-
- Oracle instance shut down
-
- Performing import of tables...
- IMPDP> Master table \"SYS\".\"TSPITR_IMP_ewFk_Bbvu\" successfully loaded/unloaded
- IMPDP> Starting \"SYS\".\"TSPITR_IMP_ewFk_Bbvu\":
- IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
- IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
- IMPDP> . . imported \"ABRAHAM\".\"TEST\" 5.515 KB 3 rows
- IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
- IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
- IMPDP> Job \"SYS\".\"TSPITR_IMP_ewFk_Bbvu\" successfully completed at Wed Nov 19 15:16:36 2014 elapsed 0 00:00:07
- Import completed
-
-
- Removing automatic instance
- Automatic instance removed
- auxiliary instance file /tmp/CDB1/datafile/o1_mf_temp_b6rjtp9g_.tmp deleted
- auxiliary instance file /tmp/CDB1/datafile/o1_mf_temp_b6rjtjv2_.tmp deleted
- auxiliary instance file /tmp/EWFK_PITR_PDBCDB1_CDB1/onlinelog/o1_mf_3_b6rjwhs2_.log deleted
- auxiliary instance file /tmp/EWFK_PITR_PDBCDB1_CDB1/onlinelog/o1_mf_2_b6rjwhb9_.log deleted
- auxiliary instance file /tmp/EWFK_PITR_PDBCDB1_CDB1/onlinelog/o1_mf_1_b6rjwgvf_.log deleted
- auxiliary instance file /tmp/EWFK_PITR_PDBCDB1_CDB1/datafile/o1_mf_users_b6rjw60o_.dbf deleted
- auxiliary instance file /tmp/CDB1/datafile/o1_mf_sysaux_b6rjsb6t_.dbf deleted
- auxiliary instance file /tmp/CDB1/datafile/o1_mf_system_b6rjsb86_.dbf deleted
- auxiliary instance file /tmp/CDB1/datafile/o1_mf_sysaux_b6rjpywc_.dbf deleted
- auxiliary instance file /tmp/CDB1/datafile/o1_mf_undotbs1_b6rjpywg_.dbf deleted
- auxiliary instance file /tmp/CDB1/datafile/o1_mf_system_b6rjpytd_.dbf deleted
- auxiliary instance file /tmp/CDB1/controlfile/o1_mf_b6rjprrq_.ctl deleted
- auxiliary instance file tst_dump.dmp deleted
- Finished recover at 19-NOV-14
Recovery Manager complete.
[oracle@ol6 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Nov 19 15:16:51 2014
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> alter session set container=pdbcdb1;
Session altered.
SQL> select * from abraham.test;
ID INSERT_DA
---------- ---------
2 19-NOV-14
3 19-NOV-14
1 19-NOV-14
整体恢复过程是:还原system、undo、sysaux表空间,然后read only数据库,然后重启数据库还原表所在表空间,然后expdp导出表,根据需要决定是否导入表到数据库。 - RMAN> RECOVER TABLE ABRAHAM.\"TEST\" OF PLUGGABLE DATABASE PDBCDB1 UNTIL TIME \"to_date(\'2014-11-19 15:11:27\',\'YYYY-MM-DD:HH24:MI:SS\')\" AUXILIARY DESTINATION \'/tmp\' DATAPUMP DESTINATION \'/tmp\' DUMP FILE \'tst_dump.dmp\';
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29439655/viewspace-1339043/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29439655/viewspace-1339043/