这个是12C下新增加的功能,类似于11g的基于时间点的表空间的恢复。其实这个恢复,就是基于时间点的表的恢复。
先总结,再测试
总结
1 RMAN连接到PDB上,进行基于时间点的表恢复,是不可以的。明确显示,不能在pdb数据库上操作
2 不能使用11g下的类似于基于时间点的表空间的恢复的语法,需要加上 of Pluggable database 参数。因为找不到表,RMAN怎么会知道该表是在那个PDB下呢?所以要加上of pluggable database 参数
3 不能恢复公共账号下的表(待确定,是真的不能恢复还是语法问题,自己测试的时候,总是提示语法问题)
测试过程如下:
进行恢复,是不允许RMAN连接到PDB上,进行表恢复的
RMAN> recover table bb.t1 until scn 2741027 auxiliary destination '/u01/backup_test';
Starting recover at 05-MAY-18
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/05/2018 16:02:18
RMAN-07536: command not allowed when connected to a Pluggable Database
另外。连接到rman连接到cdb上进行恢复,说找不到表bb.t1, 也无法恢复 。因为CDB不知道bb.t1在哪里 。常规的恢复写法不行。要加上of pluggable database参数
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/05/2018 16:13:59
RMAN-05063: Cannot recover specified tables
RMAN-05057: Table BB.T1 not found
在pdb1 下建立表,备份,drop表,恢复测试
SYS@test>alter session set container=pdb1;
Session altered.
SYS@test>select * from bb.t1;
NUM NAME NOW
---------- ------------------------- ---------
1 first test row 05-MAY-18
2 second test row 05-MAY-18
3 thrid test row 05-MAY-18
SYS@test>show con_name
CON_NAME
------------------------------
PDB1
SYS@test>select timestamp_to_scn(current_timestamp) from v$database;
TIMESTAMP_TO_SCN(CURRENT_TIMESTAMP)
-----------------------------------
2754443
SYS@test>drop table bb.t1;
Table dropped.
SYS@test>
进行恢复测试
RMAN> RECOVER TABLE bb.t1 of pluggable database pdb1 UNTIL SCN 2754443 AUXILIARY DESTINATION '/u01/backup_test';
Starting recover at 05-MAY-18
current log archived
using channel ORA_DISK_1
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 PDB1:SYSTEM
Tablespace UNDOTBS1
Tablespace PDB1:UNDOTBS1
Creating automatic instance, with SID='soDy'
initialization parameters used for automatic instance:
db_name=TEST
db_unique_name=soDy_pitr_pdb1_TEST
compatible=12.2.0
db_block_size=8192
db_files=200
diagnostic_dest=/u01/app/oracle
_system_trig_enabled=FALSE
db_domain=us.oracle.com
sga_target=1104M
processes=200
db_create_file_dest=/u01/backup_test
log_archive_dest_1='location=/u01/backup_test'
enable_pluggable_database=true
_clone_one_pdb_recovery=true
#No auxiliary parameter file used
starting up automatic instance TEST
Oracle instance started
Total System Global Area 1157627904 bytes
Fixed Size 8792008 bytes
Variable Size 318769208 bytes
Database Buffers 822083584 bytes
Redo Buffers 7983104 bytes
Automatic instance created
contents of Memory Script:
{
# set requested point in time
set until scn 2754443;
# 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 05-MAY-18
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=34 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/test/TEST/autobackup/2018_05_05/o1_mf_s_975343482_fgtvqtn8_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/test/TEST/autobackup/2018_05_05/o1_mf_s_975343482_fgtvqtn8_.bkp tag=TAG20180505T164442
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/backup_test/TEST/controlfile/o1_mf_fgtvspqr_.ctl
Finished restore at 05-MAY-18
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 scn 2754443;
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 1 to new;
set newname for clone datafile 9 to new;
set newname for clone datafile 4 to new;
set newname for clone datafile 11 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 10 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, 9, 4, 11, 3, 10;
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
executing command: SET NEWNAME
renamed tempfile 1 to /u01/backup_test/TEST/datafile/o1_mf_temp_%u_.tmp in control file
renamed tempfile 3 to /u01/backup_test/TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_temp_%u_.tmp in control file
Starting restore at 05-MAY-18
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 00003 to /u01/backup_test/TEST/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/orcl_incr0_20180503_975164281_1ut1vkrp_1_1
channel ORA_AUX_DISK_1: piece handle=/home/oracle/orcl_incr0_20180503_975164281_1ut1vkrp_1_1 tag=WEEKLY_FULL_BACKUP
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
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 00004 to /u01/backup_test/TEST/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/orcl_incr0_20180503_975164453_28t1vl15_1_1
channel ORA_AUX_DISK_1: piece handle=/home/oracle/orcl_incr0_20180503_975164453_28t1vl15_1_1 tag=WEEKLY_FULL_BACKUP
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
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 /u01/backup_test/TEST/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/orcl_incr0_20180503_975164281_1tt1vkrp_1_1
channel ORA_AUX_DISK_1: piece handle=/home/oracle/orcl_incr0_20180503_975164281_1tt1vkrp_1_1 tag=WEEKLY_FULL_BACKUP
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:35
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 00009 to /u01/backup_test/TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00011 to /u01/backup_test/TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00010 to /u01/backup_test/TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/test/TEST/67FDCE20C52E0518E0531202A8C0E70F/backupset/2018_05_05/o1_mf_nnndf_TAG20180505T164416_fgtvq20x_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/test/TEST/67FDCE20C52E0518E0531202A8C0E70F/backupset/2018_05_05/o1_mf_nnndf_TAG20180505T164416_fgtvq20x_.bkp tag=TAG20180505T164416
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 05-MAY-18
datafile 1 switched to datafile copy
input datafile copy RECID=11 STAMP=975343636 file name=/u01/backup_test/TEST/datafile/o1_mf_system_fgtvtr3j_.dbf
datafile 9 switched to datafile copy
input datafile copy RECID=12 STAMP=975343636 file name=/u01/backup_test/TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_system_fgtvvvcs_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=13 STAMP=975343636 file name=/u01/backup_test/TEST/datafile/o1_mf_undotbs1_fgtvtq9o_.dbf
datafile 11 switched to datafile copy
input datafile copy RECID=14 STAMP=975343636 file name=/u01/backup_test/TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_undotbs1_fgtvvvdk_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=15 STAMP=975343636 file name=/u01/backup_test/TEST/datafile/o1_mf_sysaux_fgtvsxtj_.dbf
datafile 10 switched to datafile copy
input datafile copy RECID=16 STAMP=975343636 file name=/u01/backup_test/TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_sysaux_fgtvvvbx_.dbf
contents of Memory Script:
{
# set requested point in time
set until scn 2754443;
# online the datafiles restored or switched
sql clone "alter database datafile 1 online";
sql clone 'PDB1' "alter database datafile
9 online";
sql clone "alter database datafile 4 online";
sql clone 'PDB1' "alter database datafile
11 online";
sql clone "alter database datafile 3 online";
sql clone 'PDB1' "alter database datafile
10 online";
# recover and open database read only
recover clone database tablespace "SYSTEM", "PDB1":"SYSTEM", "UNDOTBS1", "PDB1":"UNDOTBS1", "SYSAUX", "PDB1":"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 9 online
sql statement: alter database datafile 4 online
sql statement: alter database datafile 11 online
sql statement: alter database datafile 3 online
sql statement: alter database datafile 10 online
Starting recover at 05-MAY-18
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting incremental datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00004: /u01/backup_test/TEST/datafile/o1_mf_undotbs1_fgtvtq9o_.dbf
destination for restore of datafile 00003: /u01/backup_test/TEST/datafile/o1_mf_sysaux_fgtvsxtj_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/orcl_incr1_20180503_975164773_2mt1vlb5_1_1
channel ORA_AUX_DISK_1: piece handle=/home/oracle/orcl_incr1_20180503_975164773_2mt1vlb5_1_1 tag=DAILY_INCR1_BACKUP
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_AUX_DISK_1: starting incremental datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/backup_test/TEST/datafile/o1_mf_system_fgtvtr3j_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/orcl_incr1_20180503_975164773_2lt1vlb5_1_1
channel ORA_AUX_DISK_1: piece handle=/home/oracle/orcl_incr1_20180503_975164773_2lt1vlb5_1_1 tag=DAILY_INCR1_BACKUP
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
starting media recovery
archived log for thread 1 with sequence 41 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_03/o1_mf_1_41_fgofbs35_.arc
archived log for thread 1 with sequence 42 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_03/o1_mf_1_42_fgofbs72_.arc
archived log for thread 1 with sequence 43 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_43_fgq9gnkj_.arc
archived log for thread 1 with sequence 44 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_44_fgqgynnj_.arc
archived log for thread 1 with sequence 45 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_45_fgqlh6oz_.arc
archived log for thread 1 with sequence 46 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_46_fgqm5v1q_.arc
archived log for thread 1 with sequence 47 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_47_fgqomlck_.arc
archived log for thread 1 with sequence 48 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_48_fgqotm7w_.arc
archived log for thread 1 with sequence 49 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_49_fgtbnjbz_.arc
archived log for thread 1 with sequence 50 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_50_fgtln85n_.arc
archived log for thread 1 with sequence 51 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_51_fgtsb0gk_.arc
archived log for thread 1 with sequence 52 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_52_fgtsbyyj_.arc
archived log for thread 1 with sequence 53 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_53_fgtsqs5y_.arc
archived log for thread 1 with sequence 54 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_54_fgtt9dml_.arc
archived log for thread 1 with sequence 55 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_55_fgttcdr6_.arc
archived log for thread 1 with sequence 56 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_56_fgtvs2k9_.arc
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_03/o1_mf_1_41_fgofbs35_.arc thread=1 sequence=41
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_03/o1_mf_1_42_fgofbs72_.arc thread=1 sequence=42
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_43_fgq9gnkj_.arc thread=1 sequence=43
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_44_fgqgynnj_.arc thread=1 sequence=44
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_45_fgqlh6oz_.arc thread=1 sequence=45
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_46_fgqm5v1q_.arc thread=1 sequence=46
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_47_fgqomlck_.arc thread=1 sequence=47
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_04/o1_mf_1_48_fgqotm7w_.arc thread=1 sequence=48
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_49_fgtbnjbz_.arc thread=1 sequence=49
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_50_fgtln85n_.arc thread=1 sequence=50
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_51_fgtsb0gk_.arc thread=1 sequence=51
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_52_fgtsbyyj_.arc thread=1 sequence=52
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_53_fgtsqs5y_.arc thread=1 sequence=53
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_54_fgtt9dml_.arc thread=1 sequence=54
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_55_fgttcdr6_.arc thread=1 sequence=55
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_56_fgtvs2k9_.arc thread=1 sequence=56
media recovery complete, elapsed time: 00:02:02
Finished recover at 05-MAY-18
sql statement: alter database open read only
contents of Memory Script:
{
sql clone 'alter pluggable database PDB1 open read only';
}
executing Memory Script
sql statement: alter pluggable database PDB1 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 =
''/u01/backup_test/TEST/controlfile/o1_mf_fgtvspqr_.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 1157627904 bytes
Fixed Size 8792008 bytes
Variable Size 318769208 bytes
Database Buffers 822083584 bytes
Redo Buffers 7983104 bytes
sql statement: alter system set control_files = ''/u01/backup_test/TEST/controlfile/o1_mf_fgtvspqr_.ctl'' comment= ''RMAN set'' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 1157627904 bytes
Fixed Size 8792008 bytes
Variable Size 318769208 bytes
Database Buffers 822083584 bytes
Redo Buffers 7983104 bytes
sql statement: alter database mount clone database
contents of Memory Script:
{
# set requested point in time
set until scn 2754443;
# set destinations for recovery set and auxiliary set datafiles
set newname for datafile 12 to new;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 12;
switch clone datafile all;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
Starting restore at 05-MAY-18
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=34 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 00012 to /u01/backup_test/SODY_PITR_PDB1_TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_users_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/test/TEST/67FDCE20C52E0518E0531202A8C0E70F/backupset/2018_05_05/o1_mf_nnndf_TAG20180505T155417_fgtrs9g6_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/test/TEST/67FDCE20C52E0518E0531202A8C0E70F/backupset/2018_05_05/o1_mf_nnndf_TAG20180505T155417_fgtrs9g6_.bkp tag=TAG20180505T155417
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 05-MAY-18
datafile 12 switched to datafile copy
input datafile copy RECID=21 STAMP=975343834 file name=/u01/backup_test/SODY_PITR_PDB1_TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_users_fgtw2sw8_.dbf
contents of Memory Script:
{
# set requested point in time
set until scn 2754443;
# online the datafiles restored or switched
sql clone 'PDB1' "alter database datafile
12 online";
# recover and open resetlogs
recover clone database tablespace "PDB1":"USERS", "SYSTEM", "PDB1":"SYSTEM", "UNDOTBS1", "PDB1":"UNDOTBS1", "SYSAUX", "PDB1":"SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
executing Memory Script
executing command: SET until clause
sql statement: alter database datafile 12 online
Starting recover at 05-MAY-18
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/test/TEST/archivelog/2018_05_05/o1_mf_1_51_fgtsb0gk_.arc
archived log for thread 1 with sequence 52 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_52_fgtsbyyj_.arc
archived log for thread 1 with sequence 53 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_53_fgtsqs5y_.arc
archived log for thread 1 with sequence 54 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_54_fgtt9dml_.arc
archived log for thread 1 with sequence 55 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_55_fgttcdr6_.arc
archived log for thread 1 with sequence 56 is already on disk as file /u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_56_fgtvs2k9_.arc
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_51_fgtsb0gk_.arc thread=1 sequence=51
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_52_fgtsbyyj_.arc thread=1 sequence=52
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_53_fgtsqs5y_.arc thread=1 sequence=53
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_54_fgtt9dml_.arc thread=1 sequence=54
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_55_fgttcdr6_.arc thread=1 sequence=55
archived log file name=/u01/app/oracle/fast_recovery_area/test/TEST/archivelog/2018_05_05/o1_mf_1_56_fgtvs2k9_.arc thread=1 sequence=56
media recovery complete, elapsed time: 00:00:00
Finished recover at 05-MAY-18
database opened
contents of Memory Script:
{
sql clone 'alter pluggable database PDB1 open';
}
executing Memory Script
sql statement: alter pluggable database PDB1 open
contents of Memory Script:
{
# create directory for datapump import
sql 'PDB1' "create or replace directory
TSPITR_DIROBJ_DPDIR as ''
/u01/backup_test''";
# create directory for datapump export
sql clone 'PDB1' "create or replace directory
TSPITR_DIROBJ_DPDIR as ''
/u01/backup_test''";
}
executing Memory Script
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/backup_test''
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/backup_test''
Performing export of tables...
EXPDP> Starting "SYS"."TSPITR_EXP_soDy_zsnA":
EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
EXPDP> . . exported "BB"."T1" 6.015 KB 3 rows
EXPDP> Master table "SYS"."TSPITR_EXP_soDy_zsnA" successfully loaded/unloaded
EXPDP> ******************************************************************************
EXPDP> Dump file set for SYS.TSPITR_EXP_soDy_zsnA is:
EXPDP> /u01/backup_test/tspitr_soDy_49323.dmp
EXPDP> Job "SYS"."TSPITR_EXP_soDy_zsnA" successfully completed at Sat May 5 16:53:13 2018 elapsed 0 00:00:54
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_soDy_pktE" successfully loaded/unloaded
IMPDP> Starting "SYS"."TSPITR_IMP_soDy_pktE":
IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
IMPDP> . . imported "BB"."T1" 6.015 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_soDy_pktE" successfully completed at Sat May 5 16:53:53 2018 elapsed 0 00:00:28
Import completed
Removing automatic instance
Automatic instance removed
auxiliary instance file /u01/backup_test/TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_temp_fgtw11vf_.tmp deleted
auxiliary instance file /u01/backup_test/TEST/datafile/o1_mf_temp_fgtw0rf4_.tmp deleted
auxiliary instance file /u01/backup_test/SODY_PITR_PDB1_TEST/onlinelog/o1_mf_3_fgtw34wr_.log deleted
auxiliary instance file /u01/backup_test/SODY_PITR_PDB1_TEST/onlinelog/o1_mf_2_fgtw2ww3_.log deleted
auxiliary instance file /u01/backup_test/SODY_PITR_PDB1_TEST/onlinelog/o1_mf_1_fgtw2wss_.log deleted
auxiliary instance file /u01/backup_test/SODY_PITR_PDB1_TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_users_fgtw2sw8_.dbf deleted
auxiliary instance file /u01/backup_test/TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_sysaux_fgtvvvbx_.dbf deleted
auxiliary instance file /u01/backup_test/TEST/datafile/o1_mf_sysaux_fgtvsxtj_.dbf deleted
auxiliary instance file /u01/backup_test/TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_undotbs1_fgtvvvdk_.dbf deleted
auxiliary instance file /u01/backup_test/TEST/datafile/o1_mf_undotbs1_fgtvtq9o_.dbf deleted
auxiliary instance file /u01/backup_test/TEST/67FDCE20C52E0518E0531202A8C0E70F/datafile/o1_mf_system_fgtvvvcs_.dbf deleted
auxiliary instance file /u01/backup_test/TEST/datafile/o1_mf_system_fgtvtr3j_.dbf deleted
auxiliary instance file /u01/backup_test/TEST/controlfile/o1_mf_fgtvspqr_.ctl deleted
auxiliary instance file tspitr_soDy_49323.dmp deleted
Finished recover at 05-MAY-18
RMAN>
查询结果
SYS@test>select * from bb.t1;
NUM NAME NOW
---------- ------------------------- ---------
1 first test row 05-MAY-18
2 second test row 05-MAY-18
3 thrid test row 05-MAY-18
SYS@test>
END