Bo's Oracle Station

查看: 1717|回复: 0

课程第49次(2018-05-23星期三)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2018-5-23 20:01:44 | 显示全部楼层 |阅读模式
关于CDB和PDB的备份:

  1. [oracle@station90 ~]$ . oraenv
  2. ORACLE_SID = [orcl2] ? cdb2
  3. The Oracle base remains unchanged with value /u01/app/oracle
  4. [oracle@station90 ~]$ rman target /

  5. Recovery Manager: Release 12.1.0.2.0 - Production on Wed May 23 19:49:23 2018

  6. Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

  7. connected to target database: CDB2 (DBID=723357305)

  8. RMAN> backup tag '1T_WHOLE_INCR0' incremental level 0 database plus archivelog delete all input;


  9. Starting backup at 2018-05-23:19:49:39
  10. current log archived
  11. using target database control file instead of recovery catalog
  12. allocated channel: ORA_SBT_TAPE_1
  13. channel ORA_SBT_TAPE_1: SID=323 device type=SBT_TAPE
  14. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  15. allocated channel: ORA_SBT_TAPE_2
  16. channel ORA_SBT_TAPE_2: SID=934 device type=SBT_TAPE
  17. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  18. channel ORA_SBT_TAPE_1: starting archived log backup set
  19. channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
  20. input archived log thread=1 sequence=75 RECID=1 STAMP=976909206
  21. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-05-23:19:49:54
  22. channel ORA_SBT_TAPE_2: starting archived log backup set
  23. channel ORA_SBT_TAPE_2: specifying archived log(s) in backup set
  24. input archived log thread=1 sequence=76 RECID=2 STAMP=976909780
  25. channel ORA_SBT_TAPE_2: starting piece 1 at 2018-05-23:19:49:54
  26. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-05-23:19:50:19
  27. piece handle=01t3ktf2_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  28. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  29. channel ORA_SBT_TAPE_1: deleting archived log(s)
  30. archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_05_23/o1_mf_1_75_fjbnrp4h_.arc RECID=1 STAMP=976909206
  31. channel ORA_SBT_TAPE_2: finished piece 1 at 2018-05-23:19:50:19
  32. piece handle=02t3ktf2_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  33. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
  34. channel ORA_SBT_TAPE_2: deleting archived log(s)
  35. archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_05_23/o1_mf_1_76_fjbobmyf_.arc RECID=2 STAMP=976909780
  36. Finished backup at 2018-05-23:19:50:19

  37. Starting backup at 2018-05-23:19:50:19
  38. using channel ORA_SBT_TAPE_1
  39. using channel ORA_SBT_TAPE_2
  40. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  41. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  42. input datafile file number=00004 name=/u01/app/oracle/oradata/cdb2/undotbs01.dbf
  43. input datafile file number=00003 name=/u01/app/oracle/oradata/cdb2/sysaux01.dbf
  44. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-05-23:19:50:20
  45. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  46. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  47. input datafile file number=00028 name=/u01/app/oracle/oradata/CDB1/datafile/o1_mf_example_fhht9hsj_.dbf
  48. input datafile file number=00027 name=/u01/app/oracle/oradata/CDB1/datafile/o1_mf_users_fhht9hym_.dbf
  49. channel ORA_SBT_TAPE_2: starting piece 1 at 2018-05-23:19:50:20
  50. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-05-23:19:50:45
  51. piece handle=03t3ktfs_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  52. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  53. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  54. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  55. input datafile file number=00021 name=/u01/app/oracle/oradata/cdb2/pdb_orcl2/system01.dbf
  56. input datafile file number=00024 name=/u01/app/oracle/oradata/cdb2/pdb_orcl2/example01.dbf
  57. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-05-23:19:50:45
  58. channel ORA_SBT_TAPE_2: finished piece 1 at 2018-05-23:19:50:45
  59. piece handle=04t3ktfs_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  60. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
  61. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  62. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  63. input datafile file number=00022 name=/u01/app/oracle/oradata/cdb2/pdb_orcl2/sysaux01.dbf
  64. input datafile file number=00023 name=/u01/app/oracle/oradata/cdb2/pdb_orcl2/users01.dbf
  65. channel ORA_SBT_TAPE_2: starting piece 1 at 2018-05-23:19:50:45
  66. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-05-23:19:51:10
  67. piece handle=05t3ktgl_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  68. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  69. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  70. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  71. input datafile file number=00026 name=/u01/app/oracle/oradata/CDB1/datafile/o1_mf_sysaux_fhht9hv8_.dbf
  72. input datafile file number=00025 name=/u01/app/oracle/oradata/CDB1/datafile/o1_mf_system_fhht9hx3_.dbf
  73. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-05-23:19:51:11
  74. channel ORA_SBT_TAPE_2: finished piece 1 at 2018-05-23:19:51:12
  75. piece handle=06t3ktgl_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  76. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:27
  77. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  78. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  79. input datafile file number=00001 name=/u01/app/oracle/oradata/cdb2/system01.dbf
  80. input datafile file number=00029 name=/u01/app/oracle/oradata/cdb2/cdata_01.dbf
  81. input datafile file number=00006 name=/u01/app/oracle/oradata/cdb2/users01.dbf
  82. channel ORA_SBT_TAPE_2: starting piece 1 at 2018-05-23:19:51:12
  83. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-05-23:19:51:37
  84. piece handle=07t3kthf_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  85. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:26
  86. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  87. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  88. input datafile file number=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  89. input datafile file number=00030 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
  90. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-05-23:19:51:37
  91. channel ORA_SBT_TAPE_2: finished piece 1 at 2018-05-23:19:51:38
  92. piece handle=08t3kthg_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  93. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:26
  94. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  95. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  96. input datafile file number=00017 name=/u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_sysaux_fj1qtlhd_.dbf
  97. channel ORA_SBT_TAPE_2: starting piece 1 at 2018-05-23:19:51:38
  98. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-05-23:19:52:03
  99. piece handle=09t3kti9_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  100. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:26
  101. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  102. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  103. input datafile file number=00007 name=/u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf
  104. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-05-23:19:52:03
  105. channel ORA_SBT_TAPE_2: finished piece 1 at 2018-05-23:19:52:03
  106. piece handle=0at3ktia_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  107. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
  108. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  109. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  110. input datafile file number=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  111. input datafile file number=00012 name=/u01/app/oracle/oradata/cdb2/pdb2_1/users01.dbf
  112. channel ORA_SBT_TAPE_2: starting piece 1 at 2018-05-23:19:52:04
  113. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-05-23:19:52:29
  114. piece handle=0bt3ktj3_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  115. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:26
  116. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  117. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  118. input datafile file number=00016 name=/u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_system_fj1qtlhb_.dbf
  119. input datafile file number=00018 name=/u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_users_fj1qtlhf_.dbf
  120. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-05-23:19:52:29
  121. channel ORA_SBT_TAPE_2: finished piece 1 at 2018-05-23:19:52:29
  122. piece handle=0ct3ktj4_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  123. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
  124. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  125. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  126. input datafile file number=00005 name=/u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf
  127. channel ORA_SBT_TAPE_2: starting piece 1 at 2018-05-23:19:52:30
  128. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-05-23:19:52:55
  129. piece handle=0dt3ktjt_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  130. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:26
  131. channel ORA_SBT_TAPE_2: finished piece 1 at 2018-05-23:19:52:55
  132. piece handle=0et3ktjt_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  133. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
  134. Finished backup at 2018-05-23:19:52:55

  135. Starting backup at 2018-05-23:19:52:55
  136. current log archived
  137. using channel ORA_SBT_TAPE_1
  138. using channel ORA_SBT_TAPE_2
  139. channel ORA_SBT_TAPE_1: starting archived log backup set
  140. channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
  141. input archived log thread=1 sequence=77 RECID=3 STAMP=976909975
  142. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-05-23:19:52:56
  143. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-05-23:19:53:21
  144. piece handle=0ft3ktko_1_1 tag=1T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  145. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  146. channel ORA_SBT_TAPE_1: deleting archived log(s)
  147. archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_05_23/o1_mf_1_77_fjbojqnb_.arc RECID=3 STAMP=976909975
  148. Finished backup at 2018-05-23:19:53:21

  149. Starting Control File and SPFILE Autobackup at 2018-05-23:19:53:21
  150. piece handle=c-723357305-20180523-00 comment=API Version 2.0,MMS Version 10.4.0.4
  151. Finished Control File and SPFILE Autobackup at 2018-05-23:19:53:46

  152. RMAN> list backup of database;


  153. List of Backup Sets
  154. ===================


  155. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  156. ------- ---- -- ---------- ----------- ------------ -------------------
  157. 3       Incr 0  615.50M    SBT_TAPE    00:00:14     2018-05-23:19:50:34
  158.         BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  159.         Handle: 03t3ktfs_1_1   Media: station90-000008
  160.   List of Datafiles in backup set 3
  161.   File LV Type Ckp SCN    Ckp Time            Name
  162.   ---- -- ---- ---------- ------------------- ----
  163.   3    0  Incr 4293884    2018-05-23:19:50:20 /u01/app/oracle/oradata/cdb2/sysaux01.dbf
  164.   4    0  Incr 4293884    2018-05-23:19:50:20 /u01/app/oracle/oradata/cdb2/undotbs01.dbf

  165. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  166. ------- ---- -- ---------- ----------- ------------ -------------------
  167. 4       Incr 0  98.00M     SBT_TAPE    00:00:15     2018-05-23:19:50:35
  168.         BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  169.         Handle: 04t3ktfs_1_1   Media: station90-000007
  170.   List of Datafiles in backup set 4
  171.   Container ID: 6, PDB Name: PDB1_1
  172.   File LV Type Ckp SCN    Ckp Time            Name
  173.   ---- -- ---- ---------- ------------------- ----
  174.   27   0  Incr 4293885    2018-05-23:19:50:20 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_users_fhht9hym_.dbf
  175.   28   0  Incr 4293885    2018-05-23:19:50:20 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_example_fhht9hsj_.dbf

  176. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  177. ------- ---- -- ---------- ----------- ------------ -------------------
  178. 5       Incr 0  932.75M    SBT_TAPE    00:00:17     2018-05-23:19:51:02
  179.         BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  180.         Handle: 05t3ktgl_1_1   Media: station90-000007
  181.   List of Datafiles in backup set 5
  182.   Container ID: 5, PDB Name: PDB_ORCL2
  183.   File LV Type Ckp SCN    Ckp Time            Name
  184.   ---- -- ---- ---------- ------------------- ----
  185.   21   0  Incr 4293895    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/system01.dbf
  186.   24   0  Incr 4293895    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/example01.dbf

  187. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  188. ------- ---- -- ---------- ----------- ------------ -------------------
  189. 6       Incr 0  776.75M    SBT_TAPE    00:00:17     2018-05-23:19:51:02
  190.         BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  191.         Handle: 06t3ktgl_1_1   Media: station90-000008
  192.   List of Datafiles in backup set 6
  193.   Container ID: 5, PDB Name: PDB_ORCL2
  194.   File LV Type Ckp SCN    Ckp Time            Name
  195.   ---- -- ---- ---------- ------------------- ----
  196.   22   0  Incr 4293896    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/sysaux01.dbf
  197.   23   0  Incr 4293896    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/users01.dbf

  198. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  199. ------- ---- -- ---------- ----------- ------------ -------------------
  200. 7       Incr 0  691.00M    SBT_TAPE    00:00:16     2018-05-23:19:51:27
  201.         BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  202.         Handle: 07t3kthf_1_1   Media: station90-000007
  203.   List of Datafiles in backup set 7
  204.   Container ID: 6, PDB Name: PDB1_1
  205.   File LV Type Ckp SCN    Ckp Time            Name
  206.   ---- -- ---- ---------- ------------------- ----
  207.   25   0  Incr 4293906    2018-05-23:19:51:11 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_system_fhht9hx3_.dbf
  208.   26   0  Incr 4293906    2018-05-23:19:51:11 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_sysaux_fhht9hv8_.dbf

  209. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  210. ------- ---- -- ---------- ----------- ------------ -------------------
  211. 8       Incr 0  679.50M    SBT_TAPE    00:00:17     2018-05-23:19:51:29
  212.         BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  213.         Handle: 08t3kthg_1_1   Media: station90-000008
  214.   List of Datafiles in backup set 8
  215.   File LV Type Ckp SCN    Ckp Time            Name
  216.   ---- -- ---- ---------- ------------------- ----
  217.   1    0  Incr 4293908    2018-05-23:19:51:12 /u01/app/oracle/oradata/cdb2/system01.dbf
  218.   6    0  Incr 4293908    2018-05-23:19:51:12 /u01/app/oracle/oradata/cdb2/users01.dbf
  219.   29   0  Incr 4293908    2018-05-23:19:51:12 /u01/app/oracle/oradata/cdb2/cdata_01.dbf

  220. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  221. ------- ---- -- ---------- ----------- ------------ -------------------
  222. 9       Incr 0  465.75M    SBT_TAPE    00:00:13     2018-05-23:19:51:50
  223.         BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  224.         Handle: 09t3kti9_1_1   Media: station90-000007
  225.   List of Datafiles in backup set 9
  226.   Container ID: 3, PDB Name: PDB2
  227.   File LV Type Ckp SCN    Ckp Time            Name
  228.   ---- -- ---- ---------- ------------------- ----
  229.   11   0  Incr 4293917    2018-05-23:19:51:37 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  230.   30   0  Incr 4293917    2018-05-23:19:51:37 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  231. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  232. ------- ---- -- ---------- ----------- ------------ -------------------
  233. 10      Incr 0  464.75M    SBT_TAPE    00:00:13     2018-05-23:19:51:51
  234.         BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  235.         Handle: 0at3ktia_1_1   Media: station90-000008
  236.   List of Datafiles in backup set 10
  237.   Container ID: 4, PDB Name: PDB2_2
  238.   File LV Type Ckp SCN    Ckp Time            Name
  239.   ---- -- ---- ---------- ------------------- ----
  240.   17   0  Incr 4293919    2018-05-23:19:51:38 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_sysaux_fj1qtlhd_.dbf

  241. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  242. ------- ---- -- ---------- ----------- ------------ -------------------
  243. 11      Incr 0  210.50M    SBT_TAPE    00:00:11     2018-05-23:19:52:15
  244.         BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  245.         Handle: 0ct3ktj4_1_1   Media: station90-000008
  246.   List of Datafiles in backup set 11
  247.   Container ID: 3, PDB Name: PDB2
  248.   File LV Type Ckp SCN    Ckp Time            Name
  249.   ---- -- ---- ---------- ------------------- ----
  250.   10   0  Incr 4293929    2018-05-23:19:52:04 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  251.   12   0  Incr 4293929    2018-05-23:19:52:04 /u01/app/oracle/oradata/cdb2/pdb2_1/users01.dbf

  252. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  253. ------- ---- -- ---------- ----------- ------------ -------------------
  254. 12      Incr 0  456.25M    SBT_TAPE    00:00:13     2018-05-23:19:52:16
  255.         BP Key: 12   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  256.         Handle: 0bt3ktj3_1_1   Media: station90-000007
  257.   List of Datafiles in backup set 12
  258.   Container ID: 2, PDB Name: PDB$SEED
  259.   File LV Type Ckp SCN    Ckp Time            Name
  260.   ---- -- ---- ---------- ------------------- ----
  261.   7    0  Incr 1740084    2018-05-16:21:27:24 /u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf

  262. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  263. ------- ---- -- ---------- ----------- ------------ -------------------
  264. 13      Incr 0  210.50M    SBT_TAPE    00:00:10     2018-05-23:19:52:39
  265.         BP Key: 13   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  266.         Handle: 0dt3ktjt_1_1   Media: station90-000007
  267.   List of Datafiles in backup set 13
  268.   Container ID: 4, PDB Name: PDB2_2
  269.   File LV Type Ckp SCN    Ckp Time            Name
  270.   ---- -- ---- ---------- ------------------- ----
  271.   16   0  Incr 4293943    2018-05-23:19:52:29 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_system_fj1qtlhb_.dbf
  272.   18   0  Incr 4293943    2018-05-23:19:52:29 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_users_fj1qtlhf_.dbf

  273. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  274. ------- ---- -- ---------- ----------- ------------ -------------------
  275. 14      Incr 0  204.75M    SBT_TAPE    00:00:11     2018-05-23:19:52:40
  276.         BP Key: 14   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  277.         Handle: 0et3ktjt_1_1   Media: station90-000008
  278.   List of Datafiles in backup set 14
  279.   Container ID: 2, PDB Name: PDB$SEED
  280.   File LV Type Ckp SCN    Ckp Time            Name
  281.   ---- -- ---- ---------- ------------------- ----
  282.   5    0  Incr 1740084    2018-05-16:21:27:24 /u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf

  283. RMAN> list backup ;


  284. List of Backup Sets
  285. ===================


  286. BS Key  Size       Device Type Elapsed Time Completion Time   
  287. ------- ---------- ----------- ------------ -------------------
  288. 1       768.00K    SBT_TAPE    00:00:16     2018-05-23:19:50:10
  289.         BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  290.         Handle: 02t3ktf2_1_1   Media: station90-000007

  291.   List of Archived Logs in backup set 1
  292.   Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  293.   ---- ------- ---------- ------------------- ---------- ---------
  294.   1    76      4292078    2018-05-23:19:40:05 4293826    2018-05-23:19:49:39

  295. BS Key  Size       Device Type Elapsed Time Completion Time   
  296. ------- ---------- ----------- ------------ -------------------
  297. 2       5.50M      SBT_TAPE    00:00:17     2018-05-23:19:50:11
  298.         BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  299.         Handle: 01t3ktf2_1_1   Media: station90-000008

  300.   List of Archived Logs in backup set 2
  301.   Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  302.   ---- ------- ---------- ------------------- ---------- ---------
  303.   1    75      4188069    2018-05-23:17:00:40 4292078    2018-05-23:19:40:05

  304. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  305. ------- ---- -- ---------- ----------- ------------ -------------------
  306. 3       Incr 0  615.50M    SBT_TAPE    00:00:14     2018-05-23:19:50:34
  307.         BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  308.         Handle: 03t3ktfs_1_1   Media: station90-000008
  309.   List of Datafiles in backup set 3
  310.   File LV Type Ckp SCN    Ckp Time            Name
  311.   ---- -- ---- ---------- ------------------- ----
  312.   3    0  Incr 4293884    2018-05-23:19:50:20 /u01/app/oracle/oradata/cdb2/sysaux01.dbf
  313.   4    0  Incr 4293884    2018-05-23:19:50:20 /u01/app/oracle/oradata/cdb2/undotbs01.dbf

  314. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  315. ------- ---- -- ---------- ----------- ------------ -------------------
  316. 4       Incr 0  98.00M     SBT_TAPE    00:00:15     2018-05-23:19:50:35
  317.         BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  318.         Handle: 04t3ktfs_1_1   Media: station90-000007
  319.   List of Datafiles in backup set 4
  320.   Container ID: 6, PDB Name: PDB1_1
  321.   File LV Type Ckp SCN    Ckp Time            Name
  322.   ---- -- ---- ---------- ------------------- ----
  323.   27   0  Incr 4293885    2018-05-23:19:50:20 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_users_fhht9hym_.dbf
  324.   28   0  Incr 4293885    2018-05-23:19:50:20 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_example_fhht9hsj_.dbf

  325. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  326. ------- ---- -- ---------- ----------- ------------ -------------------
  327. 5       Incr 0  932.75M    SBT_TAPE    00:00:17     2018-05-23:19:51:02
  328.         BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  329.         Handle: 05t3ktgl_1_1   Media: station90-000007
  330.   List of Datafiles in backup set 5
  331.   Container ID: 5, PDB Name: PDB_ORCL2
  332.   File LV Type Ckp SCN    Ckp Time            Name
  333.   ---- -- ---- ---------- ------------------- ----
  334.   21   0  Incr 4293895    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/system01.dbf
  335.   24   0  Incr 4293895    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/example01.dbf

  336. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  337. ------- ---- -- ---------- ----------- ------------ -------------------
  338. 6       Incr 0  776.75M    SBT_TAPE    00:00:17     2018-05-23:19:51:02
  339.         BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  340.         Handle: 06t3ktgl_1_1   Media: station90-000008
  341.   List of Datafiles in backup set 6
  342.   Container ID: 5, PDB Name: PDB_ORCL2
  343.   File LV Type Ckp SCN    Ckp Time            Name
  344.   ---- -- ---- ---------- ------------------- ----
  345.   22   0  Incr 4293896    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/sysaux01.dbf
  346.   23   0  Incr 4293896    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/users01.dbf

  347. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  348. ------- ---- -- ---------- ----------- ------------ -------------------
  349. 7       Incr 0  691.00M    SBT_TAPE    00:00:16     2018-05-23:19:51:27
  350.         BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  351.         Handle: 07t3kthf_1_1   Media: station90-000007
  352.   List of Datafiles in backup set 7
  353.   Container ID: 6, PDB Name: PDB1_1
  354.   File LV Type Ckp SCN    Ckp Time            Name
  355.   ---- -- ---- ---------- ------------------- ----
  356.   25   0  Incr 4293906    2018-05-23:19:51:11 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_system_fhht9hx3_.dbf
  357.   26   0  Incr 4293906    2018-05-23:19:51:11 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_sysaux_fhht9hv8_.dbf

  358. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  359. ------- ---- -- ---------- ----------- ------------ -------------------
  360. 8       Incr 0  679.50M    SBT_TAPE    00:00:17     2018-05-23:19:51:29
  361.         BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  362.         Handle: 08t3kthg_1_1   Media: station90-000008
  363.   List of Datafiles in backup set 8
  364.   File LV Type Ckp SCN    Ckp Time            Name
  365.   ---- -- ---- ---------- ------------------- ----
  366.   1    0  Incr 4293908    2018-05-23:19:51:12 /u01/app/oracle/oradata/cdb2/system01.dbf
  367.   6    0  Incr 4293908    2018-05-23:19:51:12 /u01/app/oracle/oradata/cdb2/users01.dbf
  368.   29   0  Incr 4293908    2018-05-23:19:51:12 /u01/app/oracle/oradata/cdb2/cdata_01.dbf

  369. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  370. ------- ---- -- ---------- ----------- ------------ -------------------
  371. 9       Incr 0  465.75M    SBT_TAPE    00:00:13     2018-05-23:19:51:50
  372.         BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  373.         Handle: 09t3kti9_1_1   Media: station90-000007
  374.   List of Datafiles in backup set 9
  375.   Container ID: 3, PDB Name: PDB2
  376.   File LV Type Ckp SCN    Ckp Time            Name
  377.   ---- -- ---- ---------- ------------------- ----
  378.   11   0  Incr 4293917    2018-05-23:19:51:37 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  379.   30   0  Incr 4293917    2018-05-23:19:51:37 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  380. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  381. ------- ---- -- ---------- ----------- ------------ -------------------
  382. 10      Incr 0  464.75M    SBT_TAPE    00:00:13     2018-05-23:19:51:51
  383.         BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  384.         Handle: 0at3ktia_1_1   Media: station90-000008
  385.   List of Datafiles in backup set 10
  386.   Container ID: 4, PDB Name: PDB2_2
  387.   File LV Type Ckp SCN    Ckp Time            Name
  388.   ---- -- ---- ---------- ------------------- ----
  389.   17   0  Incr 4293919    2018-05-23:19:51:38 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_sysaux_fj1qtlhd_.dbf

  390. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  391. ------- ---- -- ---------- ----------- ------------ -------------------
  392. 11      Incr 0  210.50M    SBT_TAPE    00:00:11     2018-05-23:19:52:15
  393.         BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  394.         Handle: 0ct3ktj4_1_1   Media: station90-000008
  395.   List of Datafiles in backup set 11
  396.   Container ID: 3, PDB Name: PDB2
  397.   File LV Type Ckp SCN    Ckp Time            Name
  398.   ---- -- ---- ---------- ------------------- ----
  399.   10   0  Incr 4293929    2018-05-23:19:52:04 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  400.   12   0  Incr 4293929    2018-05-23:19:52:04 /u01/app/oracle/oradata/cdb2/pdb2_1/users01.dbf

  401. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  402. ------- ---- -- ---------- ----------- ------------ -------------------
  403. 12      Incr 0  456.25M    SBT_TAPE    00:00:13     2018-05-23:19:52:16
  404.         BP Key: 12   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  405.         Handle: 0bt3ktj3_1_1   Media: station90-000007
  406.   List of Datafiles in backup set 12
  407.   Container ID: 2, PDB Name: PDB$SEED
  408.   File LV Type Ckp SCN    Ckp Time            Name
  409.   ---- -- ---- ---------- ------------------- ----
  410.   7    0  Incr 1740084    2018-05-16:21:27:24 /u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf

  411. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  412. ------- ---- -- ---------- ----------- ------------ -------------------
  413. 13      Incr 0  210.50M    SBT_TAPE    00:00:10     2018-05-23:19:52:39
  414.         BP Key: 13   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  415.         Handle: 0dt3ktjt_1_1   Media: station90-000007
  416.   List of Datafiles in backup set 13
  417.   Container ID: 4, PDB Name: PDB2_2
  418.   File LV Type Ckp SCN    Ckp Time            Name
  419.   ---- -- ---- ---------- ------------------- ----
  420.   16   0  Incr 4293943    2018-05-23:19:52:29 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_system_fj1qtlhb_.dbf
  421.   18   0  Incr 4293943    2018-05-23:19:52:29 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_users_fj1qtlhf_.dbf

  422. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  423. ------- ---- -- ---------- ----------- ------------ -------------------
  424. 14      Incr 0  204.75M    SBT_TAPE    00:00:11     2018-05-23:19:52:40
  425.         BP Key: 14   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  426.         Handle: 0et3ktjt_1_1   Media: station90-000008
  427.   List of Datafiles in backup set 14
  428.   Container ID: 2, PDB Name: PDB$SEED
  429.   File LV Type Ckp SCN    Ckp Time            Name
  430.   ---- -- ---- ---------- ------------------- ----
  431.   5    0  Incr 1740084    2018-05-16:21:27:24 /u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf

  432. BS Key  Size       Device Type Elapsed Time Completion Time   
  433. ------- ---------- ----------- ------------ -------------------
  434. 15      256.00K    SBT_TAPE    00:00:08     2018-05-23:19:53:04
  435.         BP Key: 15   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  436.         Handle: 0ft3ktko_1_1   Media: station90-000007

  437.   List of Archived Logs in backup set 15
  438.   Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  439.   ---- ------- ---------- ------------------- ---------- ---------
  440.   1    77      4293826    2018-05-23:19:49:39 4293957    2018-05-23:19:52:55

  441. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  442. ------- ---- -- ---------- ----------- ------------ -------------------
  443. 16      Full    17.25M     SBT_TAPE    00:00:09     2018-05-23:19:53:30
  444.         BP Key: 16   Status: AVAILABLE  Compressed: NO  Tag: TAG20180523T195321
  445.         Handle: c-723357305-20180523-00   Media: station90-000007
  446.   SPFILE Included: Modification time: 2018-05-23:19:40:46
  447.   SPFILE db_unique_name: CDB2
  448.   Control File Included: Ckp SCN: 4293978      Ckp time: 2018-05-23:19:53:21

  449. RMAN> list backup of database;


  450. List of Backup Sets
  451. ===================


  452. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  453. ------- ---- -- ---------- ----------- ------------ -------------------
  454. 3       Incr 0  615.50M    SBT_TAPE    00:00:14     2018-05-23:19:50:34
  455.         BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  456.         Handle: 03t3ktfs_1_1   Media: station90-000008
  457.   List of Datafiles in backup set 3
  458.   File LV Type Ckp SCN    Ckp Time            Name
  459.   ---- -- ---- ---------- ------------------- ----
  460.   3    0  Incr 4293884    2018-05-23:19:50:20 /u01/app/oracle/oradata/cdb2/sysaux01.dbf
  461.   4    0  Incr 4293884    2018-05-23:19:50:20 /u01/app/oracle/oradata/cdb2/undotbs01.dbf

  462. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  463. ------- ---- -- ---------- ----------- ------------ -------------------
  464. 4       Incr 0  98.00M     SBT_TAPE    00:00:15     2018-05-23:19:50:35
  465.         BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  466.         Handle: 04t3ktfs_1_1   Media: station90-000007
  467.   List of Datafiles in backup set 4
  468.   Container ID: 6, PDB Name: PDB1_1
  469.   File LV Type Ckp SCN    Ckp Time            Name
  470.   ---- -- ---- ---------- ------------------- ----
  471.   27   0  Incr 4293885    2018-05-23:19:50:20 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_users_fhht9hym_.dbf
  472.   28   0  Incr 4293885    2018-05-23:19:50:20 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_example_fhht9hsj_.dbf

  473. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  474. ------- ---- -- ---------- ----------- ------------ -------------------
  475. 5       Incr 0  932.75M    SBT_TAPE    00:00:17     2018-05-23:19:51:02
  476.         BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  477.         Handle: 05t3ktgl_1_1   Media: station90-000007
  478.   List of Datafiles in backup set 5
  479.   Container ID: 5, PDB Name: PDB_ORCL2
  480.   File LV Type Ckp SCN    Ckp Time            Name
  481.   ---- -- ---- ---------- ------------------- ----
  482.   21   0  Incr 4293895    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/system01.dbf
  483.   24   0  Incr 4293895    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/example01.dbf

  484. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  485. ------- ---- -- ---------- ----------- ------------ -------------------
  486. 6       Incr 0  776.75M    SBT_TAPE    00:00:17     2018-05-23:19:51:02
  487.         BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  488.         Handle: 06t3ktgl_1_1   Media: station90-000008
  489.   List of Datafiles in backup set 6
  490.   Container ID: 5, PDB Name: PDB_ORCL2
  491.   File LV Type Ckp SCN    Ckp Time            Name
  492.   ---- -- ---- ---------- ------------------- ----
  493.   22   0  Incr 4293896    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/sysaux01.dbf
  494.   23   0  Incr 4293896    2018-05-23:19:50:45 /u01/app/oracle/oradata/cdb2/pdb_orcl2/users01.dbf

  495. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  496. ------- ---- -- ---------- ----------- ------------ -------------------
  497. 7       Incr 0  691.00M    SBT_TAPE    00:00:16     2018-05-23:19:51:27
  498.         BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  499.         Handle: 07t3kthf_1_1   Media: station90-000007
  500.   List of Datafiles in backup set 7
  501.   Container ID: 6, PDB Name: PDB1_1
  502.   File LV Type Ckp SCN    Ckp Time            Name
  503.   ---- -- ---- ---------- ------------------- ----
  504.   25   0  Incr 4293906    2018-05-23:19:51:11 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_system_fhht9hx3_.dbf
  505.   26   0  Incr 4293906    2018-05-23:19:51:11 /u01/app/oracle/oradata/CDB1/datafile/o1_mf_sysaux_fhht9hv8_.dbf

  506. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  507. ------- ---- -- ---------- ----------- ------------ -------------------
  508. 8       Incr 0  679.50M    SBT_TAPE    00:00:17     2018-05-23:19:51:29
  509.         BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  510.         Handle: 08t3kthg_1_1   Media: station90-000008
  511.   List of Datafiles in backup set 8
  512.   File LV Type Ckp SCN    Ckp Time            Name
  513.   ---- -- ---- ---------- ------------------- ----
  514.   1    0  Incr 4293908    2018-05-23:19:51:12 /u01/app/oracle/oradata/cdb2/system01.dbf
  515.   6    0  Incr 4293908    2018-05-23:19:51:12 /u01/app/oracle/oradata/cdb2/users01.dbf
  516.   29   0  Incr 4293908    2018-05-23:19:51:12 /u01/app/oracle/oradata/cdb2/cdata_01.dbf

  517. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  518. ------- ---- -- ---------- ----------- ------------ -------------------
  519. 9       Incr 0  465.75M    SBT_TAPE    00:00:13     2018-05-23:19:51:50
  520.         BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  521.         Handle: 09t3kti9_1_1   Media: station90-000007
  522.   List of Datafiles in backup set 9
  523.   Container ID: 3, PDB Name: PDB2
  524.   File LV Type Ckp SCN    Ckp Time            Name
  525.   ---- -- ---- ---------- ------------------- ----
  526.   11   0  Incr 4293917    2018-05-23:19:51:37 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  527.   30   0  Incr 4293917    2018-05-23:19:51:37 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  528. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  529. ------- ---- -- ---------- ----------- ------------ -------------------
  530. 10      Incr 0  464.75M    SBT_TAPE    00:00:13     2018-05-23:19:51:51
  531.         BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  532.         Handle: 0at3ktia_1_1   Media: station90-000008
  533.   List of Datafiles in backup set 10
  534.   Container ID: 4, PDB Name: PDB2_2
  535.   File LV Type Ckp SCN    Ckp Time            Name
  536.   ---- -- ---- ---------- ------------------- ----
  537.   17   0  Incr 4293919    2018-05-23:19:51:38 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_sysaux_fj1qtlhd_.dbf

  538. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  539. ------- ---- -- ---------- ----------- ------------ -------------------
  540. 11      Incr 0  210.50M    SBT_TAPE    00:00:11     2018-05-23:19:52:15
  541.         BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  542.         Handle: 0ct3ktj4_1_1   Media: station90-000008
  543.   List of Datafiles in backup set 11
  544.   Container ID: 3, PDB Name: PDB2
  545.   File LV Type Ckp SCN    Ckp Time            Name
  546.   ---- -- ---- ---------- ------------------- ----
  547.   10   0  Incr 4293929    2018-05-23:19:52:04 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  548.   12   0  Incr 4293929    2018-05-23:19:52:04 /u01/app/oracle/oradata/cdb2/pdb2_1/users01.dbf

  549. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  550. ------- ---- -- ---------- ----------- ------------ -------------------
  551. 12      Incr 0  456.25M    SBT_TAPE    00:00:13     2018-05-23:19:52:16
  552.         BP Key: 12   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  553.         Handle: 0bt3ktj3_1_1   Media: station90-000007
  554.   List of Datafiles in backup set 12
  555.   Container ID: 2, PDB Name: PDB$SEED
  556.   File LV Type Ckp SCN    Ckp Time            Name
  557.   ---- -- ---- ---------- ------------------- ----
  558.   7    0  Incr 1740084    2018-05-16:21:27:24 /u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf

  559. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  560. ------- ---- -- ---------- ----------- ------------ -------------------
  561. 13      Incr 0  210.50M    SBT_TAPE    00:00:10     2018-05-23:19:52:39
  562.         BP Key: 13   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  563.         Handle: 0dt3ktjt_1_1   Media: station90-000007
  564.   List of Datafiles in backup set 13
  565.   Container ID: 4, PDB Name: PDB2_2
  566.   File LV Type Ckp SCN    Ckp Time            Name
  567.   ---- -- ---- ---------- ------------------- ----
  568.   16   0  Incr 4293943    2018-05-23:19:52:29 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_system_fj1qtlhb_.dbf
  569.   18   0  Incr 4293943    2018-05-23:19:52:29 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/6C9ADF4F1ED80D0EE0535A00A8C07133/datafile/o1_mf_users_fj1qtlhf_.dbf

  570. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  571. ------- ---- -- ---------- ----------- ------------ -------------------
  572. 14      Incr 0  204.75M    SBT_TAPE    00:00:11     2018-05-23:19:52:40
  573.         BP Key: 14   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  574.         Handle: 0et3ktjt_1_1   Media: station90-000008
  575.   List of Datafiles in backup set 14
  576.   Container ID: 2, PDB Name: PDB$SEED
  577.   File LV Type Ckp SCN    Ckp Time            Name
  578.   ---- -- ---- ---------- ------------------- ----
  579.   5    0  Incr 1740084    2018-05-16:21:27:24 /u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf

  580. RMAN> list backup of pluggable  database pdb2;


  581. List of Backup Sets
  582. ===================


  583. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  584. ------- ---- -- ---------- ----------- ------------ -------------------
  585. 9       Incr 0  465.75M    SBT_TAPE    00:00:13     2018-05-23:19:51:50
  586.         BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  587.         Handle: 09t3kti9_1_1   Media: station90-000007
  588.   List of Datafiles in backup set 9
  589.   Container ID: 3, PDB Name: PDB2
  590.   File LV Type Ckp SCN    Ckp Time            Name
  591.   ---- -- ---- ---------- ------------------- ----
  592.   11   0  Incr 4293917    2018-05-23:19:51:37 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  593.   30   0  Incr 4293917    2018-05-23:19:51:37 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  594. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  595. ------- ---- -- ---------- ----------- ------------ -------------------
  596. 11      Incr 0  210.50M    SBT_TAPE    00:00:11     2018-05-23:19:52:15
  597.         BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  598.         Handle: 0ct3ktj4_1_1   Media: station90-000008
  599.   List of Datafiles in backup set 11
  600.   Container ID: 3, PDB Name: PDB2
  601.   File LV Type Ckp SCN    Ckp Time            Name
  602.   ---- -- ---- ---------- ------------------- ----
  603.   10   0  Incr 4293929    2018-05-23:19:52:04 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  604.   12   0  Incr 4293929    2018-05-23:19:52:04 /u01/app/oracle/oradata/cdb2/pdb2_1/users01.dbf

  605. RMAN> backup tag '2T_PLUG-PDB2_INCR0'  incremental level 0 pluggable database pdb2 plus archivelog ;


  606. Starting backup at 2018-05-23:19:59:38
  607. current log archived
  608. using channel ORA_SBT_TAPE_1
  609. using channel ORA_SBT_TAPE_2
  610. channel ORA_SBT_TAPE_1: starting archived log backup set
  611. channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
  612. input archived log thread=1 sequence=78 RECID=4 STAMP=976910379
  613. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-05-23:19:59:39
  614. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-05-23:19:59:54
  615. piece handle=0ht3ku1b_1_1 tag=2T_PLUG-PDB2_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  616. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:15
  617. Finished backup at 2018-05-23:19:59:54

  618. Starting backup at 2018-05-23:19:59:54
  619. using channel ORA_SBT_TAPE_1
  620. using channel ORA_SBT_TAPE_2
  621. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  622. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  623. input datafile file number=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  624. input datafile file number=00030 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
  625. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-05-23:19:59:55
  626. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  627. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  628. input datafile file number=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  629. input datafile file number=00012 name=/u01/app/oracle/oradata/cdb2/pdb2_1/users01.dbf
  630. channel ORA_SBT_TAPE_2: starting piece 1 at 2018-05-23:19:59:55

