{"id":571,"date":"2019-11-03T16:35:22","date_gmt":"2019-11-03T08:35:22","guid":{"rendered":"http:\/\/www.821121.com\/?p=571"},"modified":"2020-12-11T10:03:20","modified_gmt":"2020-12-11T02:03:20","slug":"12c%e6%96%b0%e7%89%b9%e6%80%a7%ef%bc%9a%e4%bd%bf%e7%94%a8rman%e6%81%a2%e5%a4%8d%e8%a1%a8%e6%88%96%e8%a1%a8%e5%88%86%e5%8c%ba","status":"publish","type":"post","link":"http:\/\/www.821121.com\/?p=571","title":{"rendered":"12C\u65b0\u7279\u6027\uff1a\u4f7f\u7528RMAN\u6062\u590d\u8868\u6216\u8868\u5206\u533a"},"content":{"rendered":"<p><strong>\u5b9e\u9a8c\u76ee\u7684\uff1a\u6a21\u62df\u8bef\u5220\u9664\u8868t_whs\uff0c\u7136\u540e\u4f7f\u752812C\u65b0\u7279\u6027\uff0crman\u6062\u590d\u8868\u5230t_whs1\u3002\u8be5\u60c5\u666f\u6bd4\u8f83\u8d34\u5408\u771f\u5b9e\u60c5\u51b5\u4e0b\u7684\u9700\u6c42\u3002<\/strong><\/p>\n<h2>1\u3001\u5907\u4efd\u6570\u636e\u5e93<\/h2>\n<pre><code class=\"language-sql\">[oracle@cat1 ~]$ rman target \/\n\nRecovery Manager: Release 19.0.0.0.0 - Production on Thu Dec 3 11:57:11 2020\nVersion 19.3.0.0.0\n\nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\n\nconnected to target database: WHS1 (DBID=2406852607)\n\nRMAN&gt; backup as compressed backupset  incremental level=0  database format &#039;\/rmanbackup\/rman0_%d_%s_%T&#039; tag=&#039;level0&#039; plus archivelog;\n\nStarting backup at 03-DEC-20\ncurrent log archived\nusing target database control file instead of recovery catalog\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=285 instance=whs11 device type=DISK\nchannel ORA_DISK_1: starting compressed archived log backup set\nchannel ORA_DISK_1: specifying archived log(s) in backup set\n\u3002\u3002\u3002\u3002\u3002\u3002\u3002\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 03-DEC-20\n\nStarting Control File and SPFILE Autobackup at 03-DEC-20\npiece handle=\/u01\/app\/oracle\/product\/19.3.0\/db_1\/dbs\/c-2406852607-20201203-01 comment=NONE\nFinished Control File and SPFILE Autobackup at 03-DEC-20<\/code><\/pre>\n<h2>2\u3001\u521b\u5efa\u8868<\/h2>\n<pre><code class=\"language-sql\">[oracle@cat1 ~]$ sqlplus test\/test@PDB1_WHS\n\nSQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 3 15:24:02 2020\nVersion 19.3.0.0.0\n\nCopyright (c) 1982, 2019, Oracle.  All rights reserved.\n\nLast Successful login time: Thu Dec 03 2020 10:54:34 +08:00\n\nConnected to:\nOracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production\nVersion 19.3.0.0.0\n\nSQL&gt; CREATE TABLE t_whs (ID number, WNAME varchar2(10));\n\nTable created.\n\nSQL&gt; begin                             \n  2  for i in 0 .. 49 loop             \n  3  insert into t_whs values(i,&#039;whs&#039;);\n  4  end loop ;                        \n  5  commit;                           \n  6  end;                              \n  7  \/                                 \n\nPL\/SQL procedure successfully completed.\n\nSQL&gt; \n\nSQL&gt; alter session set nls_date_format=&#039;yyyy-mm-dd hh24:mi:ss&#039;;\n\nSession altered.\n\nSQL&gt;  select sysdate from dual;\n\nSYSDATE\n-------------------\n2020-12-03 15:28:04     \u300a===\u65f6\u95f4\u70b9\n\nSQL&gt; drop table t_whs;\n\nTable dropped.\n\nSQL&gt; <\/code><\/pre>\n<h2>3\u3001\u6062\u590d\u8868\u5230t_whs1<\/h2>\n<p>\u4ee5\u4e0b\u7684\u5185\u5bb9\u6bd4\u8f83\u591a\uff0c\u5176\u5b9e\u5c31\u4e00\u6761\u547d\u4ee4<\/p>\n<pre><code class=\"language-sql\">RMAN&gt; run{\n2&gt; RECOVER TABLE &quot;TEST&quot;.&quot;T_WHS&quot; of pluggable database PDB1_WHS\n3&gt; until time &quot;to_date(&#039;2020-12-03 15:28:04&#039;,&#039;yyyy-mm-dd hh24:mi:ss&#039;)&quot;\n4&gt; auxiliary destination &#039;\/tmp\/auxi&#039;\n5&gt; datapump destination &#039;\/tmp\/dump&#039;\n6&gt; REMAP TABLE &quot;TEST&quot;.&quot;T_WHS&quot;:&quot;T_WHS1&quot;;\n7&gt; }\n\nStarting recover at 03-DEC-20\nusing channel ORA_DISK_1\nRMAN-05026: warning: presuming following set of tablespaces applies to specified point-in-time\n\nList of tablespaces expected to have UNDO segments\nTablespace SYSTEM\nTablespace PDB1_WHS:SYSTEM\nTablespace UNDOTBS1\nTablespace PDB1_WHS:UNDOTBS1\nTablespace UNDOTBS2\nTablespace PDB1_WHS:UNDO_2\n\nCreating automatic instance, with SID=&#039;BlFk&#039;\n\ninitialization parameters used for automatic instance:\ndb_name=WHS1\ndb_unique_name=BlFk_pitr_PDB1_WHS_WHS1\ncompatible=19.0.0\ndb_block_size=8192\ndb_files=200\ndiagnostic_dest=\/u01\/app\/oracle\n_system_trig_enabled=FALSE\nsga_target=2688M\nprocesses=200\ndb_create_file_dest=\/tmp\/auxi\nlog_archive_dest_1=&#039;location=\/tmp\/auxi&#039;\nenable_pluggable_database=true\n_clone_one_pdb_recovery=true\n#No auxiliary parameter file used\n\nstarting up automatic instance WHS1\n\nOracle instance started\n\nTotal System Global Area    2818568608 bytes\n\nFixed Size                     9138592 bytes\nVariable Size                587202560 bytes\nDatabase Buffers            2214592512 bytes\nRedo Buffers                   7634944 bytes\nAutomatic instance created\n\ncontents of Memory Script:\n{\n# set requested point in time\nset until  time &quot;to_date(&#039;2020-12-03 15:28:04&#039;,&#039;yyyy-mm-dd hh24:mi:ss&#039;)&quot;;\n# restore the controlfile\nrestore clone controlfile;\n\n# mount the controlfile\nsql clone &#039;alter database mount clone database&#039;;\n\n# archive current online log \nsql &#039;alter system archive log current&#039;;\n}\nexecuting Memory Script\n\nexecuting command: SET until clause\n\nStarting restore at 03-DEC-20\nallocated channel: ORA_AUX_DISK_1\nchannel ORA_AUX_DISK_1: SID=175 device type=DISK\n\nchannel ORA_AUX_DISK_1: starting datafile backup set restore\nchannel ORA_AUX_DISK_1: restoring control file\nchannel ORA_AUX_DISK_1: reading from backup piece \/u01\/app\/oracle\/product\/19.3.0\/db_1\/dbs\/c-2406852607-20201203-01\nchannel ORA_AUX_DISK_1: piece handle=\/u01\/app\/oracle\/product\/19.3.0\/db_1\/dbs\/c-2406852607-20201203-01 tag=TAG20201203T115949\nchannel ORA_AUX_DISK_1: restored backup piece 1\nchannel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01\noutput file name=\/tmp\/auxi\/WHS1\/controlfile\/o1_mf_hwk87ln2_.ctl\nFinished restore at 03-DEC-20\n\nsql statement: alter database mount clone database\n\nsql statement: alter system archive log current\n\ncontents of Memory Script:\n{\n# set requested point in time\nset until  time &quot;to_date(&#039;2020-12-03 15:28:04&#039;,&#039;yyyy-mm-dd hh24:mi:ss&#039;)&quot;;\n# set destinations for recovery set and auxiliary set datafiles\nset newname for clone datafile  1 to new;\nset newname for clone datafile  10 to new;\nset newname for clone datafile  4 to new;\nset newname for clone datafile  12 to new;\nset newname for clone datafile  9 to new;\nset newname for clone datafile  13 to new;\nset newname for clone datafile  3 to new;\nset newname for clone datafile  11 to new;\nset newname for clone tempfile  2 to new;\nset newname for clone tempfile  3 to new;\n# switch all tempfiles\nswitch clone tempfile all;\n# restore the tablespaces in the recovery set and the auxiliary set\nrestore clone datafile  1, 10, 4, 12, 9, 13, 3, 11;\n\nswitch clone datafile all;\n}\nexecuting Memory Script\n\nexecuting command: SET until clause\n\nexecuting command: SET NEWNAME\n\nexecuting command: SET NEWNAME\n\nexecuting command: SET NEWNAME\n\nexecuting command: SET NEWNAME\n\nexecuting command: SET NEWNAME\n\nexecuting command: SET NEWNAME\n\nexecuting command: SET NEWNAME\n\nexecuting command: SET NEWNAME\n\nexecuting command: SET NEWNAME\n\nexecuting command: SET NEWNAME\n\nrenamed tempfile 2 to \/tmp\/auxi\/WHS1\/datafile\/o1_mf_temp_%u_.tmp in control file\nrenamed tempfile 3 to \/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_temp_%u_.tmp in control file\n\nStarting restore at 03-DEC-20\nusing channel ORA_AUX_DISK_1\n\nchannel ORA_AUX_DISK_1: starting datafile backup set restore\nchannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set\nchannel ORA_AUX_DISK_1: restoring datafile 00001 to \/tmp\/auxi\/WHS1\/datafile\/o1_mf_system_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00004 to \/tmp\/auxi\/WHS1\/datafile\/o1_mf_undotbs1_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00009 to \/tmp\/auxi\/WHS1\/datafile\/o1_mf_undotbs2_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00003 to \/tmp\/auxi\/WHS1\/datafile\/o1_mf_sysaux_%u_.dbf\nchannel ORA_AUX_DISK_1: reading from backup piece \/rmanbackup\/rman0_WHS1_21_20201203\nchannel ORA_AUX_DISK_1: piece handle=\/rmanbackup\/rman0_WHS1_21_20201203 tag=LEVEL0\nchannel ORA_AUX_DISK_1: restored backup piece 1\nchannel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45\nchannel ORA_AUX_DISK_1: starting datafile backup set restore\nchannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set\nchannel ORA_AUX_DISK_1: restoring datafile 00010 to \/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_system_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00012 to \/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_undotbs1_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00013 to \/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_undo_2_%u_.dbf\nchannel ORA_AUX_DISK_1: restoring datafile 00011 to \/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_sysaux_%u_.dbf\nchannel ORA_AUX_DISK_1: reading from backup piece \/rmanbackup\/rman0_WHS1_22_20201203\nchannel ORA_AUX_DISK_1: piece handle=\/rmanbackup\/rman0_WHS1_22_20201203 tag=LEVEL0\nchannel ORA_AUX_DISK_1: restored backup piece 1\nchannel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15\nFinished restore at 03-DEC-20\n\ndatafile 1 switched to datafile copy\ninput datafile copy RECID=9 STAMP=1058199988 file name=\/tmp\/auxi\/WHS1\/datafile\/o1_mf_system_hwk87rp5_.dbf\ndatafile 10 switched to datafile copy\ninput datafile copy RECID=10 STAMP=1058199988 file name=\/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_system_hwk895qq_.dbf\ndatafile 4 switched to datafile copy\ninput datafile copy RECID=11 STAMP=1058199988 file name=\/tmp\/auxi\/WHS1\/datafile\/o1_mf_undotbs1_hwk87rpv_.dbf\ndatafile 12 switched to datafile copy\ninput datafile copy RECID=12 STAMP=1058199988 file name=\/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_undotbs1_hwk895r1_.dbf\ndatafile 9 switched to datafile copy\ninput datafile copy RECID=13 STAMP=1058199988 file name=\/tmp\/auxi\/WHS1\/datafile\/o1_mf_undotbs2_hwk87rpw_.dbf\ndatafile 13 switched to datafile copy\ninput datafile copy RECID=14 STAMP=1058199988 file name=\/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_undo_2_hwk895r2_.dbf\ndatafile 3 switched to datafile copy\ninput datafile copy RECID=15 STAMP=1058199988 file name=\/tmp\/auxi\/WHS1\/datafile\/o1_mf_sysaux_hwk87rp6_.dbf\ndatafile 11 switched to datafile copy\ninput datafile copy RECID=16 STAMP=1058199988 file name=\/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_sysaux_hwk895qo_.dbf\n\ncontents of Memory Script:\n{\n# set requested point in time\nset until  time &quot;to_date(&#039;2020-12-03 15:28:04&#039;,&#039;yyyy-mm-dd hh24:mi:ss&#039;)&quot;;\n# online the datafiles restored or switched\nsql clone &quot;alter database datafile  1 online&quot;;\nsql clone &#039;PDB1_WHS&#039; &quot;alter database datafile \n 10 online&quot;;\nsql clone &quot;alter database datafile  4 online&quot;;\nsql clone &#039;PDB1_WHS&#039; &quot;alter database datafile \n 12 online&quot;;\nsql clone &quot;alter database datafile  9 online&quot;;\nsql clone &#039;PDB1_WHS&#039; &quot;alter database datafile \n 13 online&quot;;\nsql clone &quot;alter database datafile  3 online&quot;;\nsql clone &#039;PDB1_WHS&#039; &quot;alter database datafile \n 11 online&quot;;\n# recover and open database read only\nrecover clone database tablespace  &quot;SYSTEM&quot;, &quot;PDB1_WHS&quot;:&quot;SYSTEM&quot;, &quot;UNDOTBS1&quot;, &quot;PDB1_WHS&quot;:&quot;UNDOTBS1&quot;, &quot;UNDOTBS2&quot;, &quot;PDB1_WHS&quot;:&quot;UNDO_2&quot;, &quot;SYSAUX&quot;, &quot;PDB1_WHS&quot;:&quot;SYSAUX&quot;;\nsql clone &#039;alter database open read only&#039;;\n}\nexecuting Memory Script\n\nexecuting command: SET until clause\n\nsql statement: alter database datafile  1 online\n\nsql statement: alter database datafile  10 online\n\nsql statement: alter database datafile  4 online\n\nsql statement: alter database datafile  12 online\n\nsql statement: alter database datafile  9 online\n\nsql statement: alter database datafile  13 online\n\nsql statement: alter database datafile  3 online\n\nsql statement: alter database datafile  11 online\n\nStarting recover at 03-DEC-20\nusing channel ORA_AUX_DISK_1\n\nstarting media recovery\n\narchived log for thread 1 with sequence 11 is already on disk as file +DATA1\/WHS1\/ARCHIVELOG\/2020_12_03\/thread_1_seq_11.311.1058183989\narchived log for thread 1 with sequence 12 is already on disk as file +DATA1\/WHS1\/ARCHIVELOG\/2020_12_03\/thread_1_seq_12.312.1058199535\narchived log file name=+DATA1\/WHS1\/ARCHIVELOG\/2020_12_03\/thread_1_seq_11.311.1058183989 thread=1 sequence=11\narchived log file name=+DATA1\/WHS1\/ARCHIVELOG\/2020_12_03\/thread_1_seq_12.312.1058199535 thread=1 sequence=12\nmedia recovery complete, elapsed time: 00:00:02\nFinished recover at 03-DEC-20\n\nsql statement: alter database open read only\n\ncontents of Memory Script:\n{\nsql clone &#039;alter pluggable database  PDB1_WHS open read only&#039;;\n}\nexecuting Memory Script\n\nsql statement: alter pluggable database  PDB1_WHS open read only\n\ncontents of Memory Script:\n{\n   sql clone &quot;create spfile from memory&quot;;\n   shutdown clone immediate;\n   startup clone nomount;\n   sql clone &quot;alter system set  control_files = \n  &#039;&#039;\/tmp\/auxi\/WHS1\/controlfile\/o1_mf_hwk87ln2_.ctl&#039;&#039; comment=\n &#039;&#039;RMAN set&#039;&#039; scope=spfile&quot;;\n   shutdown clone immediate;\n   startup clone nomount;\n# mount database\nsql clone &#039;alter database mount clone database&#039;;\n}\nexecuting Memory Script\n\nsql statement: create spfile from memory\n\ndatabase closed\ndatabase dismounted\nOracle instance shut down\n\nconnected to auxiliary database (not started)\nOracle instance started\n\nTotal System Global Area    2818568608 bytes\n\nFixed Size                     9138592 bytes\nVariable Size                587202560 bytes\nDatabase Buffers            2214592512 bytes\nRedo Buffers                   7634944 bytes\n\nsql statement: alter system set  control_files =   &#039;&#039;\/tmp\/auxi\/WHS1\/controlfile\/o1_mf_hwk87ln2_.ctl&#039;&#039; comment= &#039;&#039;RMAN set&#039;&#039; scope=spfile\n\nOracle instance shut down\n\nconnected to auxiliary database (not started)\nOracle instance started\n\nTotal System Global Area    2818568608 bytes\n\nFixed Size                     9138592 bytes\nVariable Size                587202560 bytes\nDatabase Buffers            2214592512 bytes\nRedo Buffers                   7634944 bytes\n\nsql statement: alter database mount clone database\n\ncontents of Memory Script:\n{\n# set requested point in time\nset until  time &quot;to_date(&#039;2020-12-03 15:28:04&#039;,&#039;yyyy-mm-dd hh24:mi:ss&#039;)&quot;;\n# set destinations for recovery set and auxiliary set datafiles\nset newname for datafile  14 to new;\n# restore the tablespaces in the recovery set and the auxiliary set\nrestore clone datafile  14;\n\nswitch clone datafile all;\n}\nexecuting Memory Script\n\nexecuting command: SET until clause\n\nexecuting command: SET NEWNAME\n\nStarting restore at 03-DEC-20\nallocated channel: ORA_AUX_DISK_1\nchannel ORA_AUX_DISK_1: SID=14 device type=DISK\n\nchannel ORA_AUX_DISK_1: starting datafile backup set restore\nchannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set\nchannel ORA_AUX_DISK_1: restoring datafile 00014 to \/tmp\/auxi\/BLFK_PITR_PDB1_WHS_WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_users_%u_.dbf\nchannel ORA_AUX_DISK_1: reading from backup piece \/rmanbackup\/rman0_WHS1_22_20201203\nchannel ORA_AUX_DISK_1: piece handle=\/rmanbackup\/rman0_WHS1_22_20201203 tag=LEVEL0\nchannel ORA_AUX_DISK_1: restored backup piece 1\nchannel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03\nFinished restore at 03-DEC-20\n\ndatafile 14 switched to datafile copy\ninput datafile copy RECID=18 STAMP=1058200082 file name=\/tmp\/auxi\/BLFK_PITR_PDB1_WHS_WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_users_hwk8dhhq_.dbf\n\ncontents of Memory Script:\n{\n# set requested point in time\nset until  time &quot;to_date(&#039;2020-12-03 15:28:04&#039;,&#039;yyyy-mm-dd hh24:mi:ss&#039;)&quot;;\n# online the datafiles restored or switched\nsql clone &#039;PDB1_WHS&#039; &quot;alter database datafile \n 14 online&quot;;\n# recover and open resetlogs\nrecover clone database tablespace  &quot;PDB1_WHS&quot;:&quot;USERS&quot;, &quot;SYSTEM&quot;, &quot;PDB1_WHS&quot;:&quot;SYSTEM&quot;, &quot;UNDOTBS1&quot;, &quot;PDB1_WHS&quot;:&quot;UNDOTBS1&quot;, &quot;UNDOTBS2&quot;, &quot;PDB1_WHS&quot;:&quot;UNDO_2&quot;, &quot;SYSAUX&quot;, &quot;PDB1_WHS&quot;:&quot;SYSAUX&quot; delete archivelog;\nalter clone database open resetlogs;\n}\nexecuting Memory Script\n\nexecuting command: SET until clause\n\nsql statement: alter database datafile  14 online\n\nStarting recover at 03-DEC-20\nusing channel ORA_AUX_DISK_1\n\nstarting media recovery\n\narchived log for thread 1 with sequence 11 is already on disk as file +DATA1\/WHS1\/ARCHIVELOG\/2020_12_03\/thread_1_seq_11.311.1058183989\narchived log for thread 1 with sequence 12 is already on disk as file +DATA1\/WHS1\/ARCHIVELOG\/2020_12_03\/thread_1_seq_12.312.1058199535\narchived log file name=+DATA1\/WHS1\/ARCHIVELOG\/2020_12_03\/thread_1_seq_11.311.1058183989 thread=1 sequence=11\narchived log file name=+DATA1\/WHS1\/ARCHIVELOG\/2020_12_03\/thread_1_seq_12.312.1058199535 thread=1 sequence=12\nmedia recovery complete, elapsed time: 00:00:00\nFinished recover at 03-DEC-20\n\ndatabase opened\n\ncontents of Memory Script:\n{\nsql clone &#039;alter pluggable database  PDB1_WHS open&#039;;\n}\nexecuting Memory Script\n\nsql statement: alter pluggable database  PDB1_WHS open\n\ncontents of Memory Script:\n{\n# create directory for datapump import\nsql &#039;PDB1_WHS&#039; &quot;create or replace directory \nTSPITR_DIROBJ_DPDIR as &#039;&#039;\n\/tmp\/dump&#039;&#039;&quot;;\n# create directory for datapump export\nsql clone &#039;PDB1_WHS&#039; &quot;create or replace directory \nTSPITR_DIROBJ_DPDIR as &#039;&#039;\n\/tmp\/dump&#039;&#039;&quot;;\n}\nexecuting Memory Script\n\nsql statement: create or replace directory TSPITR_DIROBJ_DPDIR as &#039;&#039;\/tmp\/dump&#039;&#039;\n\nsql statement: create or replace directory TSPITR_DIROBJ_DPDIR as &#039;&#039;\/tmp\/dump&#039;&#039;\n\nPerforming export of tables...\n   EXPDP&gt; Starting &quot;SYS&quot;.&quot;TSPITR_EXP_BlFk_yDEv&quot;:  \n   EXPDP&gt; Processing object type TABLE_EXPORT\/TABLE\/TABLE_DATA\n   EXPDP&gt; Processing object type TABLE_EXPORT\/TABLE\/STATISTICS\/TABLE_STATISTICS\n   EXPDP&gt; Processing object type TABLE_EXPORT\/TABLE\/TABLE\n   EXPDP&gt; . . exported &quot;TEST&quot;.&quot;T_WHS&quot;                                  6 KB      50 rows\n   EXPDP&gt; Master table &quot;SYS&quot;.&quot;TSPITR_EXP_BlFk_yDEv&quot; successfully loaded\/unloaded\n   EXPDP&gt; ******************************************************************************\n   EXPDP&gt; Dump file set for SYS.TSPITR_EXP_BlFk_yDEv is:\n   EXPDP&gt;   \/tmp\/dump\/tspitr_BlFk_21865.dmp\n   EXPDP&gt; Job &quot;SYS&quot;.&quot;TSPITR_EXP_BlFk_yDEv&quot; successfully completed at Thu Dec 3 16:28:26 2020 elapsed 0 00:00:12\nExport completed\n\ncontents of Memory Script:\n{\n# shutdown clone before import\nshutdown clone abort\n}\nexecuting Memory Script\n\nOracle instance shut down\n\nPerforming import of tables...\n   IMPDP&gt; Master table &quot;SYS&quot;.&quot;TSPITR_IMP_BlFk_umfm&quot; successfully loaded\/unloaded\n   IMPDP&gt; Starting &quot;SYS&quot;.&quot;TSPITR_IMP_BlFk_umfm&quot;:  \n   IMPDP&gt; Processing object type TABLE_EXPORT\/TABLE\/TABLE\n   IMPDP&gt; Processing object type TABLE_EXPORT\/TABLE\/TABLE_DATA\n   IMPDP&gt; . . imported &quot;TEST&quot;.&quot;T_WHS1&quot;                                 6 KB      50 rows\n   IMPDP&gt; Processing object type TABLE_EXPORT\/TABLE\/STATISTICS\/TABLE_STATISTICS\n   IMPDP&gt; Job &quot;SYS&quot;.&quot;TSPITR_IMP_BlFk_umfm&quot; successfully completed at Thu Dec 3 16:28:35 2020 elapsed 0 00:00:03\nImport completed\n\nRemoving automatic instance\nAutomatic instance removed\nauxiliary instance file \/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_temp_hwk89yo6_.tmp deleted\nauxiliary instance file \/tmp\/auxi\/WHS1\/datafile\/o1_mf_temp_hwk89xfx_.tmp deleted\nauxiliary instance file \/tmp\/auxi\/BLFK_PITR_PDB1_WHS_WHS1\/onlinelog\/o1_mf_2_hwk8dnrt_.log deleted\nauxiliary instance file \/tmp\/auxi\/BLFK_PITR_PDB1_WHS_WHS1\/onlinelog\/o1_mf_1_hwk8dnrg_.log deleted\nauxiliary instance file \/tmp\/auxi\/BLFK_PITR_PDB1_WHS_WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_users_hwk8dhhq_.dbf deleted\nauxiliary instance file \/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_sysaux_hwk895qo_.dbf deleted\nauxiliary instance file \/tmp\/auxi\/WHS1\/datafile\/o1_mf_sysaux_hwk87rp6_.dbf deleted\nauxiliary instance file \/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_undo_2_hwk895r2_.dbf deleted\nauxiliary instance file \/tmp\/auxi\/WHS1\/datafile\/o1_mf_undotbs2_hwk87rpw_.dbf deleted\nauxiliary instance file \/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_undotbs1_hwk895r1_.dbf deleted\nauxiliary instance file \/tmp\/auxi\/WHS1\/datafile\/o1_mf_undotbs1_hwk87rpv_.dbf deleted\nauxiliary instance file \/tmp\/auxi\/WHS1\/B4D31742116320ECE0532900A8C025DC\/datafile\/o1_mf_system_hwk895qq_.dbf deleted\nauxiliary instance file \/tmp\/auxi\/WHS1\/datafile\/o1_mf_system_hwk87rp5_.dbf deleted\nauxiliary instance file \/tmp\/auxi\/WHS1\/controlfile\/o1_mf_hwk87ln2_.ctl deleted\nauxiliary instance file tspitr_BlFk_21865.dmp deleted\nFinished recover at 03-DEC-20\n\nRMAN&gt; <\/code><\/pre>\n<h2>4\u3001\u9a8c\u8bc1\u6570\u636e<\/h2>\n<pre><code class=\"language-sql\">SQL&gt; select count(*) from test.T_WHS;\nselect count(*) from test.T_WHS\n                          *\nERROR at line 1:\nORA-00942: table or view does not exist\n\nSQL&gt; select count(*) from test.T_WHS1;\n\n  COUNT(*)\n----------\n        50<\/code><\/pre>\n<h2>5\u3001\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898<\/h2>\n<h3>5.1 RMAN-01009: syntax error: found &quot;test&quot;<\/h3>\n<p>\u5982\u4e0b\u62a5\u9519\u5185\u5bb9\u3002\u539f\u56e0\u662f\u7528\u6237\u540d\u4e0e\u8868\u540d\u90fd\u9700\u8981\u5927\u5199\u5e76\u52a0\u4e0a&quot;&quot;\u53cc\u5f15\u53f7\uff0c\u4e0d\u7136\u5c31\u4f1a\u62a5\u9519\u627e\u4e0d\u5230TEST\u8fd9\u4e2aschema<\/p>\n<pre><code class=\"language-sql\">RMAN&gt;  recover table TEST.T_WHS of pluggable database PDB1_WHS until time &#039;2020-12-03 15:28:04&#039;  AUXILIARY DESTINATION &#039;\/tmp&#039;  REMAP TABLE TEST.T_WHS:TEST.T_WHS1;\n\nRMAN-00571: ===========================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\nRMAN-00571: ===========================================================\nRMAN-00558: error encountered while parsing input commands\nRMAN-01009: syntax error: found &quot;test&quot;: expecting one of: &quot;double-quoted-string, identifier, single-quoted-string&quot;\nRMAN-01007: at line 1 column 16 file: standard input<\/code><\/pre>\n<h3>5.2\u62a5\u9519 RMAN-06136 ORA-01861<\/h3>\n<p>\u662f\u65f6\u95f4\u683c\u5f0f\u7684\u95ee\u9898\uff0c\u4fee\u6539\u4e3auntil time &quot;to_date('2020-12-03 15:28:04','yyyy-mm-dd hh24:mi:ss')&quot;\u5373\u53ef<\/p>\n<pre><code class=\"language-sql\">RMAN&gt; run{\nalter session set nls_date_format=&quot;yyyy-mm-dd hh24:mi:ss&quot;;\n2&gt; 3&gt; RECOVER TABLE &quot;TEST&quot;.&quot;T_WHS&quot; of pluggable database PDB1_WHS\nuntil time &#039;2020-12-03 15:28:04&#039;\nauxiliary destination &#039;\/tmp\/auxi&#039;\ndatapump destination &#039;\/tmp\/dump&#039;\nREMAP TABLE &quot;TEST&quot;.&quot;T_WHS&quot;:&quot;T_WHS1&quot;;\n}\n4&gt; 5&gt; 6&gt; 7&gt; 8&gt; \nStatement processed\n\nStarting recover at 03-DEC-20\nusing channel ORA_DISK_1\nRMAN-05026: warning: presuming following set of tablespaces applies to specified point-in-time\n\nList of tablespaces expected to have UNDO segments\nTablespace SYSTEM\nTablespace PDB1_WHS:SYSTEM\nTablespace UNDOTBS1\nTablespace PDB1_WHS:UNDOTBS1\nTablespace UNDOTBS2\nTablespace PDB1_WHS:UNDO_2\n\nCreating automatic instance, with SID=&#039;Cuyu&#039;\n\ninitialization parameters used for automatic instance:\ndb_name=WHS1\ndb_unique_name=Cuyu_pitr_PDB1_WHS_WHS1\ncompatible=19.0.0\ndb_block_size=8192\ndb_files=200\ndiagnostic_dest=\/u01\/app\/oracle\n_system_trig_enabled=FALSE\nsga_target=2688M\nprocesses=200\ndb_create_file_dest=\/tmp\/auxi\nlog_archive_dest_1=&#039;location=\/tmp\/auxi&#039;\nenable_pluggable_database=true\n_clone_one_pdb_recovery=true\n#No auxiliary parameter file used\n\nstarting up automatic instance WHS1\n\nOracle instance started\n\nTotal System Global Area    2818568608 bytes\n\nFixed Size                     9138592 bytes\nVariable Size                587202560 bytes\nDatabase Buffers            2214592512 bytes\nRedo Buffers                   7634944 bytes\nAutomatic instance created\n\nRemoving automatic instance\nshutting down automatic instance \nOracle instance shut down\nAutomatic instance removed\nRMAN-00571: ===========================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\nRMAN-00571: ===========================================================\nRMAN-03002: failure of recover command at 12\/03\/2020 16:23:10\nRMAN-06136: Oracle error from auxiliary database: ORA-01861: literal does not match format string<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9e\u9a8c\u76ee\u7684\uff1a\u6a21\u62df\u8bef\u5220\u9664\u8868t_whs\uff0c\u7136\u540e\u4f7f\u752812C\u65b0<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,39],"tags":[],"class_list":["post-571","post","type-post","status-publish","format-standard","hentry","category-oracle-12c","category-39"],"_links":{"self":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=571"}],"version-history":[{"count":4,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/571\/revisions"}],"predecessor-version":[{"id":603,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/571\/revisions\/603"}],"wp:attachment":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=571"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}