|
书上P206页去关闭:
- DROP TRIGGER open_all_pdbs;
复制代码
实验:Practice 7-13: TSPITR on PDB Tablespaces 同样适用于11g的普通的数据库:
在表空间PITR时,结合了物理备份和数据泵传送表空间两个技术,但是命令很简单(auxiliary destination),同时会启动随机四个英文字符的auxiliary实例:
SQL> !ps aux | grep ora_smon
oracle 2102 0.0 0.2 523720 40572 ? Ss 09:53 0:00 ora_smon_cfkC
oracle 2220 0.0 0.0 106148 2568 pts/14 S+ 09:53 0:00 /bin/bash -c ps aux | grep ora_smon
oracle 2222 0.0 0.0 103308 2004 pts/14 S+ 09:53 0:00 grep ora_smon
oracle 23233 0.0 1.5 6799168 254088 ? Ss 09:21 0:00 ora_smon_orcl
如果你要TSPITR恢复的表空间是默认表空间,请在做TSPITR前设置成非默认表空间:
以下是11g普通数据库的TSPITR恢复过程:
- [oracle@station90 ~]$ rman target /
- Recovery Manager: Release 11.2.0.3.0 - Production on Sat Dec 16 10:00:45 2017
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1343950367)
- RMAN> recover tablespace users until time '2017-12-16:09:34:24'
- 2> auxiliary destination '/u01/app/oracle/oradata';
- Starting recover at 2017-12-16:10:00:51
- using target database control file instead of recovery catalog
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=204 device type=DISK
- allocated channel: ORA_DISK_2
- channel ORA_DISK_2: SID=16 device type=DISK
- allocated channel: ORA_DISK_3
- channel ORA_DISK_3: SID=79 device type=DISK
- allocated channel: ORA_DISK_4
- channel ORA_DISK_4: SID=141 device type=DISK
- allocated channel: ORA_DISK_5
- channel ORA_DISK_5: SID=198 device type=DISK
- allocated channel: ORA_DISK_6
- channel ORA_DISK_6: SID=15 device type=DISK
- allocated channel: ORA_DISK_7
- channel ORA_DISK_7: SID=7 device type=DISK
- allocated channel: ORA_DISK_8
- channel ORA_DISK_8: SID=145 device type=DISK
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=197 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=81 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- 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='rxlF'
- initialization parameters used for automatic instance:
- db_name=ORCL
- db_unique_name=rxlF_tspitr_ORCL
- compatible=11.2.0.0.0
- db_block_size=8192
- db_files=200
- sga_target=280M
- processes=50
- db_create_file_dest=/u01/app/oracle/oradata
- log_archive_dest_1='location=/u01/app/oracle/oradata'
- #No auxiliary parameter file used
- starting up automatic instance ORCL
- Oracle instance started
- Total System Global Area 292278272 bytes
- Fixed Size 2227744 bytes
- Variable Size 100663776 bytes
- Database Buffers 184549376 bytes
- Redo Buffers 4837376 bytes
- Automatic instance created
- Running TRANSPORT_SET_CHECK on recovery set tablespaces
- TRANSPORT_SET_CHECK completed successfully
- contents of Memory Script:
- {
- # set requested point in time
- set until time "2017-12-16:09:34:24";
- # 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';
- # avoid unnecessary autobackups for structural changes during TSPITR
- sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
- }
- executing Memory Script
- executing command: SET until clause
- Starting restore at 2017-12-16:10:01:40
- allocated channel: ORA_AUX_DISK_1
- channel ORA_AUX_DISK_1: SID=80 device type=DISK
- allocated channel: ORA_AUX_DISK_2
- channel ORA_AUX_DISK_2: SID=5 device type=DISK
- allocated channel: ORA_AUX_DISK_3
- channel ORA_AUX_DISK_3: SID=30 device type=DISK
- allocated channel: ORA_AUX_DISK_4
- channel ORA_AUX_DISK_4: SID=56 device type=DISK
- allocated channel: ORA_AUX_DISK_5
- channel ORA_AUX_DISK_5: SID=82 device type=DISK
- allocated channel: ORA_AUX_DISK_6
- channel ORA_AUX_DISK_6: SID=6 device type=DISK
- allocated channel: ORA_AUX_DISK_7
- channel ORA_AUX_DISK_7: SID=31 device type=DISK
- allocated channel: ORA_AUX_DISK_8
- channel ORA_AUX_DISK_8: SID=57 device type=DISK
- allocated channel: ORA_AUX_SBT_TAPE_1
- channel ORA_AUX_SBT_TAPE_1: SID=83 device type=SBT_TAPE
- channel ORA_AUX_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_AUX_SBT_TAPE_2
- channel ORA_AUX_SBT_TAPE_2: SID=7 device type=SBT_TAPE
- channel ORA_AUX_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_AUX_SBT_TAPE_1: starting datafile backup set restore
- channel ORA_AUX_SBT_TAPE_1: restoring control file
- channel ORA_AUX_SBT_TAPE_1: reading from backup piece c-1343950367-20170522-00
- channel ORA_AUX_SBT_TAPE_1: piece handle=c-1343950367-20170522-00 tag=TAG20170522T204208
- channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
- channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:25
- output file name=/u01/app/oracle/oradata/ORCL/controlfile/o1_mf_f38znrdf_.ctl
- Finished restore at 2017-12-16:10:02:09
- sql statement: alter database mount clone database
- sql statement: alter system archive log current
- sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
- contents of Memory Script:
- {
- # set requested point in time
- set until time "2017-12-16:09:34:24";
- # set destinations for recovery set and auxiliary set datafiles
- set newname for clone datafile 1 to new;
- set newname for clone datafile 3 to new;
- set newname for clone datafile 2 to new;
- set newname for clone tempfile 1 to new;
- set newname for datafile 4 to
- "+DATA/orcl/datafile/users.259.816169553";
- # switch all tempfiles
- switch clone tempfile all;
- # restore the tablespaces in the recovery set and the auxiliary set
- restore clone datafile 1, 3, 2, 4;
- 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
- renamed tempfile 1 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_%u_.tmp in control file
- Starting restore at 2017-12-16:10:02:15
- using channel ORA_AUX_DISK_1
- using channel ORA_AUX_DISK_2
- using channel ORA_AUX_DISK_3
- using channel ORA_AUX_DISK_4
- using channel ORA_AUX_DISK_5
- using channel ORA_AUX_DISK_6
- using channel ORA_AUX_DISK_7
- using channel ORA_AUX_DISK_8
- using channel ORA_AUX_SBT_TAPE_1
- using channel ORA_AUX_SBT_TAPE_2
- channel ORA_AUX_SBT_TAPE_1: starting datafile backup set restore
- channel ORA_AUX_SBT_TAPE_1: specifying datafile(s) to restore from backup set
- channel ORA_AUX_SBT_TAPE_1: restoring datafile 00003 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_%u_.dbf
- channel ORA_AUX_SBT_TAPE_1: reading from backup piece 1ls4tgjd_1_1
- channel ORA_AUX_SBT_TAPE_2: starting datafile backup set restore
- channel ORA_AUX_SBT_TAPE_2: specifying datafile(s) to restore from backup set
- channel ORA_AUX_SBT_TAPE_2: restoring datafile 00001 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_%u_.dbf
- channel ORA_AUX_SBT_TAPE_2: restoring datafile 00002 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_%u_.dbf
- channel ORA_AUX_SBT_TAPE_2: restoring datafile 00004 to +DATA/orcl/datafile/users.259.816169553
- channel ORA_AUX_SBT_TAPE_2: reading from backup piece 1ks4tgjd_1_1
- channel ORA_AUX_SBT_TAPE_1: piece handle=1ls4tgjd_1_1 tag=0T_INCR0_WHOLE
- channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
- channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:35
- channel ORA_AUX_SBT_TAPE_2: piece handle=1ks4tgjd_1_1 tag=0T_INCR0_WHOLE
- channel ORA_AUX_SBT_TAPE_2: restored backup piece 1
- channel ORA_AUX_SBT_TAPE_2: restore complete, elapsed time: 00:00:35
- Finished restore at 2017-12-16:10:02:54
- datafile 1 switched to datafile copy
- input datafile copy RECID=6 STAMP=962877774 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_f38zozco_.dbf
- datafile 3 switched to datafile copy
- input datafile copy RECID=7 STAMP=962877774 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_f38zoy8c_.dbf
- datafile 2 switched to datafile copy
- input datafile copy RECID=8 STAMP=962877774 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_f38zozdd_.dbf
- contents of Memory Script:
- {
- # set requested point in time
- set until time "2017-12-16:09:34:24";
- # online the datafiles restored or switched
- sql clone "alter database datafile 1 online";
- sql clone "alter database datafile 3 online";
- sql clone "alter database datafile 2 online";
- sql clone "alter database datafile 4 online";
- # recover and open resetlogs
- recover clone database tablespace "USERS", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
- alter clone database open resetlogs;
- }
- executing Memory Script
- executing command: SET until clause
- sql statement: alter database datafile 1 online
- sql statement: alter database datafile 3 online
- sql statement: alter database datafile 2 online
- sql statement: alter database datafile 4 online
- Starting recover at 2017-12-16:10:02:54
- using channel ORA_AUX_DISK_1
- using channel ORA_AUX_DISK_2
- using channel ORA_AUX_DISK_3
- using channel ORA_AUX_DISK_4
- using channel ORA_AUX_DISK_5
- using channel ORA_AUX_DISK_6
- using channel ORA_AUX_DISK_7
- using channel ORA_AUX_DISK_8
- using channel ORA_AUX_SBT_TAPE_1
- using channel ORA_AUX_SBT_TAPE_2
- starting media recovery
- archived log for thread 1 with sequence 108 is already on disk as file +FRA/orcl/archivelog/2017_12_15/thread_1_seq_108.330.962789117
- archived log for thread 1 with sequence 109 is already on disk as file +FRA/orcl/archivelog/2017_12_15/thread_1_seq_109.331.962790099
- archived log for thread 1 with sequence 110 is already on disk as file +FRA/orcl/archivelog/2017_12_15/thread_1_seq_110.329.962802097
- archived log for thread 1 with sequence 111 is already on disk as file +FRA/orcl/archivelog/2017_12_15/thread_1_seq_111.332.962816533
- archived log for thread 1 with sequence 112 is already on disk as file +FRA/orcl/archivelog/2017_12_15/thread_1_seq_112.333.962825453
- archived log for thread 1 with sequence 113 is already on disk as file +FRA/orcl/archivelog/2017_12_15/thread_1_seq_113.328.962829675
- archived log for thread 1 with sequence 114 is already on disk as file +FRA/orcl/archivelog/2017_12_15/thread_1_seq_114.327.962833705
- archived log for thread 1 with sequence 115 is already on disk as file +FRA/orcl/archivelog/2017_12_16/thread_1_seq_115.326.962875305
- archived log for thread 1 with sequence 116 is already on disk as file +FRA/orcl/archivelog/2017_12_16/thread_1_seq_116.325.962875373
- archived log for thread 1 with sequence 117 is already on disk as file +FRA/orcl/archivelog/2017_12_16/thread_1_seq_117.324.962876059
- archived log for thread 1 with sequence 118 is already on disk as file +FRA/orcl/archivelog/2017_12_16/thread_1_seq_118.323.962876059
- archived log for thread 1 with sequence 119 is already on disk as file +FRA/orcl/archivelog/2017_12_16/thread_1_seq_119.322.962876071
- channel ORA_AUX_SBT_TAPE_1: starting archived log restore to default destination
- channel ORA_AUX_SBT_TAPE_1: restoring archived log
- archived log thread=1 sequence=107
- channel ORA_AUX_SBT_TAPE_1: reading from backup piece 1ms4tgk7_1_1
- channel ORA_AUX_SBT_TAPE_1: piece handle=1ms4tgk7_1_1 tag=0T_INCR0_WHOLE
- channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
- channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:25
- archived log file name=/u01/app/oracle/oradata/1_107_816169635.dbf thread=1 sequence=107
- channel clone_default: deleting archived log(s)
- archived log file name=/u01/app/oracle/oradata/1_107_816169635.dbf RECID=100 STAMP=962877792
- archived log file name=+FRA/orcl/archivelog/2017_12_15/thread_1_seq_108.330.962789117 thread=1 sequence=108
- archived log file name=+FRA/orcl/archivelog/2017_12_15/thread_1_seq_109.331.962790099 thread=1 sequence=109
- archived log file name=+FRA/orcl/archivelog/2017_12_15/thread_1_seq_110.329.962802097 thread=1 sequence=110
- archived log file name=+FRA/orcl/archivelog/2017_12_15/thread_1_seq_111.332.962816533 thread=1 sequence=111
- archived log file name=+FRA/orcl/archivelog/2017_12_15/thread_1_seq_112.333.962825453 thread=1 sequence=112
- archived log file name=+FRA/orcl/archivelog/2017_12_15/thread_1_seq_113.328.962829675 thread=1 sequence=113
- archived log file name=+FRA/orcl/archivelog/2017_12_15/thread_1_seq_114.327.962833705 thread=1 sequence=114
- archived log file name=+FRA/orcl/archivelog/2017_12_16/thread_1_seq_115.326.962875305 thread=1 sequence=115
- archived log file name=+FRA/orcl/archivelog/2017_12_16/thread_1_seq_116.325.962875373 thread=1 sequence=116
- archived log file name=+FRA/orcl/archivelog/2017_12_16/thread_1_seq_117.324.962876059 thread=1 sequence=117
- archived log file name=+FRA/orcl/archivelog/2017_12_16/thread_1_seq_118.323.962876059 thread=1 sequence=118
- archived log file name=+FRA/orcl/archivelog/2017_12_16/thread_1_seq_119.322.962876071 thread=1 sequence=119
- media recovery complete, elapsed time: 00:01:15
- Finished recover at 2017-12-16:10:04:37
- database opened
- contents of Memory Script:
- {
- # make read only the tablespace that will be exported
- sql clone 'alter tablespace USERS read only';
- # create directory for datapump import
- sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
- /u01/app/oracle/oradata''";
- # create directory for datapump export
- sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
- /u01/app/oracle/oradata''";
- }
- executing Memory Script
- sql statement: alter tablespace USERS read only
- sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/oradata''
- sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/oradata''
- Performing export of metadata...
- EXPDP> Starting "SYS"."TSPITR_EXP_rxlF":
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_SPEC
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_BODY
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/XMLSCHEMA/XMLSCHEMA
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
- EXPDP> Master table "SYS"."TSPITR_EXP_rxlF" successfully loaded/unloaded
- EXPDP> ******************************************************************************
- EXPDP> Dump file set for SYS.TSPITR_EXP_rxlF is:
- EXPDP> /u01/app/oracle/oradata/tspitr_rxlF_49355.dmp
- EXPDP> ******************************************************************************
- EXPDP> Datafiles required for transportable tablespace USERS:
- EXPDP> +DATA/orcl/datafile/users.259.816169553
- EXPDP> Job "SYS"."TSPITR_EXP_rxlF" successfully completed at 10:05:33
- Export completed
- contents of Memory Script:
- {
- # shutdown clone before import
- shutdown clone immediate
- # drop target tablespaces before importing them back
- sql 'drop tablespace USERS including contents keep datafiles';
- }
- executing Memory Script
- database closed
- database dismounted
- Oracle instance shut down
- sql statement: drop tablespace USERS including contents keep datafiles
- Performing import of metadata...
- IMPDP> Master table "SYS"."TSPITR_IMP_rxlF" successfully loaded/unloaded
- IMPDP> Starting "SYS"."TSPITR_IMP_rxlF":
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_SPEC
- IMPDP> ORA-31684: Object type TYPE:"OE"."SHIPPING_INSTRUCTIONS_T" already existsORA-31684: Object type TYPE:"OE"."REJECTION_T" already existsORA-31684: Object type TYPE:"OE"."ACTION_T" already existsORA-31684: Object type TYPE:"OE"."PART_T" already existsORA-31684: Object type TYPE:"OE"."PRODUCT_REF_LIST_TYP" already existsORA-31684: Object type TYPE:"OE"."CATEGORY_TYP" already existsORA-31684: Object type TYPE:"OE"."SUBCATEGORY_REF_LIST_TYP" already existsORA-31684: Object type TYPE:"OE"."ACTION_V" already existsORA-31684: Object type TYPE:"OE"."LINEITEM_T" already existsORA-31684: Object type TYPE:"OE"."LEAF_CATEGORY_TYP" already existsORA-31684: Object type TYPE:"OE"."COMPOSITE_CATEGORY_TYP" already existsORA-31684: Object type TYPE:"OE"."ACTIONS_T" already existsORA-31684: Object type TYPE:"OE"."LINEITEM_V" already existsORA-31684: Object type TYPE:"OE"."CATALOG_TYP" already existsORA-31684: Object type TYPE:"OE"."LINEITEMS_T" already existsORA-31684: Object type TYPE:"OE"."PURCHASEORDER_T" already exists
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_BODY
- IMPDP> ORA-31684: Object type TYPE_BODY:"OE"."LEAF_CATEGORY_TYP" already existsORA-31684: Object type TYPE_BODY:"OE"."COMPOSITE_CATEGORY_TYP" already existsORA-31684: Object type TYPE_BODY:"OE"."CATALOG_TYP" already exists
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/XMLSCHEMA/XMLSCHEMA
- IMPDP> ORA-39083: Object type XMLSCHEMA failed to create with error:
- ORA-31085: schema "http://localhost:8080/source/schemas/poSource/xsd/purchaseOrder.xsd" already registered
- Failing sql is:
- BEGIN dbms_xmlschema.registerSchema(:1, :2, (:3 = 1), FALSE,FALSE,FALSE,FALSE, :4, options=> :5, schemaoid => :6, import_options => :7); END;
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
- IMPDP> ORA-39083: Object type TABLE:"OE"."PURCHASEORDER" failed to create with error:
- ORA-31061: XDB error: DBMS_XDBZ.ENABLE_HIERARCHY
- ORA-06512: at "XDB.DBMS_XDBZ0", line 131
- ORA-06512: at "XDB.DBMS_XDBZ0", line 588
- ORA-01031: insufficient privileges
- Failing sql is:
- BEGIN DBMS_XDBZ.ENABLE_HIERARCHY('"OE"','"PURCHASEORDER"'); END;
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
- IMPDP> ORA-39083: Object type INDEX_STATISTICS failed to create with error:
- ORA-20000: INDEX "OE"."LINEITEM_TABLE_MEMBERS" does not exist or insufficient privileges
- Failing sql is:
- DECLARE I_N VARCHAR2(60); I_O VARCHAR2(60); NV VARCHAR2(1); c DBMS_METADATA.T_VAR_COLL; df varchar2(21) := 'YYYY-MM-DD:HH24:MI:SS'; stmt varchar2(300) := ' INSERT INTO "SYS"."IMPDP_STATS" (type,version,flags,c1,c2,c3,c5,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,d1,cl1) VALUES (''I'',6,:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,NULORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type TABLE:"OE"."PURCHASEORDER" creation failedORA-39083: Object type INDEX_STATISTICS failed to create with error:
- ORA-20000: INDEX "OE"."ACTION_TABLE_MEMBERS" does not exist or insufficient privileges
- Failing sql is:
- DECLARE I_N VARCHAR2(60); I_O VARCHAR2(60); NV VARCHAR2(1); c DBMS_METADATA.T_VAR_COLL; df varchar2(21) := 'YYYY-MM-DD:HH24:MI:SS'; stmt varchar2(300) := ' INSERT INTO "SYS"."IMPDP_STATS" (type,version,flags,c1,c2,c3,c5,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,d1,cl1) VALUES (''I'',6,:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,NULL,
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
- IMPDP> ORA-39112: Dependent object type TABLE_STATISTICS skipped, base object type TABLE:"OE"."PURCHASEORDER" creation failed
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
- IMPDP> Job "SYS"."TSPITR_IMP_rxlF" completed with 25 error(s) at 10:06:02
- Import completed
- contents of Memory Script:
- {
- # make read write and offline the imported tablespaces
- sql 'alter tablespace USERS read write';
- sql 'alter tablespace USERS offline';
- # enable autobackups after TSPITR is finished
- sql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;';
- }
- executing Memory Script
- sql statement: alter tablespace USERS read write
- sql statement: alter tablespace USERS offline
- sql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;
- Removing automatic instance
- Automatic instance removed
- auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_f38zsqrd_.tmp deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_3_f38zspm4_.log deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_2_f38zsp6o_.log deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_1_f38zsotf_.log deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_f38zozdd_.dbf deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_f38zoy8c_.dbf deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_f38zozco_.dbf deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/controlfile/o1_mf_f38znrdf_.ctl deleted
- Finished recover at 2017-12-16:10:06:04
- RMAN>
复制代码 以下是12c插件数据库的TSPITR恢复过程(要有pdb2_2本化身的备份):
- Recovery Manager complete.
- [oracle@station26 ~]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on Fri Jan 5 11:02:22 2018
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: CDB2 (DBID=710472048)
- RMAN> recover tablespace pdb2_2:dj_pdb2;
- Starting recover at 2018-01-05:11:02:40
- using target database control file instead of recovery catalog
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=189 device type=DISK
- allocated channel: ORA_DISK_2
- channel ORA_DISK_2: SID=311 device type=DISK
- allocated channel: ORA_DISK_3
- channel ORA_DISK_3: SID=365 device type=DISK
- allocated channel: ORA_DISK_4
- channel ORA_DISK_4: SID=425 device type=DISK
- allocated channel: ORA_DISK_5
- channel ORA_DISK_5: SID=11 device type=DISK
- allocated channel: ORA_DISK_6
- channel ORA_DISK_6: SID=69 device type=DISK
- allocated channel: ORA_DISK_7
- channel ORA_DISK_7: SID=126 device type=DISK
- allocated channel: ORA_DISK_8
- channel ORA_DISK_8: SID=251 device type=DISK
- allocated channel: ORA_DISK_9
- channel ORA_DISK_9: SID=308 device type=DISK
- allocated channel: ORA_DISK_10
- channel ORA_DISK_10: SID=423 device type=DISK
- allocated channel: ORA_DISK_11
- channel ORA_DISK_11: SID=10 device type=DISK
- allocated channel: ORA_DISK_12
- channel ORA_DISK_12: SID=62 device type=DISK
- allocated channel: ORA_DISK_13
- channel ORA_DISK_13: SID=123 device type=DISK
- allocated channel: ORA_DISK_14
- channel ORA_DISK_14: SID=192 device type=DISK
- allocated channel: ORA_DISK_15
- channel ORA_DISK_15: SID=250 device type=DISK
- allocated channel: ORA_DISK_16
- channel ORA_DISK_16: SID=306 device type=DISK
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=369 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=418 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- starting media recovery
- media recovery complete, elapsed time: 00:00:00
- Finished recover at 2018-01-05:11:02:53
- RMAN> exit
- Recovery Manager complete.
- [oracle@station26 ~]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Fri Jan 5 11:02:59 2018
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> conn sys/oracle_4U@pdb2_2 as sysdba
- Connected.
- SQL> alter tablespace dj_pdb2 onlinel
- 2
- SQL> alter tablespace dj_pdb2 online;
- Tablespace altered.
- SQL> conn / as sysdba
- Connected.
- SQL> select flashback_on from v$database;
- FLASHBACK_ON
- ------------------
- NO
- SQL> alter database flashback on ;
- Database altered.
- SQL> select sysdate from dual;
- SYSDATE
- -------------------
- 2018-01-05:11:04:12
- SQL>
- SQL>
- SQL>
- SQL> drop user c##_user cascade;
- User dropped.
- SQL> shutdown abort
- ORACLE instance shut down.
- SQL> startup mount
- ORACLE instance started.
- Total System Global Area 3254779904 bytes
- Fixed Size 3716080 bytes
- Variable Size 1778387984 bytes
- Database Buffers 1459617792 bytes
- Redo Buffers 13058048 bytes
- Database mounted.
- SQL> flashback database to timestamp to_timestamp('2018-01-05:11:04:12','YYYY-MM-DD:HH24:MI:SS') ;
- Flashback complete.
- SQL> alter database open resetlogs;
- Database altered.
- SQL> conn c##_user/x
- Connected.
- SQL> conn c##_user/x@pdb2
- Connected.
- SQL> conn c##_user/x@pdb2_2
- Connected.
- SQL> conn system/oracle_4U@pdb2
- Connected.
- SQL> conn dj/oracle_4U@pdb2
- Connected.
- SQL> select * from tab;
- TNAME
- --------------------------------------------------------------------------------
- TABTYPE CLUSTERID
- ------- ----------
- T1
- TABLE
- SQL> select sysdate from dual ;
- SYSDATE
- -------------------
- 2018-01-05:11:11:03
- SQL> select count(*) from T1 ;
- COUNT(*)
- ----------
- 0
- 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@station26 ~]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on Fri Jan 5 11:11:27 2018
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: CDB2 (DBID=710472048)
- RMAN> backup pluggable database pdb2;
- Starting backup at 2018-01-05:11:11:36
- using target database control file instead of recovery catalog
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=185 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=242 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- input datafile file number=00039 name=/u01/app/oracle/oradata/cdb2/pdb2_1/dj_pdb2.f
- channel ORA_SBT_TAPE_1: starting piece 1 at 2018-01-05:11:11:39
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- input datafile file number=00038 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 2018-01-05:11:11:40
- channel ORA_SBT_TAPE_2: finished piece 1 at 2018-01-05:11:12:15
- piece handle=1asnthrc_1_1 tag=TAG20180105T111139 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:35
- channel ORA_SBT_TAPE_1: finished piece 1 at 2018-01-05:11:12:25
- piece handle=19snthrb_1_1 tag=TAG20180105T111139 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:46
- Finished backup at 2018-01-05:11:12:25
- Starting Control File and SPFILE Autobackup at 2018-01-05:11:12:25
- piece handle=c-710472048-20180105-07 comment=API Version 2.0,MMS Version 10.4.0.4
- Finished Control File and SPFILE Autobackup at 2018-01-05:11:12:50
- RMAN> recover tablespace pdb2:dj_pdb2
- 2> until time '2018-01-05:11:13:39'
- 3> auxiliary destination '/u01/app/oracle/oradata';
- Starting recover at 2018-01-05:11:14:59
- current log archived
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=365 device type=DISK
- allocated channel: ORA_DISK_2
- channel ORA_DISK_2: SID=418 device type=DISK
- allocated channel: ORA_DISK_3
- channel ORA_DISK_3: SID=6 device type=DISK
- allocated channel: ORA_DISK_4
- channel ORA_DISK_4: SID=187 device type=DISK
- allocated channel: ORA_DISK_5
- channel ORA_DISK_5: SID=247 device type=DISK
- allocated channel: ORA_DISK_6
- channel ORA_DISK_6: SID=361 device type=DISK
- allocated channel: ORA_DISK_7
- channel ORA_DISK_7: SID=309 device type=DISK
- allocated channel: ORA_DISK_8
- channel ORA_DISK_8: SID=417 device type=DISK
- allocated channel: ORA_DISK_9
- channel ORA_DISK_9: SID=5 device type=DISK
- allocated channel: ORA_DISK_10
- channel ORA_DISK_10: SID=63 device type=DISK
- allocated channel: ORA_DISK_11
- channel ORA_DISK_11: SID=129 device type=DISK
- allocated channel: ORA_DISK_12
- channel ORA_DISK_12: SID=188 device type=DISK
- allocated channel: ORA_DISK_13
- channel ORA_DISK_13: SID=243 device type=DISK
- allocated channel: ORA_DISK_14
- channel ORA_DISK_14: SID=310 device type=DISK
- allocated channel: ORA_DISK_15
- channel ORA_DISK_15: SID=366 device type=DISK
- allocated channel: ORA_DISK_16
- channel ORA_DISK_16: SID=420 device type=DISK
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- 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='uAxa'
- initialization parameters used for automatic instance:
- db_name=CDB2
- db_unique_name=uAxa_pitr_pdb2_CDB2
- 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=/u01/app/oracle/oradata
- log_archive_dest_1='location=/u01/app/oracle/oradata'
- enable_pluggable_database=true
- _clone_one_pdb_recovery=true
- #No auxiliary parameter file used
- starting up automatic instance CDB2
- Oracle instance started
- Total System Global Area 2684354560 bytes
- Fixed Size 3714440 bytes
- Variable Size 654312056 bytes
- Database Buffers 2013265920 bytes
- Redo Buffers 13062144 bytes
- Automatic instance created
- Running TRANSPORT_SET_CHECK on recovery set tablespaces
- TRANSPORT_SET_CHECK completed successfully
- contents of Memory Script:
- {
- # set requested point in time
- set until time "2018-01-05:11:13:39";
- # 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';
- # avoid unnecessary autobackups for structural changes during TSPITR
- sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
- }
- executing Memory Script
- executing command: SET until clause
- Starting restore at 2018-01-05:11:15:55
- allocated channel: ORA_AUX_DISK_1
- channel ORA_AUX_DISK_1: SID=289 device type=DISK
- allocated channel: ORA_AUX_DISK_2
- channel ORA_AUX_DISK_2: SID=44 device type=DISK
- allocated channel: ORA_AUX_DISK_3
- channel ORA_AUX_DISK_3: SID=86 device type=DISK
- allocated channel: ORA_AUX_DISK_4
- channel ORA_AUX_DISK_4: SID=127 device type=DISK
- allocated channel: ORA_AUX_DISK_5
- channel ORA_AUX_DISK_5: SID=168 device type=DISK
- allocated channel: ORA_AUX_DISK_6
- channel ORA_AUX_DISK_6: SID=210 device type=DISK
- allocated channel: ORA_AUX_DISK_7
- channel ORA_AUX_DISK_7: SID=250 device type=DISK
- allocated channel: ORA_AUX_DISK_8
- channel ORA_AUX_DISK_8: SID=291 device type=DISK
- allocated channel: ORA_AUX_DISK_9
- channel ORA_AUX_DISK_9: SID=4 device type=DISK
- allocated channel: ORA_AUX_DISK_10
- channel ORA_AUX_DISK_10: SID=45 device type=DISK
- allocated channel: ORA_AUX_DISK_11
- channel ORA_AUX_DISK_11: SID=87 device type=DISK
- allocated channel: ORA_AUX_DISK_12
- channel ORA_AUX_DISK_12: SID=128 device type=DISK
- allocated channel: ORA_AUX_DISK_13
- channel ORA_AUX_DISK_13: SID=169 device type=DISK
- allocated channel: ORA_AUX_DISK_14
- channel ORA_AUX_DISK_14: SID=211 device type=DISK
- allocated channel: ORA_AUX_DISK_15
- channel ORA_AUX_DISK_15: SID=251 device type=DISK
- allocated channel: ORA_AUX_DISK_16
- channel ORA_AUX_DISK_16: SID=292 device type=DISK
- allocated channel: ORA_AUX_SBT_TAPE_1
- channel ORA_AUX_SBT_TAPE_1: SID=5 device type=SBT_TAPE
- channel ORA_AUX_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_AUX_SBT_TAPE_2
- channel ORA_AUX_SBT_TAPE_2: SID=46 device type=SBT_TAPE
- channel ORA_AUX_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_AUX_SBT_TAPE_1: starting datafile backup set restore
- channel ORA_AUX_SBT_TAPE_1: restoring control file
- channel ORA_AUX_SBT_TAPE_1: reading from backup piece c-710472048-20180105-07
- channel ORA_AUX_SBT_TAPE_1: piece handle=c-710472048-20180105-07 tag=TAG20180105T111225
- channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
- channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:25
- output file name=/u01/app/oracle/oradata/CDB2/controlfile/o1_mf_f4xvjb47_.ctl
- Finished restore at 2018-01-05:11:16:34
- sql statement: alter database mount clone database
- sql statement: alter system archive log current
- sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
- contents of Memory Script:
- {
- # set requested point in time
- set until time "2018-01-05:11:13:39";
- plsql <<<--
- declare
- sqlstatement varchar2(512);
- pdbname varchar2(30);
- offline_not_needed exception;
- pragma exception_init(offline_not_needed, -01539);
- begin
- pdbname := 'PDB2'; -- pdbname
- sqlstatement := 'alter tablespace '|| 'DJ_PDB2' ||' offline immediate';
- krmicd.writeMsg(6162, sqlstatement);
- krmicd.execSql(sqlstatement, 0, pdbname);
- exception
- when offline_not_needed then
- null;
- end; >>>;
- # 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 10 to new;
- set newname for clone datafile 11 to new;
- set newname for clone tempfile 1 to new;
- set newname for clone tempfile 3 to new;
- set newname for clone tempfile 8 to new;
- set newname for clone tempfile 9 to new;
- set newname for clone tempfile 10 to new;
- set newname for datafile 39 to
- "/u01/app/oracle/oradata/cdb2/pdb2_1/dj_pdb2.f";
- # switch all tempfiles
- switch clone tempfile all;
- # restore the tablespaces in the recovery set and the auxiliary set
- restore clone datafile 1, 4, 3, 10, 11, 39;
-
- switch clone datafile all;
- }
- executing Memory Script
- executing command: SET until clause
- sql statement: alter tablespace DJ_PDB2 offline immediate
- 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
- executing command: SET NEWNAME
- executing command: SET NEWNAME
- executing command: SET NEWNAME
- renamed tempfile 1 to /u01/app/oracle/oradata/CDB2/datafile/o1_mf_temp_%u_.tmp in control file
- renamed tempfile 3 to /u01/app/oracle/oradata/CDB2/datafile/o1_mf_temp_%u_.tmp in control file
- renamed tempfile 8 to /u01/app/oracle/oradata/CDB2/datafile/o1_mf_temp_roo_%u_.tmp in control file
- renamed tempfile 9 to /u01/app/oracle/oradata/CDB2/datafile/o1_mf_temp_pdb_%u_.tmp in control file
- renamed tempfile 10 to /u01/app/oracle/oradata/CDB2/datafile/o1_mf_my_temp_%u_.tmp in control file
- Starting restore at 2018-01-05:11:16:41
- using channel ORA_AUX_DISK_1
- using channel ORA_AUX_DISK_2
- using channel ORA_AUX_DISK_3
- using channel ORA_AUX_DISK_4
- using channel ORA_AUX_DISK_5
- using channel ORA_AUX_DISK_6
- using channel ORA_AUX_DISK_7
- using channel ORA_AUX_DISK_8
- using channel ORA_AUX_DISK_9
- using channel ORA_AUX_DISK_10
- using channel ORA_AUX_DISK_11
- using channel ORA_AUX_DISK_12
- using channel ORA_AUX_DISK_13
- using channel ORA_AUX_DISK_14
- using channel ORA_AUX_DISK_15
- using channel ORA_AUX_DISK_16
- using channel ORA_AUX_SBT_TAPE_1
- using channel ORA_AUX_SBT_TAPE_2
- channel ORA_AUX_SBT_TAPE_1: starting datafile backup set restore
- channel ORA_AUX_SBT_TAPE_1: specifying datafile(s) to restore from backup set
- channel ORA_AUX_SBT_TAPE_1: restoring datafile 00004 to /u01/app/oracle/oradata/CDB2/datafile/o1_mf_undotbs1_%u_.dbf
- channel ORA_AUX_SBT_TAPE_1: reading from backup piece 03snbm9f_1_1
- channel ORA_AUX_SBT_TAPE_2: starting datafile backup set restore
- channel ORA_AUX_SBT_TAPE_2: specifying datafile(s) to restore from backup set
- channel ORA_AUX_SBT_TAPE_2: restoring datafile 00001 to /u01/app/oracle/oradata/CDB2/datafile/o1_mf_system_%u_.dbf
- channel ORA_AUX_SBT_TAPE_2: restoring datafile 00003 to /u01/app/oracle/oradata/CDB2/datafile/o1_mf_sysaux_%u_.dbf
- channel ORA_AUX_SBT_TAPE_2: reading from backup piece 02snbm9f_1_1
- channel ORA_AUX_SBT_TAPE_1: piece handle=03snbm9f_1_1 tag=0T_WHOLE_INCR0
- channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
- channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:56
- channel ORA_AUX_SBT_TAPE_1: starting datafile backup set restore
- channel ORA_AUX_SBT_TAPE_1: specifying datafile(s) to restore from backup set
- channel ORA_AUX_SBT_TAPE_1: restoring datafile 00010 to /u01/app/oracle/oradata/CDB2/datafile/o1_mf_system_%u_.dbf
- channel ORA_AUX_SBT_TAPE_1: reading from backup piece 1asnthrc_1_1
- channel ORA_AUX_SBT_TAPE_2: piece handle=02snbm9f_1_1 tag=0T_WHOLE_INCR0
- channel ORA_AUX_SBT_TAPE_2: restored backup piece 1
- channel ORA_AUX_SBT_TAPE_2: restore complete, elapsed time: 00:01:31
- channel ORA_AUX_SBT_TAPE_2: starting datafile backup set restore
- channel ORA_AUX_SBT_TAPE_2: specifying datafile(s) to restore from backup set
- channel ORA_AUX_SBT_TAPE_2: restoring datafile 00011 to /u01/app/oracle/oradata/CDB2/datafile/o1_mf_sysaux_%u_.dbf
- channel ORA_AUX_SBT_TAPE_2: restoring datafile 00039 to /u01/app/oracle/oradata/cdb2/pdb2_1/dj_pdb2.f
- channel ORA_AUX_SBT_TAPE_2: reading from backup piece 19snthrb_1_1
- channel ORA_AUX_SBT_TAPE_1: piece handle=1asnthrc_1_1 tag=TAG20180105T111139
- channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
- channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:42
- channel ORA_AUX_SBT_TAPE_2: piece handle=19snthrb_1_1 tag=TAG20180105T111139
- channel ORA_AUX_SBT_TAPE_2: restored backup piece 1
- channel ORA_AUX_SBT_TAPE_2: restore complete, elapsed time: 00:00:45
- Finished restore at 2018-01-05:11:18:58
- datafile 1 switched to datafile copy
- input datafile copy RECID=8 STAMP=964610338 file name=/u01/app/oracle/oradata/CDB2/datafile/o1_mf_system_f4xvksb4_.dbf
- datafile 4 switched to datafile copy
- input datafile copy RECID=9 STAMP=964610338 file name=/u01/app/oracle/oradata/CDB2/datafile/o1_mf_undotbs1_f4xvks65_.dbf
- datafile 3 switched to datafile copy
- input datafile copy RECID=10 STAMP=964610338 file name=/u01/app/oracle/oradata/CDB2/datafile/o1_mf_sysaux_f4xvks96_.dbf
- datafile 10 switched to datafile copy
- input datafile copy RECID=11 STAMP=964610339 file name=/u01/app/oracle/oradata/CDB2/datafile/o1_mf_system_f4xvm9jg_.dbf
- datafile 11 switched to datafile copy
- input datafile copy RECID=12 STAMP=964610339 file name=/u01/app/oracle/oradata/CDB2/datafile/o1_mf_sysaux_f4xvn8fn_.dbf
- contents of Memory Script:
- {
- # set requested point in time
- set until time "2018-01-05:11:13:39";
- # 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 'PDB2' "alter database datafile
- 10 online";
- sql clone 'PDB2' "alter database datafile
- 11 online";
- sql clone 'PDB2' "alter database datafile
- 39 online";
- # recover and open resetlogs
- recover clone database tablespace "PDB2":"DJ_PDB2", "SYSTEM", "UNDOTBS1", "SYSAUX", "PDB2":"SYSTEM", "PDB2":"SYSAUX" delete archivelog;
- alter clone database open resetlogs;
- }
- 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 10 online
- sql statement: alter database datafile 11 online
- sql statement: alter database datafile 39 online
- Starting recover at 2018-01-05:11:19:00
- using channel ORA_AUX_DISK_1
- using channel ORA_AUX_DISK_2
- using channel ORA_AUX_DISK_3
- using channel ORA_AUX_DISK_4
- using channel ORA_AUX_DISK_5
- using channel ORA_AUX_DISK_6
- using channel ORA_AUX_DISK_7
- using channel ORA_AUX_DISK_8
- using channel ORA_AUX_DISK_9
- using channel ORA_AUX_DISK_10
- using channel ORA_AUX_DISK_11
- using channel ORA_AUX_DISK_12
- using channel ORA_AUX_DISK_13
- using channel ORA_AUX_DISK_14
- using channel ORA_AUX_DISK_15
- using channel ORA_AUX_DISK_16
- using channel ORA_AUX_SBT_TAPE_1
- using channel ORA_AUX_SBT_TAPE_2
- starting media recovery
- archived log for thread 1 with sequence 151 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_151_f4d2kkxo_.arc
- archived log for thread 1 with sequence 152 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_152_f4d2kl5w_.arc
- archived log for thread 1 with sequence 1 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_1_f4d2wzr1_.arc
- archived log for thread 1 with sequence 2 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_2_f4d452oy_.arc
- archived log for thread 1 with sequence 3 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_3_f4dlsjnd_.arc
- archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_4_f4dm2wtn_.arc
- archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_5_f4fc7t2s_.arc
- archived log for thread 1 with sequence 6 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_6_f4for68l_.arc
- archived log for thread 1 with sequence 7 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_7_f4g0bh77_.arc
- archived log for thread 1 with sequence 8 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_8_f4gc2j2p_.arc
- archived log for thread 1 with sequence 9 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_9_f4gs4ls6_.arc
- archived log for thread 1 with sequence 10 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_10_f4gwfmv8_.arc
- archived log for thread 1 with sequence 11 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_11_f4h78qpj_.arc
- archived log for thread 1 with sequence 12 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_12_f4ho1x94_.arc
- archived log for thread 1 with sequence 13 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_13_f4j36m22_.arc
- archived log for thread 1 with sequence 14 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_14_f4jkjtl8_.arc
- archived log for thread 1 with sequence 15 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_15_f4jnprrk_.arc
- archived log for thread 1 with sequence 16 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_16_f4k09fc1_.arc
- archived log for thread 1 with sequence 17 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_17_f4kff9y5_.arc
- archived log for thread 1 with sequence 18 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_18_f4kvd9o1_.arc
- archived log for thread 1 with sequence 19 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_01/o1_mf_1_19_f4ldywq7_.arc
- archived log for thread 1 with sequence 20 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_01/o1_mf_1_20_f4lyn0co_.arc
- archived log for thread 1 with sequence 21 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_01/o1_mf_1_21_f4mdmqon_.arc
- archived log for thread 1 with sequence 22 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_01/o1_mf_1_22_f4nd6rvq_.arc
- archived log for thread 1 with sequence 23 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_01/o1_mf_1_23_f4nhwxlh_.arc
- archived log for thread 1 with sequence 24 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_24_f4npryqy_.arc
- archived log for thread 1 with sequence 25 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_25_f4om1f4h_.arc
- archived log for thread 1 with sequence 26 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_26_f4osyn30_.arc
- archived log for thread 1 with sequence 27 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_27_f4pnhxcv_.arc
- archived log for thread 1 with sequence 28 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_28_f4q46ml4_.arc
- archived log for thread 1 with sequence 29 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_29_f4q4fqq0_.arc
- archived log for thread 1 with sequence 30 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_03/o1_mf_1_30_f4qs6bym_.arc
- archived log for thread 1 with sequence 31 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_03/o1_mf_1_31_f4r7gvmc_.arc
- archived log for thread 1 with sequence 32 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_03/o1_mf_1_32_f4rwct90_.arc
- archived log for thread 1 with sequence 33 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_03/o1_mf_1_33_f4srj6l4_.arc
- archived log for thread 1 with sequence 34 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_03/o1_mf_1_34_f4srpdo5_.arc
- archived log for thread 1 with sequence 35 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_35_f4t32cwx_.arc
- archived log for thread 1 with sequence 36 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_36_f4tvw8tz_.arc
- archived log for thread 1 with sequence 37 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_37_f4v9pr6o_.arc
- archived log for thread 1 with sequence 38 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_38_f4vysdd1_.arc
- archived log for thread 1 with sequence 39 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_39_f4wdzflc_.arc
- archived log for thread 1 with sequence 40 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_40_f4wf87q1_.arc
- archived log for thread 1 with sequence 41 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_41_f4xdk9xz_.arc
- archived log for thread 1 with sequence 42 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_42_f4xj9wrh_.arc
- archived log for thread 1 with sequence 43 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_43_f4xq2o96_.arc
- archived log for thread 1 with sequence 44 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_44_f4xq5q9g_.arc
- archived log for thread 1 with sequence 45 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_45_f4xqsm93_.arc
- archived log for thread 1 with sequence 46 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_46_f4xr2yqf_.arc
- archived log for thread 1 with sequence 47 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_47_f4xr321g_.arc
- archived log for thread 1 with sequence 48 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_48_f4xr3598_.arc
- archived log for thread 1 with sequence 49 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_49_f4xr36br_.arc
- archived log for thread 1 with sequence 50 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_50_f4xr379f_.arc
- archived log for thread 1 with sequence 51 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_51_f4xr8rtk_.arc
- archived log for thread 1 with sequence 52 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_52_f4xs14j6_.arc
- archived log for thread 1 with sequence 53 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_53_f4xs478v_.arc
- archived log for thread 1 with sequence 54 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_54_f4xtw860_.arc
- archived log for thread 1 with sequence 55 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_55_f4xtw7jy_.arc
- archived log for thread 1 with sequence 56 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_56_f4xtw7r1_.arc
- archived log for thread 1 with sequence 1 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_1_f4xvfmg1_.arc
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_151_f4d2kkxo_.arc thread=1 sequence=151
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_152_f4d2kl5w_.arc thread=1 sequence=152
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_1_f4d2wzr1_.arc thread=1 sequence=1
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_2_f4d452oy_.arc thread=1 sequence=2
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_3_f4dlsjnd_.arc thread=1 sequence=3
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_4_f4dm2wtn_.arc thread=1 sequence=4
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_5_f4fc7t2s_.arc thread=1 sequence=5
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_6_f4for68l_.arc thread=1 sequence=6
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_7_f4g0bh77_.arc thread=1 sequence=7
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_8_f4gc2j2p_.arc thread=1 sequence=8
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_9_f4gs4ls6_.arc thread=1 sequence=9
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_10_f4gwfmv8_.arc thread=1 sequence=10
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_30/o1_mf_1_11_f4h78qpj_.arc thread=1 sequence=11
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_12_f4ho1x94_.arc thread=1 sequence=12
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_13_f4j36m22_.arc thread=1 sequence=13
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_14_f4jkjtl8_.arc thread=1 sequence=14
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_15_f4jnprrk_.arc thread=1 sequence=15
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_16_f4k09fc1_.arc thread=1 sequence=16
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_17_f4kff9y5_.arc thread=1 sequence=17
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_31/o1_mf_1_18_f4kvd9o1_.arc thread=1 sequence=18
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_01/o1_mf_1_19_f4ldywq7_.arc thread=1 sequence=19
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_01/o1_mf_1_20_f4lyn0co_.arc thread=1 sequence=20
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_01/o1_mf_1_21_f4mdmqon_.arc thread=1 sequence=21
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_01/o1_mf_1_22_f4nd6rvq_.arc thread=1 sequence=22
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_01/o1_mf_1_23_f4nhwxlh_.arc thread=1 sequence=23
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_24_f4npryqy_.arc thread=1 sequence=24
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_25_f4om1f4h_.arc thread=1 sequence=25
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_26_f4osyn30_.arc thread=1 sequence=26
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_27_f4pnhxcv_.arc thread=1 sequence=27
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_28_f4q46ml4_.arc thread=1 sequence=28
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_02/o1_mf_1_29_f4q4fqq0_.arc thread=1 sequence=29
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_03/o1_mf_1_30_f4qs6bym_.arc thread=1 sequence=30
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_03/o1_mf_1_31_f4r7gvmc_.arc thread=1 sequence=31
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_03/o1_mf_1_32_f4rwct90_.arc thread=1 sequence=32
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_03/o1_mf_1_33_f4srj6l4_.arc thread=1 sequence=33
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_03/o1_mf_1_34_f4srpdo5_.arc thread=1 sequence=34
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_35_f4t32cwx_.arc thread=1 sequence=35
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_36_f4tvw8tz_.arc thread=1 sequence=36
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_37_f4v9pr6o_.arc thread=1 sequence=37
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_38_f4vysdd1_.arc thread=1 sequence=38
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_39_f4wdzflc_.arc thread=1 sequence=39
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_04/o1_mf_1_40_f4wf87q1_.arc thread=1 sequence=40
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_41_f4xdk9xz_.arc thread=1 sequence=41
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_42_f4xj9wrh_.arc thread=1 sequence=42
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_43_f4xq2o96_.arc thread=1 sequence=43
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_44_f4xq5q9g_.arc thread=1 sequence=44
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_45_f4xqsm93_.arc thread=1 sequence=45
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_46_f4xr2yqf_.arc thread=1 sequence=46
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_47_f4xr321g_.arc thread=1 sequence=47
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_48_f4xr3598_.arc thread=1 sequence=48
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_49_f4xr36br_.arc thread=1 sequence=49
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_50_f4xr379f_.arc thread=1 sequence=50
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_51_f4xr8rtk_.arc thread=1 sequence=51
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_52_f4xs14j6_.arc thread=1 sequence=52
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_53_f4xs478v_.arc thread=1 sequence=53
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_54_f4xtw860_.arc thread=1 sequence=54
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_55_f4xtw7jy_.arc thread=1 sequence=55
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_56_f4xtw7r1_.arc thread=1 sequence=56
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_01_05/o1_mf_1_1_f4xvfmg1_.arc thread=1 sequence=1
- media recovery complete, elapsed time: 00:06:37
- Finished recover at 2018-01-05:11:25:39
- database opened
- contents of Memory Script:
- {
- sql clone 'alter pluggable database PDB2 open';
- }
- executing Memory Script
- sql statement: alter pluggable database PDB2 open
- contents of Memory Script:
- {
- # make read only the tablespace that will be exported
- sql clone 'PDB2' 'alter tablespace
- DJ_PDB2 read only';
- # create directory for datapump import
- sql 'PDB2' "create or replace directory
- TSPITR_DIROBJ_DPDIR as ''
- /u01/app/oracle/oradata''";
- # create directory for datapump export
- sql clone 'PDB2' "create or replace directory
- TSPITR_DIROBJ_DPDIR as ''
- /u01/app/oracle/oradata''";
- }
- executing Memory Script
- sql statement: alter tablespace DJ_PDB2 read only
- sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/oradata''
- sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/oradata''
- Performing export of metadata...
- EXPDP> Starting "SYS"."TSPITR_EXP_uAxa_Cofi":
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
- EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
- EXPDP> Master table "SYS"."TSPITR_EXP_uAxa_Cofi" successfully loaded/unloaded
- EXPDP> ******************************************************************************
- EXPDP> Dump file set for SYS.TSPITR_EXP_uAxa_Cofi is:
- EXPDP> /u01/app/oracle/oradata/tspitr_uAxa_52397.dmp
- EXPDP> ******************************************************************************
- EXPDP> Datafiles required for transportable tablespace DJ_PDB2:
- EXPDP> /u01/app/oracle/oradata/cdb2/pdb2_1/dj_pdb2.f
- EXPDP> Job "SYS"."TSPITR_EXP_uAxa_Cofi" successfully completed at Fri Jan 5 11:27:03 2018 elapsed 0 00:00:57
- Export completed
- contents of Memory Script:
- {
- # shutdown clone before import
- shutdown clone abort
- # drop target tablespaces before importing them back
- sql 'PDB2' 'drop tablespace
- DJ_PDB2 including contents keep datafiles cascade constraints';
- }
- executing Memory Script
- Oracle instance shut down
- sql statement: drop tablespace DJ_PDB2 including contents keep datafiles cascade constraints
- Performing import of metadata...
- IMPDP> Master table "SYS"."TSPITR_IMP_uAxa_hjpk" successfully loaded/unloaded
- IMPDP> Starting "SYS"."TSPITR_IMP_uAxa_hjpk":
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
- IMPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
- IMPDP> Job "SYS"."TSPITR_IMP_uAxa_hjpk" successfully completed at Fri Jan 5 11:28:00 2018 elapsed 0 00:00:33
- Import completed
- contents of Memory Script:
- {
- # make read write and offline the imported tablespaces
- sql 'PDB2' 'alter tablespace
- DJ_PDB2 read write';
- sql 'PDB2' 'alter tablespace
- DJ_PDB2 offline';
- # enable autobackups after TSPITR is finished
- sql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;';
- }
- executing Memory Script
- sql statement: alter tablespace DJ_PDB2 read write
- sql statement: alter tablespace DJ_PDB2 offline
- sql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;
- Removing automatic instance
- Automatic instance removed
- auxiliary instance file /u01/app/oracle/oradata/CDB2/datafile/o1_mf_my_temp_f4xw1xdx_.tmp deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/datafile/o1_mf_temp_pdb_f4xw1xb4_.tmp deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/datafile/o1_mf_temp_roo_f4xw1s5d_.tmp deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/datafile/o1_mf_temp_f4xw1x77_.tmp deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/datafile/o1_mf_temp_f4xw1s27_.tmp deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_3_f4xw1pd2_.log deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_2_f4xw1o7p_.log deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_1_f4xw1n55_.log deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/datafile/o1_mf_sysaux_f4xvn8fn_.dbf deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/datafile/o1_mf_system_f4xvm9jg_.dbf deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/datafile/o1_mf_sysaux_f4xvks96_.dbf deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/datafile/o1_mf_undotbs1_f4xvks65_.dbf deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/datafile/o1_mf_system_f4xvksb4_.dbf deleted
- auxiliary instance file /u01/app/oracle/oradata/CDB2/controlfile/o1_mf_f4xvjb47_.ctl deleted
- auxiliary instance file tspitr_uAxa_52397.dmp deleted
- Finished recover at 2018-01-05:11:28:06
- RMAN> exit
- Recovery Manager complete.
- [oracle@station26 ~]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Fri Jan 5 11:29:02 2018
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn sys/oracle_4U@pdb2 as sysdba
- Connected.
- SQL> alter tablespace dj_pdb2 online ;
- Tablespace altered.
- SQL> select * from dj.t1;
- C
- --------------------------------------------------------------------------------
- 1
- SQL> ouse.dbc example.dmp
复制代码
书P218页开CDB2闪回时关闭数据库是没有必要的,从11g开始闪回都可以在开库的时候打开。
书P224 r用man的备份集插入插件数据库,要选:
对应于dbca:
P244 :
SYSTEM用户:
- SQL> create table t1 as select * from dba_objects ;
- Table created.
- SQL> create or replace procedure burn_cpu
- 2 is
- 3 v_count number;
- 4 begin
- 5 select count(*) into v_count from t1 a, t1 b;
- 6 end;
- 7 /
- Procedure created.
复制代码
|
|