复制代码

当再次使用 list backup ...看到PDB2多了几个备份集(在备份恢复的视角看,插件数据库就是一群特定表空间):

  1. RMAN> list backup of pluggable  database pdb2;


  2. List of Backup Sets
  3. ===================


  4. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  5. ------- ---- -- ---------- ----------- ------------ -------------------
  6. 9       Incr 0  465.75M    SBT_TAPE    00:00:13     2018-05-23:19:51:50
  7.         BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  8.         Handle: 09t3kti9_1_1   Media: station90-000007
  9.   List of Datafiles in backup set 9
  10.   Container ID: 3, PDB Name: PDB2
  11.   File LV Type Ckp SCN    Ckp Time            Name
  12.   ---- -- ---- ---------- ------------------- ----
  13.   11   0  Incr 4293917    2018-05-23:19:51:37 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  14.   30   0  Incr 4293917    2018-05-23:19:51:37 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  15. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  16. ------- ---- -- ---------- ----------- ------------ -------------------
  17. 11      Incr 0  210.50M    SBT_TAPE    00:00:11     2018-05-23:19:52:15
  18.         BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  19.         Handle: 0ct3ktj4_1_1   Media: station90-000008
  20.   List of Datafiles in backup set 11
  21.   Container ID: 3, PDB Name: PDB2
  22.   File LV Type Ckp SCN    Ckp Time            Name
  23.   ---- -- ---- ---------- ------------------- ----
  24.   10   0  Incr 4293929    2018-05-23:19:52:04 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  25.   12   0  Incr 4293929    2018-05-23:19:52:04 /u01/app/oracle/oradata/cdb2/pdb2_1/users01.dbf

  26. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  27. ------- ---- -- ---------- ----------- ------------ -------------------
  28. 18      Incr 0  210.50M    SBT_TAPE    00:00:10     2018-05-23:20:00:05
  29.         BP Key: 18   Status: AVAILABLE  Compressed: NO  Tag: 2T_PLUG-PDB2_INCR0
  30.         Handle: 0jt3ku1r_1_1   Media: station90-000007
  31.   List of Datafiles in backup set 18
  32.   Container ID: 3, PDB Name: PDB2
  33.   File LV Type Ckp SCN    Ckp Time            Name
  34.   ---- -- ---- ---------- ------------------- ----
  35.   10   0  Incr 4294494    2018-05-23:19:59:55 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  36.   12   0  Incr 4294494    2018-05-23:19:59:55 /u01/app/oracle/oradata/cdb2/pdb2_1/users01.dbf

  37. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  38. ------- ---- -- ---------- ----------- ------------ -------------------
  39. 19      Incr 0  465.75M    SBT_TAPE    00:00:20     2018-05-23:20:00:15
  40.         BP Key: 19   Status: AVAILABLE  Compressed: NO  Tag: 2T_PLUG-PDB2_INCR0
  41.         Handle: 0it3ku1r_1_1   Media: station90-000008
  42.   List of Datafiles in backup set 19
  43.   Container ID: 3, PDB Name: PDB2
  44.   File LV Type Ckp SCN    Ckp Time            Name
  45.   ---- -- ---- ---------- ------------------- ----
  46.   11   0  Incr 4294492    2018-05-23:19:59:55 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  47.   30   0  Incr 4294492    2018-05-23:19:59:55 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  48. RMAN>
