当前位置:Gxlcms > 数据库问题 > RMAN RECOVER TABLE 功能是 Oracle Database 12c 的新增功能 (Doc ID 1521524.1)

RMAN RECOVER TABLE 功能是 Oracle Database 12c 的新增功能 (Doc ID 1521524.1)

时间:2021-07-01 10:21:17 帮助过:6人阅读

SCOPE

DBAs supporting large databases with backups made via RMAN.  Knowledge of RMAN and its architecture is required.

DETAILS

NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.

For the purposes of this document, the following fictitious environment is used as an example to describe the procedure:  为了本文档的目的,以下虚拟环境用作描述此过程的示例

  1. Target Database:
  2. DB_NAME: T12CCDB
  3. PDB_NAME: T12CPDB1
  4. SCHEMA: SMEDS
  5. TABLE: RECTEST
  6. NEW_TABLE: TEST_RECTEST
  7. AUXILIARY_LOCATION: /testcases/rectbl/

***********  

The RECOVER TABLE command is a new feature in 12C that allows point in time recovery of a table or a table partition.  RECOVER TABLE命令是12C中的一项新功能,它允许对表或表分区进行时间点恢复
The table is recovered into an auxiliary instance and there is the option to:  该表将恢复到辅助实例中,并且可以选择

  • import the recovered table into a new table or partition using REMAP option  使用REMAP选项将恢复的表导入到新表或分区中
  • create the expdp dump of the recovered table only, for import at a later time of your choosing  仅创建已恢复表的expdp dump,以供以后选择时导入

Pre-requisites:  先决条件

  • The target database must be in read-write mode.  目标数据库必须处于读写模式
  • The target database must be in ARCHIVELOG mode.  目标数据库必须处于ARCHIVELOG模式
  • You must have RMAN backups of the tables or table partitions as they existed at the point in time to which you want recover  these objects.  您必须具有要恢复这些对象的时间点上存在的表或表分区的RMAN备份
  • To recover single table partitions, the COMPATIBLE initialization parameter for target database must be set to 11.1.0 or higher.  要恢复单个表分区,目标数据库的COMPATIBLE初始化参数必须设置为11.1.0或更高
  • Please ensure the auxiliary destination has enough space for  restore of system, sysaux ,undo  and the required tablespace for the table recovery.  请确保辅助目标有足够的空间来还原系统,sysaux,undo和恢复表所需的表空间
    Please note these files in auxiliary destination would removed automatically once the table is recovery  请注意,一旦恢复表,辅助目标中的这些文件将自动删除

Setting the Point-in-time to Which Tables and Table Partitions Must be Recovered  设置必须恢复表和表分区的时间点
Options are:  选项有

  • SCN
  • Time
  • Sequence number

The ROOT container SYSTEM and UNDO tablespaces are restored to the auxiliary therefore RECOVER TABLE has to be run after a direct connection to ROOT CDB.  If a service_name is not used, RMAN will fail during export:
ROOT 容器 SYSTEM 和 UNDO 表空间已还原到辅助表,因此在直接连接到ROOT CDB之后必须运行RECOVER TABLE。如果未使用service_name,则RMAN在导出期间将失败

  1. % rman target / log /tmp/recover_table.log
  2. RMAN> RECOVER TABLE SMEDS."RECTEST" OF PLUGGABLE DATABASE T12CPDB1
  3. UNTIL SEQUENCE 48 THREAD 1
  4. AUXILIARY DESTINATION ‘/testcases/rectbl/‘
  5. REMAP TABLE ‘SMEDS‘.‘RECTEST‘:‘TEST_RECTEST‘;
  6. RMAN-00571: ===========================================================
  7. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  8. RMAN-00571: ===========================================================
  9. RMAN-03002: failure of recover command at 01/21/2013 15:24:19
  10. RMAN-06962: Error received during export of metadata
  11. RMAN-06960: EXPDP> ORA-31626: job does not exist
  12. ORA-31633: unable to create master table "SYSBACKUP.TSPITR_EXP_xoxr_CDcd"
  13. ORA-01552: cannot use system rollback segment for non-system tablespace ‘USERS‘

 