复制代码

也可更小范围备份和查看备份:

  1. RMAN> list backup of tablespace pdb2:ldata;


  2. List of Backup Sets
  3. ===================


  4. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  5. ------- ---- -- ---------- ----------- ------------ -------------------
  6. 9       Incr 0  465.75M    SBT_TAPE    00:00:13     2018-05-23:19:51:50
  7.         BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLE_INCR0
  8.         Handle: 09t3kti9_1_1   Media: station90-000007
  9.   List of Datafiles in backup set 9
  10.   File LV Type Ckp SCN    Ckp Time            Name
  11.   ---- -- ---- ---------- ------------------- ----
  12.   30   0  Incr 4293917    2018-05-23:19:51:37 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  13. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  14. ------- ---- -- ---------- ----------- ------------ -------------------
  15. 19      Incr 0  465.75M    SBT_TAPE    00:00:20     2018-05-23:20:00:15
  16.         BP Key: 19   Status: AVAILABLE  Compressed: NO  Tag: 2T_PLUG-PDB2_INCR0
  17.         Handle: 0it3ku1r_1_1   Media: station90-000008
  18.   List of Datafiles in backup set 19
  19.   File LV Type Ckp SCN    Ckp Time            Name
  20.   ---- -- ---- ---------- ------------------- ----
  21.   30   0  Incr 4294492    2018-05-23:19:59:55 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
复制代码
  1. RMAN> backup tag '3T_PDB2-LDATA_INCR0'  incremental level 0 tablespace pdb2:ldata;

  2. Starting backup at 2018-05-23:20:06:49
  3. using channel ORA_SBT_TAPE_1
  4. using channel ORA_SBT_TAPE_2
  5. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  6. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  7. input datafile file number=00030 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
  8. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-05-23:20:06:49
  9. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-05-23:20:07:14
  10. piece handle=0mt3kuep_1_1 tag=3T_PDB2-LDATA_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  11. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  12. Finished backup at 2018-05-23:20:07:14

  13. Starting Control File and SPFILE Autobackup at 2018-05-23:20:07:14
  14. piece handle=c-723357305-20180523-02 comment=API Version 2.0,MMS Version 10.4.0.4
  15. Finished Control File and SPFILE Autobackup at 2018-05-23:20:07:40

  16. RMAN>
复制代码

如果做多租户AG的7-4实验,在12.1.0.2没有关闭CDB2的情况下,可能在recover tablespace pdb2:system之后,会遇到:
Screenshot-Error.png

则这样解决:
  1. RMAN> recover pluggable database pdb2;

  2. Starting recover at 2018-05-23:20:59:41
  3. using channel ORA_SBT_TAPE_1
  4. using channel ORA_SBT_TAPE_2
  5. using channel ORA_DISK_1
  6. using channel ORA_DISK_2
  7. using channel ORA_DISK_3
  8. using channel ORA_DISK_4
  9. using channel ORA_DISK_5
  10. using channel ORA_DISK_6
  11. using channel ORA_DISK_7
  12. using channel ORA_DISK_8

  13. starting media recovery
  14. media recovery complete, elapsed time: 00:00:01

  15. Finished recover at 2018-05-23:20:59:42

  16. RMAN>