Point in Time TABLE RECOVERY Example  时间点表恢复示例

Table RECTEST in schema SMEDS to be recovered into new table SMEDS.TEST_RECTEST.  schema SMEDS中的表R??ECTEST要恢复到新表SMEDS.TEST_RECTEST中。
The auxiliary instance datafiles will be restored to ‘/testcases/rectbl/‘.   辅助实例数据文件将还原到 ‘/testcases/rectbl/‘。

  1. % rman target sys/<password>@t12ccdb log /tmp/recover_table.log
  2. RMAN> RECOVER TABLE SMEDS."RECTEST" OF PLUGGABLE DATABASE T12CPDB1
  3. UNTIL SEQUENCE 64 thread 1
  4. AUXILIARY DESTINATION ‘/testcases/rectbl/‘
  5. REMAP TABLE ‘SMEDS‘.‘RECTEST‘:‘TEST_RECTEST‘;
  6. Starting recover at 21-JAN-13
  7. allocated channel: ORA_DISK_1
  8. channel ORA_DISK_1: SID=16 device type=DISK
  9. RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time
  10. List of tablespaces expected to have UNDO segments
  11. Tablespace SYSTEM
  12. Tablespace UNDOTBS1
  13. Creating automatic instance, with SID=‘naxj‘
  14. initialization parameters used for automatic instance:
  15. db_name=T12CCDB
  16. db_unique_name=naxj_pitr_T12CCDB
  17. compatible=12.0.0.0.0
  18. db_block_size=8192
  19. db_files=200
  20. sga_target=1G
  21. processes=80
  22. db_create_file_dest=/testcases/rectbl/
  23. log_archive_dest_1=‘location=/testcases/rectbl/‘
  24. _enable_pluggable_database=true
  25. _clone_one_pdb_recovery=true
  26. #No auxiliary parameter file used
  27. starting up automatic instance T12CCDB
  28. Oracle instance started
  29. Total System Global Area 1068937216 bytes
  30. Fixed Size 2268624 bytes
  31. Variable Size 281018928 bytes
  32. Database Buffers 780140544 byte
  33. redo Buffers 5509120 bytes
  34. Automatic instance created
  35. contents of Memory Script:
  36. {
  37. # set requested point in time
  38. set until logseq 64 thread 1;
  39. # restore the controlfile
  40. restore clone controlfile;
  41. # mount the controlfile
  42. sql clone ‘alter database mount clone database‘;
  43. # archive current online log
  44. sql ‘alter system archive log current‘;
  45. }
  46. executing Memory Script
  47. executing command: SET until clause
  48. Starting restore at 21-JAN-13
  49. allocated channel: ORA_AUX_DISK_1
  50. channel ORA_AUX_DISK_1: SID=109 device type=DISK
  51. channel ORA_AUX_DISK_1: starting datafile backup set restore
  52. channel ORA_AUX_DISK_1: restoring control file
  53. channel ORA_AUX_DISK_1: reading from backup piece /<path>/fast_recovery_area/T12CCDB/autobackup/2013_01_21/o1_mf_s_805312613_8hv0c5yz_.bkp
  54. channel ORA_AUX_DISK_1: piece handle=/<path>/fast_recovery_area/T12CCDB/autobackup/2013_01_21/o1_mf_s_805312613_8hv0c5yz_.bkp tag=TAG20130121T175653
  55. channel ORA_AUX_DISK_1: restored backup piece 1
  56. channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
  57. output file name=/testcases/rectbl/T12CCDB/controlfile/o1_mf_8hv7z47y_.ctl
  58. Finished restore at 21-JAN-13
  59. sql statement: alter database mount clone database
  60. sql statement: alter system archive log current
  61. contents of Memory Script:
  62. {
  63. # set requested point in time
  64. set until logseq 64 thread 1;
  65. # set destinations for recovery set and auxiliary set datafiles
  66. set newname for clone datafile 1 to new;
  67. set newname for clone datafile 4 to new;
  68. set newname for clone datafile 3 to new;
  69. set newname for clone datafile 8 to new;
  70. set newname for clone datafile 9 to new;
  71. set newname for clone tempfile 1 to new;
  72. set newname for clone tempfile 3 to new;
  73. # switch all tempfiles
  74. switch clone tempfile all;
  75. # restore the tablespaces in the recovery set and the auxiliary set
  76. restore clone datafile 1, 4, 3, 8, 9;
  77. switch clone datafile all;
  78. }
  79. executing Memory Script
  80. executing command: SET until clause
  81. executing command: SET NEWNAME
  82. executing command: SET NEWNAME
  83. executing command: SET NEWNAME
  84. executing command: SET NEWNAME
  85. executing command: SET NEWNAME
  86. executing command: SET NEWNAME
  87. executing command: SET NEWNAME
  88. renamed tempfile 1 to /testcases/rectbl/T12CCDB/datafile/o1_mf_temp_%u_.tmp in control file
  89. renamed tempfile 3 to /testcases/rectbl/T12CCDB/datafile/o1_mf_temp_%u_.tmp in control file
  90. Starting restore at 21-JAN-13
  91. using channel ORA_AUX_DISK_1
  92. channel ORA_AUX_DISK_1: starting datafile backup set restore
  93. channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
  94. channel ORA_AUX_DISK_1: restoring datafile 00001 to /testcases/rectbl/T12CCDB/datafile/o1_mf_system_%u_.dbf
  95. channel ORA_AUX_DISK_1: restoring datafile 00004 to /testcases/rectbl/T12CCDB/datafile/o1_mf_undotbs1_%u_.dbf
  96. channel ORA_AUX_DISK_1: restoring datafile 00003 to /testcases/rectbl/T12CCDB/datafile/o1_mf_sysaux_%u_.dbf
  97. channel ORA_AUX_DISK_1: restoring datafile 00008 to /testcases/rectbl/T12CCDB/datafile/o1_mf_system_%u_.dbf
  98. channel ORA_AUX_DISK_1: restoring datafile 00009 to /testcases/rectbl/T12CCDB/datafile/o1_mf_sysaux_%u_.dbf
  99. channel ORA_AUX_DISK_1: reading from backup piece /<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_nnndf_TAG20130121T175546_8hv092yj_.bkp
  100. channel ORA_AUX_DISK_1: piece handle=/<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_nnndf_TAG20130121T175546_8hv092yj_.bkp tag=TAG20130121T175546
  101. channel ORA_AUX_DISK_1: restored backup piece 1
  102. channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:25
  103. Finished restore at 21-JAN-13
  104. datafile 1 switched to datafile copy
  105. input datafile copy RECID=55 STAMP=805320511 file name=/testcases/rectbl/T12CCDB/datafile/o1_mf_system_8hv7zblx_.dbf
  106. datafile 4 switched to datafile copy
  107. input datafile copy RECID=56 STAMP=805320511 file name=/testcases/rectbl/T12CCDB/datafile/o1_mf_undotbs1_8hv7zbob_.dbf
  108. datafile 3 switched to datafile copy
  109. input datafile copy RECID=57 STAMP=805320512 file name=/testcases/rectbl/T12CCDB/datafile/o1_mf_sysaux_8hv7zbn2_.dbf
  110. datafile 8 switched to datafile copy
  111. input datafile copy RECID=58 STAMP=805320512 file name=/testcases/rectbl/T12CCDB/datafile/o1_mf_system_8hv7zbnt_.dbf
  112. datafile 9 switched to datafile copy
  113. input datafile copy RECID=59 STAMP=805320512 file name=/testcases/rectbl/T12CCDB/datafile/o1_mf_sysaux_8hv7zbn7_.dbf
  114. contents of Memory Script:
  115. {
  116. # set requested point in time
  117. set until logseq 64 thread 1;
  118. # online the datafiles restored or switched
  119. sql clone "alter database datafile 1 online";
  120. sql clone "alter database datafile 4 online";
  121. sql clone "alter database datafile 3 online";
  122. sql clone ‘T12CPDB1‘ "alter database datafile 8 online";
  123. sql clone ‘T12CPDB1‘ "alter database datafile 9 online";
  124. # recover and open database read only
  125. recover clone database tablespace "SYSTEM", "UNDOTBS1", "SYSAUX", "T12CPDB1":"SYSTEM", "T12CPDB1":"SYSAUX";
  126. sql clone ‘alter database open read only‘;
  127. }
  128. executing Memory Script
  129. executing command: SET until clause
  130. sql statement: alter database datafile 1 online
  131. sql statement: alter database datafile 4 online
  132. sql statement: alter database datafile 3 online
  133. sql statement: alter database datafile 8 online
  134. sql statement: alter database datafile 9 online
  135. Starting recover at 21-JAN-13
  136. using channel ORA_AUX_DISK_1
  137. starting media recovery
  138. channel ORA_AUX_DISK_1: starting archived log restore to default destination
  139. channel ORA_AUX_DISK_1: restoring archived log
  140. archived log thread=1 sequence=58
  141. channel ORA_AUX_DISK_1: reading from backup piece /<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_annnn_TAG20130121T175652_8hv0c4bf_.bkp
  142. channel ORA_AUX_DISK_1: piece handle=/<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_annnn_TAG20130121T175652_8hv0c4bf_.bkp tag=TAG20130121T175652
  143. channel ORA_AUX_DISK_1: restored backup piece 1
  144. channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
  145. archived log file name=/testcases/rectbl/1_58_804254048.dbf thread=1 sequence=58
  146. channel ORA_AUX_DISK_1: starting archived log restore to default destination
  147. channel ORA_AUX_DISK_1: restoring archived log
  148. archived log thread=1 sequence=59
  149. channel ORA_AUX_DISK_1: restoring archived log
  150. archived log thread=1 sequence=60
  151. channel ORA_AUX_DISK_1: restoring archived log
  152. archived log thread=1 sequence=61
  153. channel ORA_AUX_DISK_1: restoring archived log
  154. archived log thread=1 sequence=62
  155. channel ORA_AUX_DISK_1: restoring archived log
  156. archived log thread=1 sequence=63
  157. channel ORA_AUX_DISK_1: reading from backup piece /<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_annnn_TAG20130121T200313_8hv7r1hz_.bkp
  158. channel ORA_AUX_DISK_1: piece handle=/<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_annnn_TAG20130121T200313_8hv7r1hz_.bkp tag=TAG20130121T200313
  159. channel ORA_AUX_DISK_1: restored backup piece 1
  160. channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
  161. archived log file name=/testcases/rectbl/1_59_804254048.dbf thread=1 sequence=59
  162. archived log file name=/testcases/rectbl/1_60_804254048.dbf thread=1 sequence=60
  163. archived log file name=/testcases/rectbl/1_61_804254048.dbf thread=1 sequence=61
  164. archived log file name=/testcases/rectbl/1_62_804254048.dbf thread=1 sequence=62
  165. archived log file name=/testcases/rectbl/1_63_804254048.dbf thread=1 sequence=63
  166. media recovery complete, elapsed time: 00:00:05
  167. Finished recover at 21-JAN-13
  168. sql statement: alter database open read only
  169. contents of Memory Script:
  170. {
  171. sql clone ‘alter pluggable database T12CPDB1 open read only‘;
  172. }
  173. executing Memory Script
  174. sql statement: alter pluggable database T12CPDB1 open read only
  175. contents of Memory Script:
  176. {
  177. sql clone "create spfile from memory";
  178. shutdown clone immediate;
  179. startup clone nomount;
  180. sql clone "alter system set control_files = ‘‘/testcases/rectbl/T12CCDB/controlfile/o1_mf_8hv7z47y_.ctl‘‘ comment=‘‘RMAN set‘‘ scope=spfile";
  181. shutdown clone immediate;
  182. startup clone nomount;
  183. # mount database
  184. sql clone ‘alter database mount clone database‘;
  185. }
  186. executing Memory Script
  187. sql statement: create spfile from memory
  188. database closed
  189. database dismounted
  190. Oracle instance shut down
  191. connected to auxiliary database (not started)
  192. Oracle instance started
  193. Total System Global Area 1068937216 bytes
  194. Fixed Size 2268624 bytes
  195. Variable Size 285213232 bytes
  196. Database Buffers 775946240 bytes
  197. Redo Buffers 5509120 bytes
  198. sql statement: alter system set control_files =‘‘/testcases/rectbl/T12CCDB/controlfile/o1_mf_8hv7z47y_.ctl‘‘ comment= ‘‘RMAN set‘‘ scope=spfile
  199. Oracle instance shut down
  200. connected to auxiliary database (not started)
  201. Oracle instance started
  202. Total System Global Area 1068937216 bytes
  203. Fixed Size 2268624 bytes
  204. Variable Size 285213232 bytes
  205. Database Buffers 775946240 bytes
  206. Redo Buffers 5509120 bytes
  207. sql statement: alter database mount clone database
  208. contents of Memory Script:
  209. {
  210. # set requested point in time
  211. set until logseq 64 thread 1;
  212. # set destinations for recovery set and auxiliary set datafiles
  213. set newname for datafile 20 to new;
  214. # restore the tablespaces in the recovery set and the auxiliary set
  215. restore clone datafile 20;
  216. switch clone datafile all;
  217. }
  218. executing Memory Script
  219. executing command: SET until clause
  220. executing command: SET NEWNAME
  221. Starting restore at 21-JAN-13
  222. allocated channel: ORA_AUX_DISK_1
  223. channel ORA_AUX_DISK_1: SID=115 device type=DISK
  224. channel ORA_AUX_DISK_1: starting datafile backup set restore
  225. channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
  226. channel ORA_AUX_DISK_1: restoring datafile 00020 to /testcases/rectbl/NAXJ_PITR_T12CCDB/datafile/o1_mf_rectbl_%u_.dbf
  227. channel ORA_AUX_DISK_1: reading from backup piece /<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_nnndf_TAG20130121T175546_8hv092yj_.bkp
  228. channel ORA_AUX_DISK_1: piece handle=/<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_nnndf_TAG20130121T175546_8hv092yj_.bkp tag=TAG20130121T175546
  229. channel ORA_AUX_DISK_1: restored backup piece 1
  230. channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
  231. Finished restore at 21-JAN-13
  232. datafile 20 switched to datafile copy
  233. input datafile copy RECID=61 STAMP=805320570 file name=/testcases/rectbl/NAXJ_PITR_T12CCDB/datafile/o1_mf_rectbl_8hv83qpg_.dbf
  234. contents of Memory Script:
  235. {
  236. # set requested point in time
  237. set until logseq 64 thread 1;
  238. # online the datafiles restored or switched
  239. sql clone ‘T12CPDB1‘ "alter database datafile 20 online";
  240. # recover and open resetlogs
  241. recover clone database tablespace "T12CPDB1":"RECTBL", "SYSTEM", "UNDOTBS1", "SYSAUX", "T12CPDB1":"SYSTEM", "T12CPDB1":"SYSAUX" delete archivelog;
  242. alter clone database open resetlogs;
  243. }
  244. executing Memory Script
  245. executing command: SET until clause
  246. sql statement: alter database datafile 20 online
  247. Starting recover at 21-JAN-13
  248. using channel ORA_AUX_DISK_1
  249. starting media recovery
  250. channel ORA_AUX_DISK_1: starting archived log restore to default destination
  251. channel ORA_AUX_DISK_1: restoring archived log
  252. archived log thread=1 sequence=58
  253. channel ORA_AUX_DISK_1: reading from backup piece /<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_annnn_TAG20130121T175652_8hv0c4bf_.bkp
  254. channel ORA_AUX_DISK_1: piece handle=/<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_annnn_TAG20130121T175652_8hv0c4bf_.bkp tag=TAG20130121T175652
  255. channel ORA_AUX_DISK_1: restored backup piece 1
  256. channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
  257. archived log file name=/testcases/rectbl/1_58_804254048.dbf thread=1 sequence=58
  258. channel clone_default: deleting archived log(s)
  259. archived log file name=/testcases/rectbl/1_58_804254048.dbf RECID=131 STAMP=805320572
  260. channel ORA_AUX_DISK_1: starting archived log restore to default destination
  261. channel ORA_AUX_DISK_1: restoring archived log
  262. archived log thread=1 sequence=59
  263. channel ORA_AUX_DISK_1: restoring archived log
  264. archived log thread=1 sequence=60
  265. channel ORA_AUX_DISK_1: restoring archived log
  266. archived log thread=1 sequence=61
  267. channel ORA_AUX_DISK_1: restoring archived log
  268. archived log thread=1 sequence=62
  269. channel ORA_AUX_DISK_1: restoring archived log
  270. archived log thread=1 sequence=63
  271. channel ORA_AUX_DISK_1: reading from backup piece /<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_annnn_TAG20130121T200313_8hv7r1hz_.bkp
  272. channel ORA_AUX_DISK_1: piece handle=/<path>/fast_recovery_area/T12CCDB/backupset/2013_01_21/o1_mf_annnn_TAG20130121T200313_8hv7r1hz_.bkp tag=TAG20130121T200313
  273. channel ORA_AUX_DISK_1: restored backup piece 1
  274. channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
  275. archived log file name=/testcases/rectbl/1_59_804254048.dbf thread=1 sequence=59
  276. channel clone_default: deleting archived log(s)
  277. archived log file name=/testcases/rectbl/1_59_804254048.dbf RECID=133 STAMP=805320573
  278. archived log file name=/testcases/rectbl/1_60_804254048.dbf thread=1 sequence=60
  279. channel clone_default: deleting archived log(s)
  280. archived log file name=/testcases/rectbl/1_60_804254048.dbf RECID=134 STAMP=805320573
  281. archived log file name=/testcases/rectbl/1_61_804254048.dbf thread=1 sequence=61
  282. channel clone_default: deleting archived log(s)
  283. archived log file name=/testcases/rectbl/1_61_804254048.dbf RECID=132 STAMP=805320573
  284. archived log file name=/testcases/rectbl/1_62_804254048.dbf thread=1 sequence=62
  285. channel clone_default: deleting archived log(s)
  286. archived log file name=/testcases/rectbl/1_62_804254048.dbf RECID=136 STAMP=805320573
  287. archived log file name=/testcases/rectbl/1_63_804254048.dbf thread=1 sequence=63
  288. channel clone_default: deleting archived log(s)
  289. archived log file name=/testcases/rectbl/1_63_804254048.dbf RECID=135 STAMP=805320573
  290. media recovery complete, elapsed time: 00:00:00
  291. Finished recover at 21-JAN-13
  292. database opened
  293. contents of Memory Script:
  294. {
  295. sql clone ‘alter pluggable database T12CPDB1 open‘;
  296. }
  297. executing Memory Script
  298. sql statement: alter pluggable database T12CPDB1 open
  299. contents of Memory Script:
  300. {
  301. # create directory for datapump import
  302. sql ‘T12CPDB1‘ "create or replace directory TSPITR_DIROBJ_DPDIR as ‘‘/testcases/rectbl/‘‘";
  303. # create directory for datapump export
  304. sql clone ‘T12CPDB1‘ "create or replace directory TSPITR_DIROBJ_DPDIR as ‘‘/testcases/rectbl/‘‘";
  305. }
  306. executing Memory Script
  307. sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ‘‘/testcases/rectbl/‘‘
  308. sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ‘‘/testcases/rectbl/‘‘
  309. Performing export of tables...
  310. EXPDP> Starting "SYS"."TSPITR_EXP_naxj_kswu":
  311. EXPDP> Estimate in progress using BLOCKS method...
  312. EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
  313. EXPDP> Total estimation using BLOCKS method: 128 KB
  314. EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
  315. EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
  316. EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
  317. EXPDP> . . exported "SMEDS"."RECTEST" 6.109 KB 32 rows
  318. EXPDP> Master table "SYS"."TSPITR_EXP_naxj_kswu" successfully loaded/unloaded
  319. EXPDP> ******************************************************************************
  320. EXPDP> Dump file set for SYS.TSPITR_EXP_naxj_kswu is:
  321. EXPDP> /testcases/rectbl/tspitr_naxj_85941.dmp
  322. EXPDP> Job "SYS"."TSPITR_EXP_naxj_kswu" successfully completed at Mon Jan 21 20:10:28 2013 elapsed 0 00:00:31
  323. Export completed
  324. contents of Memory Script:
  325. {
  326. # shutdown clone before import
  327. shutdown clone abort
  328. }
  329. executing Memory Script
  330. Oracle instance shut down
  331. Performing import of tables...
  332. IMPDP> Master table "SYS"."TSPITR_IMP_naxj_uklm" successfully loaded/unloaded
  333. IMPDP> Starting "SYS"."TSPITR_IMP_naxj_uklm":
  334. IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
  335. IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
  336. IMPDP> . . imported "SMEDS"."TEST4_RECTEST" 6.109 KB 32 rows
  337. IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
  338. IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
  339. IMPDP> Job "SYS"."TSPITR_IMP_naxj_uklm" successfully completed at Mon Jan 21 20:10:40 2013 elapsed 0 00:00:06
  340. Import completed
  341. Removing automatic instance
  342. Automatic instance removed
  343. auxiliary instance file /testcases/rectbl/T12CCDB/datafile/o1_mf_temp_8hv82j8f_.tmp deleted
  344. auxiliary instance file /testcases/rectbl/T12CCDB/datafile/o1_mf_temp_8hv82bj8_.tmp deleted
  345. auxiliary instance file /testcases/rectbl/NAXJ_PITR_T12CCDB/onlinelog/o1_mf_3_8hv840bs_.log deleted
  346. auxiliary instance file /testcases/rectbl/NAXJ_PITR_T12CCDB/onlinelog/o1_mf_2_8hv83zp1_.log deleted
  347. auxiliary instance file /testcases/rectbl/NAXJ_PITR_T12CCDB/onlinelog/o1_mf_1_8hv83z15_.log deleted
  348. auxiliary instance file /testcases/rectbl/NAXJ_PITR_T12CCDB/datafile/o1_mf_rectbl_8hv83qpg_.dbf deleted
  349. auxiliary instance file /testcases/rectbl/T12CCDB/datafile/o1_mf_sysaux_8hv7zbn7_.dbf deleted
  350. auxiliary instance file /testcases/rectbl/T12CCDB/datafile/o1_mf_system_8hv7zbnt_.dbf deleted
  351. auxiliary instance file /testcases/rectbl/T12CCDB/datafile/o1_mf_sysaux_8hv7zbn2_.dbf deleted
  352. auxiliary instance file /testcases/rectbl/T12CCDB/datafile/o1_mf_undotbs1_8hv7zbob_.dbf deleted
  353. auxiliary instance file /testcases/rectbl/T12CCDB/datafile/o1_mf_system_8hv7zblx_.dbf deleted
  354. auxiliary instance file /testcases/rectbl/T12CCDB/controlfile/o1_mf_8hv7z47y_.ctl deleted
  355. auxiliary instance file tspitr_naxj_85941.dmp deleted
  356. Finished recover at 21-JAN-13

Please note :  In cases where you do not want the table to be import but just need the export dump  you can use the notableimport  option;

请注意: 如果您不希望导入表,而只需要导出dump,则可以使用  notableimport 选项

Run

  1. run {RECOVER TABLE SMEDS."RECTEST" OF PLUGGABLE DATABASE T12CPDB1
  2. UNTIL SEQUENCE 64 thread 1
  3. AUXILIARY DESTINATION ‘/testcases/rectbl/‘
  4. datapump destination ‘/testcases/rectb/dpump/‘
  5. dump file ‘export.dmp‘
  6. notableimport; }

RMAN RECOVER TABLE 功能是 Oracle Database 12c 的新增功能 (Doc ID 1521524.1)

标签:def   channel   direct   closed   失败   actual   esc   receive   enc   

人气教程排行