复制代码

p.png

在根容器本身上面,可以做传统意义的不完全恢复, 插件级别的恢复都是完全恢复。

多租户AG的7-5练习:
  1. [oracle@station90 ~]$ rman target /

  2. Recovery Manager: Release 12.1.0.2.0 - Production on Wed May 23 21:12:27 2018

  3. Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

  4. connected to target database: CDB2 (DBID=723357305)

  5. RMAN> list failure all;

  6. using target database control file instead of recovery catalog
  7. Database Role: PRIMARY

  8. List of Database Failures
  9. =========================

  10. Failure ID Priority Status    Time Detected       Summary
  11. ---------- -------- --------- ------------------- -------
  12. 842        HIGH     OPEN      2018-05-23:21:12:05 One or more non-system datafiles are missing
  13. 465        HIGH     OPEN      2018-05-23:20:13:30 One or more non-system datafiles need media recovery

  14. RMAN> advise failure all;

  15. Database Role: PRIMARY

  16. List of Database Failures
  17. =========================

  18. Failure ID Priority Status    Time Detected       Summary
  19. ---------- -------- --------- ------------------- -------
  20. 842        HIGH     OPEN      2018-05-23:21:12:05 One or more non-system datafiles are missing
  21. 465        HIGH     OPEN      2018-05-23:20:13:30 One or more non-system datafiles need media recovery

  22. analyzing automatic repair options; this may take some time
  23. allocated channel: ORA_SBT_TAPE_1
  24. channel ORA_SBT_TAPE_1: SID=7 device type=SBT_TAPE
  25. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  26. allocated channel: ORA_SBT_TAPE_2
  27. channel ORA_SBT_TAPE_2: SID=6 device type=SBT_TAPE
  28. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  29. allocated channel: ORA_DISK_1
  30. channel ORA_DISK_1: SID=633 device type=DISK
  31. allocated channel: ORA_DISK_2
  32. channel ORA_DISK_2: SID=926 device type=DISK
  33. allocated channel: ORA_DISK_3
  34. channel ORA_DISK_3: SID=13 device type=DISK
  35. allocated channel: ORA_DISK_4
  36. channel ORA_DISK_4: SID=316 device type=DISK
  37. allocated channel: ORA_DISK_5
  38. channel ORA_DISK_5: SID=919 device type=DISK
  39. allocated channel: ORA_DISK_6
  40. channel ORA_DISK_6: SID=8 device type=DISK
  41. allocated channel: ORA_DISK_7
  42. channel ORA_DISK_7: SID=312 device type=DISK
  43. allocated channel: ORA_DISK_8
  44. channel ORA_DISK_8: SID=636 device type=DISK
  45. analyzing automatic repair options complete

  46. Mandatory Manual Actions
  47. ========================
  48. no manual actions available

  49. Optional Manual Actions
  50. =======================
  51. 1. If file /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf was unintentionally renamed or moved, restore it
  52. 2. If you restored the wrong version of data file /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf, then replace it with the correct one

  53. Automated Repair Options
  54. ========================
  55. Option Repair Description
  56. ------ ------------------
  57. 1      Restore and recover datafile 30  
  58.   Strategy: The repair includes complete media recovery with no data loss
  59.   Repair script: /u01/app/oracle/diag/rdbms/cdb2/cdb2/hm/reco_2092345284.hm

  60. RMAN> repair failure preview;

  61. Strategy: The repair includes complete media recovery with no data loss
  62. Repair script: /u01/app/oracle/diag/rdbms/cdb2/cdb2/hm/reco_2092345284.hm

  63. contents of repair script:
  64.    # restore and recover datafile
  65.    sql 'PDB2' 'alter database datafile 30 offline';
  66.    restore ( datafile 30 );
  67.    recover datafile 30;
  68.    sql 'PDB2' 'alter database datafile 30 online';

  69. RMAN> sql 'PDB2' 'alter database datafile 30 offline';

  70. sql statement: alter database datafile 30 offline

  71. RMAN>  restore  tablespace pdb2:ldata;

  72. Starting restore at 2018-05-23:21:14:08
  73. using channel ORA_SBT_TAPE_1
  74. using channel ORA_SBT_TAPE_2
  75. using channel ORA_DISK_1
  76. using channel ORA_DISK_2
  77. using channel ORA_DISK_3
  78. using channel ORA_DISK_4
  79. using channel ORA_DISK_5
  80. using channel ORA_DISK_6
  81. using channel ORA_DISK_7
  82. using channel ORA_DISK_8

  83. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  84. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  85. channel ORA_SBT_TAPE_1: restoring datafile 00030 to /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
  86. channel ORA_SBT_TAPE_1: reading from backup piece 0mt3kuep_1_1
  87. channel ORA_SBT_TAPE_1: piece handle=0mt3kuep_1_1 tag=3T_PDB2-LDATA_INCR0
  88. channel ORA_SBT_TAPE_1: restored backup piece 1
  89. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:25
  90. Finished restore at 2018-05-23:21:14:35

  91. RMAN> recover tablespace pdb2:ldata;

  92. Starting recover at 2018-05-23:21:14:45
  93. using channel ORA_SBT_TAPE_1
  94. using channel ORA_SBT_TAPE_2
  95. using channel ORA_DISK_1
  96. using channel ORA_DISK_2
  97. using channel ORA_DISK_3
  98. using channel ORA_DISK_4
  99. using channel ORA_DISK_5
  100. using channel ORA_DISK_6
  101. using channel ORA_DISK_7
  102. using channel ORA_DISK_8

  103. starting media recovery

  104. archived log for thread 1 with sequence 80 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_05_23/o1_mf_1_80_fjbqmqns_.arc
  105. archived log for thread 1 with sequence 81 is already on disk as file /u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_05_23/o1_mf_1_81_fjbqmr2s_.arc
  106. archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_05_23/o1_mf_1_80_fjbqmqns_.arc thread=1 sequence=80
  107. archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2018_05_23/o1_mf_1_81_fjbqmr2s_.arc thread=1 sequence=81
  108. media recovery complete, elapsed time: 00:00:01
  109. Finished recover at 2018-05-23:21:14:48

  110. RMAN> sql 'PDB2' 'alter database datafile 30 online';

  111. sql statement: alter database datafile 30 online

  112. RMAN>
复制代码

PDB TSPITR和传统的TSPITR注意几点:
1.  时间格式export NLS_DATE_FORMAT="YYYY-MM-DD:HH24:MI:SS"。
2.  如果要恢复的对象在users表空间上:alter database default tablespace example。
3.  如果db_recovery_file_dest没有设置,设置成:alter system set db_recovery_file_dest='/u01/app/oracle/oradata'。
4.  对users表空间进行自包含集检查。并处理。  
5.  alter tablespace users offline;
6.
  1. [oracle@station90 ~]$ date
  2. 2018年 05月 24日 星期四 15:17:55 CST
  3. [oracle@station90 ~]$ sqlplus /nolog

  4. SQL*Plus: Release 11.2.0.3.0 Production on Thu May 24 15:19:35 2018

  5. Copyright (c) 1982, 2011, Oracle.  All rights reserved.

  6. SQL> conn / as sysdba
  7. Connected.
  8. SQL> alter database default tablespace example;

  9. Database altered.

  10. SQL> select  table_name from dba_tables where tablespace_name='USERS';

  11. TABLE_NAME
  12. ------------------------------
  13. TTESTBOTANG_5
  14. DEPT
  15. EMP
  16. BONUS
  17. SALGRADE
  18. PRODUCT_REF_LIST_NESTEDTAB
  19. SUBCATEGORY_REF_LIST_NESTEDTAB

  20. 7 rows selected.

  21. SQL> select  owner,table_name from dba_tables where tablespace_name='USERS';

  22. OWNER                               TABLE_NAME
  23. ------------------------------ ------------------------------
  24. SYS                               TTESTBOTANG_5
  25. SCOTT                               DEPT
  26. SCOTT                               EMP
  27. SCOTT                               BONUS
  28. SCOTT                               SALGRADE
  29. OE                               PRODUCT_REF_LIST_NESTEDTAB
  30. OE                               SUBCATEGORY_REF_LIST_NESTEDTAB

  31. 7 rows selected.

  32. SQL> alter table TTESTBOTANG_5  move tablespace system;

  33. Table altered.

  34. SQL> alter tablespace users offline ;

  35. Tablespace altered.

  36. SQL> exit
  37. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
  38. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  39. and Real Application Testing options
  40. [oracle@station90 ~]$ rman target /

  41. Recovery Manager: Release 11.2.0.3.0 - Production on Thu May 24 15:22:53 2018

  42. Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

  43. connected to target database: ORCL (DBID=1504656014)

  44. RMAN> recover tablespace users
  45. 2> until time '2018-05-24:15:19:02'
  46. 3> AUXILIARY DESTINATION '/u01/app/oracle/oradata'
  47. 4> ;

  48. Starting recover at 2018-05-24:15:25:29
  49. using target database control file instead of recovery catalog
  50. allocated channel: ORA_DISK_1
  51. channel ORA_DISK_1: SID=141 device type=DISK
  52. RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time

  53. List of tablespaces expected to have UNDO segments
  54. Tablespace SYSTEM
  55. Tablespace UNDOTBS1

  56. Creating automatic instance, with SID='jDzu'

  57. initialization parameters used for automatic instance:
  58. db_name=ORCL
  59. db_unique_name=jDzu_tspitr_ORCL
  60. compatible=11.2.0.0.0
  61. db_block_size=8192
  62. db_files=200
  63. sga_target=280M
  64. processes=50
  65. db_create_file_dest=/u01/app/oracle/oradata
  66. log_archive_dest_1='location=/u01/app/oracle/oradata'
  67. #No auxiliary parameter file used


  68. starting up automatic instance ORCL

  69. Oracle instance started

  70. Total System Global Area     292278272 bytes

  71. Fixed Size                     2227744 bytes
  72. Variable Size                100663776 bytes
  73. Database Buffers             184549376 bytes
  74. Redo Buffers                   4837376 bytes
  75. Automatic instance created
  76. Running TRANSPORT_SET_CHECK on recovery set tablespaces
  77. TRANSPORT_SET_CHECK completed successfully

  78. contents of Memory Script:
  79. {
  80. # set requested point in time
  81. set until  time "2018-05-24:15:19:02";
  82. # restore the controlfile
  83. restore clone controlfile;
  84. # mount the controlfile
  85. sql clone 'alter database mount clone database';
  86. # archive current online log
  87. sql 'alter system archive log current';
  88. # avoid unnecessary autobackups for structural changes during TSPITR
  89. sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
  90. }
  91. executing Memory Script

  92. executing command: SET until clause

  93. Starting restore at 2018-05-24:15:26:07
  94. allocated channel: ORA_AUX_DISK_1
  95. channel ORA_AUX_DISK_1: SID=80 device type=DISK

  96. channel ORA_AUX_DISK_1: starting datafile backup set restore
  97. channel ORA_AUX_DISK_1: restoring control file
  98. channel ORA_AUX_DISK_1: reading from backup piece +FRA/orcl/backupset/2018_05_24/ncsnf0_tag20180524t151653_0.363.976979831
  99. channel ORA_AUX_DISK_1: piece handle=+FRA/orcl/backupset/2018_05_24/ncsnf0_tag20180524t151653_0.363.976979831 tag=TAG20180524T151653
  100. channel ORA_AUX_DISK_1: restored backup piece 1
  101. channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:05
  102. output file name=/u01/app/oracle/oradata/ORCL/controlfile/o1_mf_fjdt8m66_.ctl
  103. Finished restore at 2018-05-24:15:26:12

  104. sql statement: alter database mount clone database

  105. sql statement: alter system archive log current

  106. sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;

  107. contents of Memory Script:
  108. {
  109. # set requested point in time
  110. set until  time "2018-05-24:15:19:02";
  111. # set destinations for recovery set and auxiliary set datafiles
  112. set newname for clone datafile  1 to new;
  113. set newname for clone datafile  3 to new;
  114. set newname for clone datafile  2 to new;
  115. set newname for clone tempfile  1 to new;
  116. set newname for datafile  4 to
  117. "+DATA/orcl/datafile/users.263.976875167";
  118. # switch all tempfiles
  119. switch clone tempfile all;
  120. # restore the tablespaces in the recovery set and the auxiliary set
  121. restore clone datafile  1, 3, 2, 4;
  122. switch clone datafile all;
  123. }
  124. executing Memory Script

  125. executing command: SET until clause

  126. executing command: SET NEWNAME

  127. executing command: SET NEWNAME

  128. executing command: SET NEWNAME

  129. executing command: SET NEWNAME

  130. executing command: SET NEWNAME

  131. renamed tempfile 1 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_%u_.tmp in control file

  132. Starting restore at 2018-05-24:15:26:17
  133. using channel ORA_AUX_DISK_1

  134. channel ORA_AUX_DISK_1: starting datafile backup set restore
  135. channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
  136. channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_%u_.dbf
  137. channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_%u_.dbf
  138. channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_%u_.dbf
  139. channel ORA_AUX_DISK_1: restoring datafile 00004 to +DATA/orcl/datafile/users.263.976875167
  140. channel ORA_AUX_DISK_1: reading from backup piece +FRA/orcl/backupset/2018_05_24/nnndf0_tag20180524t151653_0.257.976979815
  141. channel ORA_AUX_DISK_1: piece handle=+FRA/orcl/backupset/2018_05_24/nnndf0_tag20180524t151653_0.257.976979815 tag=TAG20180524T151653
  142. channel ORA_AUX_DISK_1: restored backup piece 1
  143. channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
  144. Finished restore at 2018-05-24:15:26:25

  145. datafile 1 switched to datafile copy
  146. input datafile copy RECID=5 STAMP=976980385 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_fjdt8t02_.dbf
  147. datafile 3 switched to datafile copy
  148. input datafile copy RECID=6 STAMP=976980385 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_fjdt8t11_.dbf
  149. datafile 2 switched to datafile copy
  150. input datafile copy RECID=7 STAMP=976980385 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_fjdt8t0k_.dbf

  151. contents of Memory Script:
  152. {
  153. # set requested point in time
  154. set until  time "2018-05-24:15:19:02";
  155. # online the datafiles restored or switched
  156. sql clone "alter database datafile  1 online";
  157. sql clone "alter database datafile  3 online";
  158. sql clone "alter database datafile  2 online";
  159. sql clone "alter database datafile  4 online";
  160. # recover and open resetlogs
  161. recover clone database tablespace  "USERS", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
  162. alter clone database open resetlogs;
  163. }
  164. executing Memory Script

  165. executing command: SET until clause

  166. sql statement: alter database datafile  1 online

  167. sql statement: alter database datafile  3 online

  168. sql statement: alter database datafile  2 online

  169. sql statement: alter database datafile  4 online

  170. Starting recover at 2018-05-24:15:26:25
  171. using channel ORA_AUX_DISK_1

  172. starting media recovery

  173. archived log for thread 1 with sequence 5 is already on disk as file +FRA/orcl/archivelog/2018_05_24/thread_1_seq_5.362.976979937
  174. archived log for thread 1 with sequence 6 is already on disk as file +FRA/orcl/archivelog/2018_05_24/thread_1_seq_6.361.976979937
  175. archived log for thread 1 with sequence 7 is already on disk as file +FRA/orcl/archivelog/2018_05_24/thread_1_seq_7.360.976979947
  176. archived log file name=+FRA/orcl/archivelog/2018_05_24/thread_1_seq_5.362.976979937 thread=1 sequence=5
  177. archived log file name=+FRA/orcl/archivelog/2018_05_24/thread_1_seq_6.361.976979937 thread=1 sequence=6
  178. archived log file name=+FRA/orcl/archivelog/2018_05_24/thread_1_seq_7.360.976979947 thread=1 sequence=7
  179. media recovery complete, elapsed time: 00:00:01
  180. Finished recover at 2018-05-24:15:26:28

  181. database opened

  182. contents of Memory Script:
  183. {
  184. # make read only the tablespace that will be exported
  185. sql clone 'alter tablespace  USERS read only';
  186. # create directory for datapump import
  187. sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
  188. /u01/app/oracle/oradata''";
  189. # create directory for datapump export
  190. sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
  191. /u01/app/oracle/oradata''";
  192. }
  193. executing Memory Script

  194. sql statement: alter tablespace  USERS read only

  195. sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/oradata''

  196. sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/oradata''

  197. Performing export of metadata...
  198.    EXPDP> Starting "SYS"."TSPITR_EXP_jDzu":  
  199.    EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
  200.    EXPDP> Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_SPEC
  201.    EXPDP> Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_BODY
  202.    EXPDP> Processing object type TRANSPORTABLE_EXPORT/XMLSCHEMA/XMLSCHEMA
  203.    EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
  204.    EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
  205.    EXPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
  206.    EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
  207.    EXPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
  208.    EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  209.    EXPDP> Master table "SYS"."TSPITR_EXP_jDzu" successfully loaded/unloaded
  210.    EXPDP> ******************************************************************************
  211.    EXPDP> Dump file set for SYS.TSPITR_EXP_jDzu is:
  212.    EXPDP>   /u01/app/oracle/oradata/tspitr_jDzu_44512.dmp
  213.    EXPDP> ******************************************************************************
  214.    EXPDP> Datafiles required for transportable tablespace USERS:
  215.    EXPDP>   +DATA/orcl/datafile/users.263.976875167
  216.    EXPDP> Job "SYS"."TSPITR_EXP_jDzu" successfully completed at 15:27:36
  217. Export completed


  218. contents of Memory Script:
  219. {
  220. # shutdown clone before import
  221. shutdown clone immediate
  222. # drop target tablespaces before importing them back
  223. sql 'drop tablespace  USERS including contents keep datafiles';
  224. }
  225. executing Memory Script

  226. database closed
  227. database dismounted
  228. Oracle instance shut down

  229. sql statement: drop tablespace  USERS including contents keep datafiles

  230. Performing import of metadata...
  231.    IMPDP> Master table "SYS"."TSPITR_IMP_jDzu" successfully loaded/unloaded
  232.    IMPDP> Starting "SYS"."TSPITR_IMP_jDzu":  
  233.    IMPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
  234.    IMPDP> Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_SPEC
  235.    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
  236.    IMPDP> Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_BODY
  237.    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
  238.    IMPDP> Processing object type TRANSPORTABLE_EXPORT/XMLSCHEMA/XMLSCHEMA
  239.    IMPDP> ORA-39083: Object type XMLSCHEMA failed to create with error:
  240. ORA-31085: schema "http://localhost:8080/source/schemas/poSource/xsd/purchaseOrder.xsd" already registered
  241. Failing sql is:
  242. BEGIN dbms_xmlschema.registerSchema(:1, :2, (:3 = 1), FALSE,FALSE,FALSE,FALSE, :4, options=> :5, schemaoid => :6, import_options => :7); END;
  243.    IMPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
  244.    IMPDP> ORA-39083: Object type TABLE:"OE"."PURCHASEORDER" failed to create with error:
  245. ORA-31061: XDB error: DBMS_XDBZ.ENABLE_HIERARCHY
  246. ORA-06512: at "XDB.DBMS_XDBZ0", line 131
  247. ORA-06512: at "XDB.DBMS_XDBZ0", line 588
  248. ORA-01031: insufficient privileges
  249. Failing sql is:
  250. BEGIN DBMS_XDBZ.ENABLE_HIERARCHY('"OE"','"PURCHASEORDER"'); END;
  251.    IMPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
  252.    IMPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
  253.    IMPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
  254.    IMPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
  255.    IMPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  256.    IMPDP> Job "SYS"."TSPITR_IMP_jDzu" completed with 21 error(s) at 15:28:05
  257. Import completed


  258. contents of Memory Script:
  259. {
  260. # make read write and offline the imported tablespaces
  261. sql 'alter tablespace  USERS read write';
  262. sql 'alter tablespace  USERS offline';
  263. # enable autobackups after TSPITR is finished
  264. sql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;';
  265. }
  266. executing Memory Script

  267. sql statement: alter tablespace  USERS read write

  268. sql statement: alter tablespace  USERS offline

  269. sql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;

  270. Removing automatic instance
  271. Automatic instance removed
  272. auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_fjdt97cq_.tmp deleted
  273. auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_3_fjdt963f_.log deleted
  274. auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_2_fjdt95n7_.log deleted
  275. auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_1_fjdt9547_.log deleted
  276. auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_fjdt8t0k_.dbf deleted
  277. auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_fjdt8t11_.dbf deleted
  278. auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_fjdt8t02_.dbf deleted
  279. auxiliary instance file /u01/app/oracle/oradata/ORCL/controlfile/o1_mf_fjdt8m66_.ctl deleted
  280. Finished recover at 2018-05-24:15:28:07

  281. RMAN> exit


  282. Recovery Manager complete.
  283. [oracle@station90 ~]$ sqlplus /nolog

  284. SQL*Plus: Release 11.2.0.3.0 Production on Thu May 24 15:32:45 2018

  285. Copyright (c) 1982, 2011, Oracle.  All rights reserved.

  286. SQL> conn / as sysdba
  287. Connected.
  288. SQL> alter tablespace users online;

  289. Tablespace altered.

  290. SQL> select* from hr.t126;

  291.          A
  292. ----------
  293.          1

  294. SQL>
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-19 08:27 , Processed in 0.132229 second(s), 27 queries .

快速回复 返回顶部 返回列表