Bo's Oracle Station

查看: 1216|回复: 0

TSPIR的实验

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2020-11-24 20:21:27 | 显示全部楼层 |阅读模式
1.进行自包含集检查:
  1. begin
  2.   dbms_tts.transport_set_check('USERS');
  3. end;
  4. /

  5. select  * from transport_set_violations;

  6. alter table aud$ move tablespace system;
复制代码
2. 确定一下有没有0级的全库备份:
  1. [oracle@classroom ~]$ rman target /

  2. Recovery Manager: Release 12.1.0.2.0 - Production on 星期二 11月 24 20:17:19 2020

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

  4. connected to target database: ORCL (DBID=1574592120)

  5. RMAN> list copy;

  6. using target database control file instead of recovery catalog
  7. specification does not match any control file copy in the repository
  8. List of Datafile Copies
  9. =======================

  10. Key     File S Completion Time     Ckp SCN    Ckp Time           
  11. ------- ---- - ------------------- ---------- -------------------
  12. 55      1    A 2020-11-15:16:42:38 11939954   2020-11-15:16:42:14
  13.         Name: +FRA/ORCL/DATAFILE/system.422.1056559341
  14.         Tag: ORAOEM_LEVEL_0

  15. 53      2    A 2020-11-15:16:42:35 11939949   2020-11-15:16:42:14
  16.         Name: +FRA/ORCL/DATAFILE/sysaux.394.1056559335
  17.         Tag: ORAOEM_LEVEL_0

  18. 54      3    A 2020-11-15:16:42:35 11939952   2020-11-15:16:42:14
  19.         Name: +FRA/ORCL/DATAFILE/undotbs1.393.1056559337
  20.         Tag: ORAOEM_LEVEL_0

  21. 51      4    A 2020-11-15:16:42:24 11939956   2020-11-15:16:42:14
  22.         Name: +FRA/ORCL/DATAFILE/users.426.1056559339
  23.         Tag: ORAOEM_LEVEL_0

  24. 56      5    A 2020-11-15:16:42:39 11939946   2020-11-15:16:42:13
  25.         Name: +FRA/ORCL/DATAFILE/example.403.1056559335
  26.         Tag: ORAOEM_LEVEL_0

  27. 50      6    A 2020-11-15:16:42:21 11939959   2020-11-15:16:42:14
  28.         Name: +FRA/ORCL/DATAFILE/tbs1.387.1056559339
  29.         Tag: ORAOEM_LEVEL_0

  30. 58      7    A 2020-11-15:16:42:39 11939970   2020-11-15:16:42:25
  31.         Name: +FRA/ORCL/DATAFILE/tbs2.425.1056559359
  32.         Tag: ORAOEM_LEVEL_0

  33. 52      8    A 2020-11-15:16:42:26 11939962   2020-11-15:16:42:15
  34.         Name: +FRA/ORCL/DATAFILE/tbs3.423.1056559345
  35.         Tag: ORAOEM_LEVEL_0

  36. 63      9    A 2020-11-15:16:42:46 11939994   2020-11-15:16:42:44
  37.         Name: +FRA/ORCL/DATAFILE/tbsocp05_test.415.1056559367
  38.         Tag: ORAOEM_LEVEL_0

  39. 49      10   A 2020-11-15:16:42:17 11939958   2020-11-15:16:42:14
  40.         Name: +FRA/ORCL/DATAFILE/tbsuniform.421.1056559337
  41.         Tag: ORAOEM_LEVEL_0

  42. 57      11   A 2020-11-15:16:42:39 11939973   2020-11-15:16:42:26
  43.         Name: +FRA/ORCL/DATAFILE/tbsbig.424.1056559359
  44.         Tag: ORAOEM_LEVEL_0

  45. 59      12   A 2020-11-15:16:42:40 11939977   2020-11-15:16:42:28
  46.         Name: +FRA/ORCL/DATAFILE/tbsuniform.427.1056559361
  47.         Tag: ORAOEM_LEVEL_0

  48. 64      13   A 2020-11-15:16:42:46 11939997   2020-11-15:16:42:45
  49.         Name: +FRA/ORCL/DATAFILE/tbs32k.396.1056559367
  50.         Tag: ORAOEM_LEVEL_0

  51. 60      14   A 2020-11-15:16:42:40 11939980   2020-11-15:16:42:29
  52.         Name: +FRA/ORCL/DATAFILE/tbs_nocompression.408.1056559361
  53.         Tag: ORAOEM_LEVEL_0

  54. 61      15   A 2020-11-15:16:42:45 11939988   2020-11-15:16:42:43
  55.         Name: +FRA/ORCL/DATAFILE/tbs_basic.413.1056559365
  56.         Tag: ORAOEM_LEVEL_0

  57. 62      16   A 2020-11-15:16:42:46 11939991   2020-11-15:16:42:44
  58.         Name: +FRA/ORCL/DATAFILE/tbs_oltp.416.1056559367
  59.         Tag: ORAOEM_LEVEL_0

  60. List of Archived Log Copies for database with db_unique_name ORCL
  61. =====================================================================

  62. Key     Thrd Seq     S Low Time           
  63. ------- ---- ------- - -------------------
  64. 22      1    1       A 2020-11-15:16:29:01
  65.         Name: +FRA/ORCL/ARCHIVELOG/2020_11_15/thread_1_seq_1.412.1056559383

  66. 23      1    2       A 2020-11-15:16:43:03
  67.         Name: +FRA/ORCL/ARCHIVELOG/2020_11_15/thread_1_seq_2.401.1056559807

  68. 24      1    3       A 2020-11-15:16:50:07
  69.         Name: +FRA/ORCL/ARCHIVELOG/2020_11_17/thread_1_seq_3.402.1056743447

  70. 25      1    4       A 2020-11-17:19:50:46
  71.         Name: +FRA/ORCL/ARCHIVELOG/2018_06_22/thread_1_seq_4.397.1056551755

  72. 26      1    5       A 2018-06-22:20:25:39
  73.         Name: +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_5.428.1057347933

复制代码

  1. run {
  2. allocate channel oem_disk_backup1 type disk ;
  3. allocate channel oem_disk_backup2 type disk ;
  4. allocate channel oem_disk_backup3 type disk ;
  5. allocate channel oem_disk_backup4 type disk ;
  6. allocate channel oem_disk_backup5 type disk ;
  7. allocate channel oem_disk_backup6 type disk ;
  8. allocate channel oem_disk_backup7 type disk ;
  9. allocate channel oem_disk_backup8 type disk ;
  10. recover copy of database with tag 'ORAOEM_LEVEL_0';
  11. backup incremental level 1 copies=1 for recover of copy with tag 'ORAOEM_LEVEL_0' database;
  12. release channel oem_disk_backup1;
  13. release channel oem_disk_backup2;
  14. release channel oem_disk_backup3;
  15. release channel oem_disk_backup4;
  16. release channel oem_disk_backup5;
  17. release channel oem_disk_backup6;
  18. release channel oem_disk_backup7;
  19. release channel oem_disk_backup8;
  20. allocate channel oem_sbt_backup1 type 'SBT_TAPE' format '%d_%U' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
  21. allocate channel oem_sbt_backup2 type 'SBT_TAPE' format '%d_%U' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
  22. backup archivelog all not backed up;
  23. }
  24. allocate channel for maintenance device type 'SBT_TAPE' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
  25. delete noprompt obsolete recovery window of 31 days device type 'SBT_TAPE';

复制代码
  1. [oracle@classroom ~]$ rman target  / cmdfile=/home/oracle/day1.rcv

  2. Recovery Manager: Release 12.1.0.2.0 - Production on 星期二 11月 24 20:18:43 2020

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

  4. connected to target database: ORCL (DBID=1574592120)

  5. RMAN> run {
  6. 2> allocate channel oem_disk_backup1 type disk ;
  7. 3> allocate channel oem_disk_backup2 type disk ;
  8. 4> allocate channel oem_disk_backup3 type disk ;
  9. 5> allocate channel oem_disk_backup4 type disk ;
  10. 6> allocate channel oem_disk_backup5 type disk ;
  11. 7> allocate channel oem_disk_backup6 type disk ;
  12. 8> allocate channel oem_disk_backup7 type disk ;
  13. 9> allocate channel oem_disk_backup8 type disk ;
  14. 10> recover copy of database with tag 'ORAOEM_LEVEL_0';
  15. 11> backup incremental level 1 copies=1 for recover of copy with tag 'ORAOEM_LEVEL_0' database;
  16. 12> release channel oem_disk_backup1;
  17. 13> release channel oem_disk_backup2;
  18. 14> release channel oem_disk_backup3;
  19. 15> release channel oem_disk_backup4;
  20. 16> release channel oem_disk_backup5;
  21. 17> release channel oem_disk_backup6;
  22. 18> release channel oem_disk_backup7;
  23. 19> release channel oem_disk_backup8;
  24. 20> allocate channel oem_sbt_backup1 type 'SBT_TAPE' format '%d_%U' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
  25. 21> allocate channel oem_sbt_backup2 type 'SBT_TAPE' format '%d_%U' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
  26. 22> backup archivelog all not backed up;
  27. 23> }
  28. 24> allocate channel for maintenance device type 'SBT_TAPE' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
  29. 25> delete noprompt obsolete recovery window of 31 days device type 'SBT_TAPE';
  30. 26>
  31. 27>
  32. 28>
  33. using target database control file instead of recovery catalog
  34. allocated channel: oem_disk_backup1
  35. channel oem_disk_backup1: SID=372 device type=DISK

  36. allocated channel: oem_disk_backup2
  37. channel oem_disk_backup2: SID=20 device type=DISK

  38. allocated channel: oem_disk_backup3
  39. channel oem_disk_backup3: SID=138 device type=DISK

  40. allocated channel: oem_disk_backup4
  41. channel oem_disk_backup4: SID=255 device type=DISK

  42. allocated channel: oem_disk_backup5
  43. channel oem_disk_backup5: SID=373 device type=DISK

  44. allocated channel: oem_disk_backup6
  45. channel oem_disk_backup6: SID=21 device type=DISK

  46. allocated channel: oem_disk_backup7
  47. channel oem_disk_backup7: SID=139 device type=DISK

  48. allocated channel: oem_disk_backup8
  49. channel oem_disk_backup8: SID=258 device type=DISK

  50. Starting recover at 2020-11-24:20:18:50
  51. channel oem_disk_backup1: starting incremental datafile backup set restore
  52. channel oem_disk_backup1: specifying datafile copies to recover
  53. recovering datafile copy file number=00002 name=+FRA/ORCL/DATAFILE/sysaux.394.1056559335
  54. recovering datafile copy file number=00009 name=+FRA/ORCL/DATAFILE/tbsocp05_test.415.1056559367
  55. channel oem_disk_backup1: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.398.1056559787
  56. channel oem_disk_backup2: starting incremental datafile backup set restore
  57. channel oem_disk_backup2: specifying datafile copies to recover
  58. recovering datafile copy file number=00003 name=+FRA/ORCL/DATAFILE/undotbs1.393.1056559337
  59. recovering datafile copy file number=00016 name=+FRA/ORCL/DATAFILE/tbs_oltp.416.1056559367
  60. channel oem_disk_backup2: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.400.1056559787
  61. channel oem_disk_backup3: starting incremental datafile backup set restore
  62. channel oem_disk_backup3: specifying datafile copies to recover
  63. recovering datafile copy file number=00005 name=+FRA/ORCL/DATAFILE/example.403.1056559335
  64. channel oem_disk_backup3: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.399.1056559787
  65. channel oem_disk_backup4: starting incremental datafile backup set restore
  66. channel oem_disk_backup4: specifying datafile copies to recover
  67. recovering datafile copy file number=00001 name=+FRA/ORCL/DATAFILE/system.422.1056559341
  68. recovering datafile copy file number=00015 name=+FRA/ORCL/DATAFILE/tbs_basic.413.1056559365
  69. channel oem_disk_backup4: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.418.1056559787
  70. channel oem_disk_backup5: starting incremental datafile backup set restore
  71. channel oem_disk_backup5: specifying datafile copies to recover
  72. recovering datafile copy file number=00004 name=+FRA/ORCL/DATAFILE/users.426.1056559339
  73. recovering datafile copy file number=00014 name=+FRA/ORCL/DATAFILE/tbs_nocompression.408.1056559361
  74. channel oem_disk_backup5: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.373.1056559787
  75. channel oem_disk_backup6: starting incremental datafile backup set restore
  76. channel oem_disk_backup6: specifying datafile copies to recover
  77. recovering datafile copy file number=00006 name=+FRA/ORCL/DATAFILE/tbs1.387.1056559339
  78. recovering datafile copy file number=00011 name=+FRA/ORCL/DATAFILE/tbsbig.424.1056559359
  79. channel oem_disk_backup6: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.410.1056559787
  80. channel oem_disk_backup7: starting incremental datafile backup set restore
  81. channel oem_disk_backup7: specifying datafile copies to recover
  82. recovering datafile copy file number=00007 name=+FRA/ORCL/DATAFILE/tbs2.425.1056559359
  83. recovering datafile copy file number=00008 name=+FRA/ORCL/DATAFILE/tbs3.423.1056559345
  84. channel oem_disk_backup7: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.258.1056559787
  85. channel oem_disk_backup8: starting incremental datafile backup set restore
  86. channel oem_disk_backup8: specifying datafile copies to recover
  87. recovering datafile copy file number=00010 name=+FRA/ORCL/DATAFILE/tbsuniform.421.1056559337
  88. recovering datafile copy file number=00012 name=+FRA/ORCL/DATAFILE/tbsuniform.427.1056559361
  89. channel oem_disk_backup8: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.409.1056559787
  90. channel oem_disk_backup1: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.398.1056559787 tag=ORAOEM_LEVEL_0
  91. channel oem_disk_backup1: restored backup piece 1
  92. channel oem_disk_backup1: restore complete, elapsed time: 00:00:01
  93. channel oem_disk_backup1: starting incremental datafile backup set restore
  94. channel oem_disk_backup1: specifying datafile copies to recover
  95. recovering datafile copy file number=00013 name=+FRA/ORCL/DATAFILE/tbs32k.396.1056559367
  96. channel oem_disk_backup1: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.392.1056559791
  97. channel oem_disk_backup2: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.400.1056559787 tag=ORAOEM_LEVEL_0
  98. channel oem_disk_backup2: restored backup piece 1
  99. channel oem_disk_backup2: restore complete, elapsed time: 00:00:02
  100. channel oem_disk_backup3: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.399.1056559787 tag=ORAOEM_LEVEL_0
  101. channel oem_disk_backup3: restored backup piece 1
  102. channel oem_disk_backup3: restore complete, elapsed time: 00:00:02
  103. channel oem_disk_backup4: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.418.1056559787 tag=ORAOEM_LEVEL_0
  104. channel oem_disk_backup4: restored backup piece 1
  105. channel oem_disk_backup4: restore complete, elapsed time: 00:00:02
  106. channel oem_disk_backup5: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.373.1056559787 tag=ORAOEM_LEVEL_0
  107. channel oem_disk_backup5: restored backup piece 1
  108. channel oem_disk_backup5: restore complete, elapsed time: 00:00:02
  109. channel oem_disk_backup1: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.392.1056559791 tag=ORAOEM_LEVEL_0
  110. channel oem_disk_backup1: restored backup piece 1
  111. channel oem_disk_backup1: restore complete, elapsed time: 00:00:01
  112. channel oem_disk_backup6: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.410.1056559787 tag=ORAOEM_LEVEL_0
  113. channel oem_disk_backup6: restored backup piece 1
  114. channel oem_disk_backup6: restore complete, elapsed time: 00:00:03
  115. channel oem_disk_backup7: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.258.1056559787 tag=ORAOEM_LEVEL_0
  116. channel oem_disk_backup7: restored backup piece 1
  117. channel oem_disk_backup7: restore complete, elapsed time: 00:00:02
  118. channel oem_disk_backup8: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.409.1056559787 tag=ORAOEM_LEVEL_0
  119. channel oem_disk_backup8: restored backup piece 1
  120. channel oem_disk_backup8: restore complete, elapsed time: 00:00:02
  121. Finished recover at 2020-11-24:20:18:55

  122. Starting backup at 2020-11-24:20:18:56
  123. channel oem_disk_backup1: starting incremental level 1 datafile backup set
  124. channel oem_disk_backup1: specifying datafile(s) in backup set
  125. input datafile file number=00005 name=+DATA/ORCL/DATAFILE/example.279.1054329825
  126. channel oem_disk_backup1: starting piece 1 at 2020-11-24:20:18:58
  127. channel oem_disk_backup2: starting incremental level 1 datafile backup set
  128. channel oem_disk_backup2: specifying datafile(s) in backup set
  129. input datafile file number=00002 name=+DATA/ORCL/DATAFILE/sysaux.282.1054329823
  130. input datafile file number=00009 name=+DATA/ORCL/DATAFILE/tbsocp05_test.284.1054152837
  131. channel oem_disk_backup2: starting piece 1 at 2020-11-24:20:18:58
  132. channel oem_disk_backup3: starting incremental level 1 datafile backup set
  133. channel oem_disk_backup3: specifying datafile(s) in backup set
  134. input datafile file number=00003 name=+DATA/ORCL/DATAFILE/undotbs1.286.1054329823
  135. input datafile file number=00016 name=+DATA/ORCL/DATAFILE/tbs_oltp.293.1054936567
  136. channel oem_disk_backup3: starting piece 1 at 2020-11-24:20:18:58
  137. channel oem_disk_backup4: starting incremental level 1 datafile backup set
  138. channel oem_disk_backup4: specifying datafile(s) in backup set
  139. input datafile file number=00001 name=+DATA/ORCL/DATAFILE/system.263.1054329825
  140. input datafile file number=00015 name=+DATA/ORCL/DATAFILE/tbs_basic.292.1054936269
  141. channel oem_disk_backup4: starting piece 1 at 2020-11-24:20:18:58
  142. channel oem_disk_backup5: starting incremental level 1 datafile backup set
  143. channel oem_disk_backup5: specifying datafile(s) in backup set
  144. input datafile file number=00004 name=+DATA/orcl/DATAFILE/users.262.1054329889
  145. input datafile file number=00014 name=+DATA/ORCL/DATAFILE/tbs_nocompression.291.1054936255
  146. channel oem_disk_backup5: starting piece 1 at 2020-11-24:20:18:59
  147. channel oem_disk_backup6: starting incremental level 1 datafile backup set
  148. channel oem_disk_backup6: specifying datafile(s) in backup set
  149. input datafile file number=00006 name=+DATA/ORCL/DATAFILE/tbs1.287.1050417229
  150. input datafile file number=00011 name=+DATA/ORCL/DATAFILE/tbsbig.280.1054764585
  151. channel oem_disk_backup6: starting piece 1 at 2020-11-24:20:18:59
  152. channel oem_disk_backup7: starting incremental level 1 datafile backup set
  153. channel oem_disk_backup7: specifying datafile(s) in backup set
  154. input datafile file number=00010 name=+DATA/ORCL/DATAFILE/tbsuniform.278.1054763341
  155. input datafile file number=00012 name=+DATA/ORCL/DATAFILE/tbsuniform.277.1054764627
  156. channel oem_disk_backup7: starting piece 1 at 2020-11-24:20:18:59
  157. channel oem_disk_backup8: starting incremental level 1 datafile backup set
  158. channel oem_disk_backup8: specifying datafile(s) in backup set
  159. input datafile file number=00008 name=+DATA/ORCL/DATAFILE/tbs3.289.1050418001
  160. input datafile file number=00007 name=+DATA/ORCL/DATAFILE/tbs2.288.1050417617
  161. channel oem_disk_backup8: starting piece 1 at 2020-11-24:20:18:59
  162. channel oem_disk_backup1: finished piece 1 at 2020-11-24:20:19:03
  163. piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.411.1057349941 tag=ORAOEM_LEVEL_0 comment=NONE
  164. channel oem_disk_backup1: backup set complete, elapsed time: 00:00:05
  165. channel oem_disk_backup1: starting incremental level 1 datafile backup set
  166. channel oem_disk_backup1: specifying datafile(s) in backup set
  167. channel oem_disk_backup2: finished piece 1 at 2020-11-24:20:19:03
  168. piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.376.1057349941 tag=ORAOEM_LEVEL_0 comment=NONE
  169. channel oem_disk_backup2: backup set complete, elapsed time: 00:00:05
  170. channel oem_disk_backup2: starting incremental level 1 datafile backup set
  171. channel oem_disk_backup2: specifying datafile(s) in backup set
  172. input datafile file number=00013 name=+DATA/ORCL/DATAFILE/tbs32k.259.1054931811
  173. channel oem_disk_backup2: starting piece 1 at 2020-11-24:20:19:03
  174. channel oem_disk_backup3: finished piece 1 at 2020-11-24:20:19:03
  175. piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.407.1057349941 tag=ORAOEM_LEVEL_0 comment=NONE
  176. channel oem_disk_backup3: backup set complete, elapsed time: 00:00:05
  177. channel oem_disk_backup3: starting incremental level 1 datafile backup set
  178. channel oem_disk_backup3: specifying datafile(s) in backup set
  179. including current SPFILE in backup set
  180. channel oem_disk_backup3: starting piece 1 at 2020-11-24:20:19:03
  181. channel oem_disk_backup4: finished piece 1 at 2020-11-24:20:19:03
  182. piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.346.1057349941 tag=ORAOEM_LEVEL_0 comment=NONE
  183. channel oem_disk_backup4: backup set complete, elapsed time: 00:00:05
  184. channel oem_disk_backup5: finished piece 1 at 2020-11-24:20:19:04
  185. piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.405.1057349943 tag=ORAOEM_LEVEL_0 comment=NONE
  186. channel oem_disk_backup5: backup set complete, elapsed time: 00:00:05
  187. channel oem_disk_backup6: finished piece 1 at 2020-11-24:20:19:04
  188. piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.406.1057349941 tag=ORAOEM_LEVEL_0 comment=NONE
  189. channel oem_disk_backup6: backup set complete, elapsed time: 00:00:05
  190. including current control file in backup set
  191. channel oem_disk_backup1: starting piece 1 at 2020-11-24:20:19:04
  192. channel oem_disk_backup7: finished piece 1 at 2020-11-24:20:19:04
  193. piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.404.1057349943 tag=ORAOEM_LEVEL_0 comment=NONE
  194. channel oem_disk_backup7: backup set complete, elapsed time: 00:00:05
  195. channel oem_disk_backup8: finished piece 1 at 2020-11-24:20:19:04
  196. piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.414.1057349943 tag=ORAOEM_LEVEL_0 comment=NONE
  197. channel oem_disk_backup8: backup set complete, elapsed time: 00:00:05
  198. channel oem_disk_backup3: finished piece 1 at 2020-11-24:20:19:04
  199. piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnsnn1_oraoem_level_0_0.419.1057349943 tag=ORAOEM_LEVEL_0 comment=NONE
  200. channel oem_disk_backup3: backup set complete, elapsed time: 00:00:01
  201. channel oem_disk_backup1: finished piece 1 at 2020-11-24:20:19:05
  202. piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/ncnnn1_oraoem_level_0_0.437.1057349945 tag=ORAOEM_LEVEL_0 comment=NONE
  203. channel oem_disk_backup1: backup set complete, elapsed time: 00:00:01
  204. channel oem_disk_backup2: finished piece 1 at 2020-11-24:20:19:05
  205. piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.371.1057349945 tag=ORAOEM_LEVEL_0 comment=NONE
  206. channel oem_disk_backup2: backup set complete, elapsed time: 00:00:02
  207. Finished backup at 2020-11-24:20:19:05

  208. released channel: oem_disk_backup1

  209. released channel: oem_disk_backup2

  210. released channel: oem_disk_backup3

  211. released channel: oem_disk_backup4

  212. released channel: oem_disk_backup5

  213. released channel: oem_disk_backup6

  214. released channel: oem_disk_backup7

  215. released channel: oem_disk_backup8

  216. allocated channel: oem_sbt_backup1
  217. channel oem_sbt_backup1: SID=372 device type=SBT_TAPE
  218. channel oem_sbt_backup1: Oracle Secure Backup

  219. allocated channel: oem_sbt_backup2
  220. channel oem_sbt_backup2: SID=20 device type=SBT_TAPE
  221. channel oem_sbt_backup2: Oracle Secure Backup

  222. Starting backup at 2020-11-24:20:19:19
  223. current log archived
  224. skipping archived logs of thread 1 from sequence 1 to 2; already backed up
  225. channel oem_sbt_backup1: starting archived log backup set
  226. channel oem_sbt_backup1: specifying archived log(s) in backup set
  227. input archived log thread=1 sequence=3 RECID=24 STAMP=1056743446
  228. input archived log thread=1 sequence=4 RECID=25 STAMP=979503940
  229. channel oem_sbt_backup1: starting piece 1 at 2020-11-24:20:19:20
  230. channel oem_sbt_backup2: starting archived log backup set
  231. channel oem_sbt_backup2: specifying archived log(s) in backup set
  232. input archived log thread=1 sequence=5 RECID=26 STAMP=1057347934
  233. input archived log thread=1 sequence=6 RECID=27 STAMP=1057349960
  234. channel oem_sbt_backup2: starting piece 1 at 2020-11-24:20:19:20
  235. channel oem_sbt_backup1: finished piece 1 at 2020-11-24:20:19:45
  236. piece handle=ORCL_2pvgboa8_1_1 tag=TAG20201124T201920 comment=API Version 2.0,MMS Version 12.1.0.2
  237. channel oem_sbt_backup1: backup set complete, elapsed time: 00:00:25
  238. channel oem_sbt_backup2: finished piece 1 at 2020-11-24:20:19:45
  239. piece handle=ORCL_2qvgboa8_1_1 tag=TAG20201124T201920 comment=API Version 2.0,MMS Version 12.1.0.2
  240. channel oem_sbt_backup2: backup set complete, elapsed time: 00:00:25
  241. Finished backup at 2020-11-24:20:19:45
  242. released channel: oem_sbt_backup1
  243. released channel: oem_sbt_backup2

  244. allocated channel: ORA_MAINT_SBT_TAPE_1
  245. channel ORA_MAINT_SBT_TAPE_1: SID=372 device type=SBT_TAPE
  246. channel ORA_MAINT_SBT_TAPE_1: Oracle Secure Backup

  247. no obsolete backups found

  248. Recovery Manager complete.
  249. [oracle@classroom ~]$
复制代码
  1. [oracle@classroom ~]$ rman target  /

  2. Recovery Manager: Release 12.1.0.2.0 - Production on 星期二 11月 24 20:21:00 2020

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

  4. connected to target database: ORCL (DBID=1574592120)

  5. RMAN> list copy;

  6. using target database control file instead of recovery catalog
  7. specification does not match any control file copy in the repository
  8. List of Datafile Copies
  9. =======================

  10. Key     File S Completion Time     Ckp SCN    Ckp Time           
  11. ------- ---- - ------------------- ---------- -------------------
  12. 73      1    A 2020-11-24:20:18:54 11940839   2020-11-15:16:49:44
  13.         Name: +FRA/ORCL/DATAFILE/system.422.1056559341
  14.         Tag: ORAOEM_LEVEL_0

  15. 69      2    A 2020-11-24:20:18:53 11940832   2020-11-15:16:49:43
  16.         Name: +FRA/ORCL/DATAFILE/sysaux.394.1056559335
  17.         Tag: ORAOEM_LEVEL_0

  18. 68      3    A 2020-11-24:20:18:53 11940835   2020-11-15:16:49:43
  19.         Name: +FRA/ORCL/DATAFILE/undotbs1.393.1056559337
  20.         Tag: ORAOEM_LEVEL_0

  21. 75      4    A 2020-11-24:20:18:54 11940842   2020-11-15:16:49:44
  22.         Name: +FRA/ORCL/DATAFILE/users.426.1056559339
  23.         Tag: ORAOEM_LEVEL_0

  24. 67      5    A 2020-11-24:20:18:53 11940829   2020-11-15:16:49:43
  25.         Name: +FRA/ORCL/DATAFILE/example.403.1056559335
  26.         Tag: ORAOEM_LEVEL_0

  27. 77      6    A 2020-11-24:20:18:54 11940845   2020-11-15:16:49:45
  28.         Name: +FRA/ORCL/DATAFILE/tbs1.387.1056559339
  29.         Tag: ORAOEM_LEVEL_0

  30. 78      7    A 2020-11-24:20:18:55 11940851   2020-11-15:16:49:45
  31.         Name: +FRA/ORCL/DATAFILE/tbs2.425.1056559359
  32.         Tag: ORAOEM_LEVEL_0

  33. 74      8    A 2020-11-24:20:18:54 11940851   2020-11-15:16:49:45
  34.         Name: +FRA/ORCL/DATAFILE/tbs3.423.1056559345
  35.         Tag: ORAOEM_LEVEL_0

  36. 66      9    A 2020-11-24:20:18:53 11940832   2020-11-15:16:49:43
  37.         Name: +FRA/ORCL/DATAFILE/tbsocp05_test.415.1056559367
  38.         Tag: ORAOEM_LEVEL_0

  39. 80      10   A 2020-11-24:20:18:55 11940848   2020-11-15:16:49:45
  40.         Name: +FRA/ORCL/DATAFILE/tbsuniform.421.1056559337
  41.         Tag: ORAOEM_LEVEL_0

  42. 72      11   A 2020-11-24:20:18:54 11940845   2020-11-15:16:49:45
  43.         Name: +FRA/ORCL/DATAFILE/tbsbig.424.1056559359
  44.         Tag: ORAOEM_LEVEL_0

  45. 76      12   A 2020-11-24:20:18:54 11940848   2020-11-15:16:49:45
  46.         Name: +FRA/ORCL/DATAFILE/tbsuniform.427.1056559361
  47.         Tag: ORAOEM_LEVEL_0

  48. 79      13   A 2020-11-24:20:18:55 11940855   2020-11-15:16:49:49
  49.         Name: +FRA/ORCL/DATAFILE/tbs32k.396.1056559367
  50.         Tag: ORAOEM_LEVEL_0

  51. 70      14   A 2020-11-24:20:18:53 11940842   2020-11-15:16:49:44
  52.         Name: +FRA/ORCL/DATAFILE/tbs_nocompression.408.1056559361
  53.         Tag: ORAOEM_LEVEL_0

  54. 71      15   A 2020-11-24:20:18:53 11940839   2020-11-15:16:49:44
  55.         Name: +FRA/ORCL/DATAFILE/tbs_basic.413.1056559365
  56.         Tag: ORAOEM_LEVEL_0

  57. 65      16   A 2020-11-24:20:18:53 11940835   2020-11-15:16:49:43
  58.         Name: +FRA/ORCL/DATAFILE/tbs_oltp.416.1056559367
  59.         Tag: ORAOEM_LEVEL_0

  60. List of Archived Log Copies for database with db_unique_name ORCL
  61. =====================================================================

  62. Key     Thrd Seq     S Low Time           
  63. ------- ---- ------- - -------------------
  64. 22      1    1       A 2020-11-15:16:29:01
  65.         Name: +FRA/ORCL/ARCHIVELOG/2020_11_15/thread_1_seq_1.412.1056559383

  66. 23      1    2       A 2020-11-15:16:43:03
  67.         Name: +FRA/ORCL/ARCHIVELOG/2020_11_15/thread_1_seq_2.401.1056559807

  68. 24      1    3       A 2020-11-15:16:50:07
  69.         Name: +FRA/ORCL/ARCHIVELOG/2020_11_17/thread_1_seq_3.402.1056743447

  70. 25      1    4       A 2020-11-17:19:50:46
  71.         Name: +FRA/ORCL/ARCHIVELOG/2018_06_22/thread_1_seq_4.397.1056551755

  72. 26      1    5       A 2018-06-22:20:25:39
  73.         Name: +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_5.428.1057347933

  74. 27      1    6       A 2020-11-24:19:45:33
  75.         Name: +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_6.420.1057349959


  76. RMAN>
复制代码
3. (待验证)最好把默认通道设为磁盘通道(原因是,待会创建chrone实例的时候,用磁盘通道创建):
  1. [oracle@classroom ~]$ rman target  /

  2. Recovery Manager: Release 12.1.0.2.0 - Production on 星期二 11月 24 20:25:03 2020

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

  4. connected to target database: ORCL (DBID=1574592120)

  5. RMAN> show all;

  6. using target database control file instead of recovery catalog
  7. RMAN configuration parameters for database with db_unique_name ORCL are:
  8. CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
  9. CONFIGURE BACKUP OPTIMIZATION OFF; # default
  10. CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
  11. CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
  12. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
  13. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
  14. CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
  15. CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO BACKUPSET;
  16. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  17. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  18. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  19. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  20. CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=classroom)';
  21. CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=classroom)';
  22. CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS  "ENV=(OB_MEDIA_FAMILY=classroom)";
  23. CONFIGURE MAXSETSIZE TO UNLIMITED; # default
  24. CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
  25. CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
  26. CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
  27. CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
  28. CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
  29. CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_2/dbs/snapcf_orcl.f'; # default

  30. RMAN> CONFIGURE DEFAULT DEVICE TYPE TO disk;

  31. old RMAN configuration parameters:
  32. CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
  33. new RMAN configuration parameters:
  34. CONFIGURE DEFAULT DEVICE TYPE TO DISK;
  35. new RMAN configuration parameters are successfully stored

  36. RMAN> show all;

  37. RMAN configuration parameters for database with db_unique_name ORCL are:
  38. CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
  39. CONFIGURE BACKUP OPTIMIZATION OFF; # default
  40. CONFIGURE DEFAULT DEVICE TYPE TO DISK;
  41. CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
  42. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
  43. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
  44. CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
  45. CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO BACKUPSET;
  46. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  47. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  48. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  49. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  50. CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=classroom)';
  51. CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=classroom)';
  52. CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS  "ENV=(OB_MEDIA_FAMILY=classroom)";
  53. CONFIGURE MAXSETSIZE TO UNLIMITED; # default
  54. CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
  55. CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
  56. CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
  57. CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
  58. CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
  59. CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_2/dbs/snapcf_orcl.f'; # default

  60. RMAN>
复制代码
4. 把时间换算成SCN:
  1. select  timestamp_to_scn(to_date('2020-11-24:20:33:39','YYYY-MM-DD:HH24:MI:SS'))  from dual;
复制代码

5. 特点:
  1. [oracle@classroom trace]$ . oraenv
  2. ORACLE_SID = [orcl2] ? orcl
  3. The Oracle base remains unchanged with value /u01/app/oracle
  4. [oracle@classroom trace]$ sqlplus /nolog

  5. SQL*Plus: Release 12.1.0.2.0 Production on 星期二 11月 24 20:45:51 2020

  6. Copyright (c) 1982, 2014, Oracle.  All rights reserved.

  7. SQL> conn / as sysdba
  8. Connected.
  9. SQL> select open_mode from v$database;

  10. OPEN_MODE
  11. --------------------
  12. READ WRITE

  13. SQL>

复制代码
6. 抓取到的内存实例:
  1. [root@classroom ~]# ps aux | grep ymms
  2. oracle   31190  0.0  0.3 2484960 53240 ?       Ss   20:55   0:00 ora_pmon_ymms
  3. oracle   31192  0.1  0.3 2484960 51680 ?       Ss   20:55   0:00 ora_psp0_ymms
  4. oracle   31195  0.6  0.3 2484960 51976 ?       Ss   20:55   0:00 ora_vktm_ymms
  5. oracle   31199  0.0  0.3 2484960 51844 ?       Ss   20:55   0:00 ora_gen0_ymms
  6. oracle   31201  1.1  0.7 2484960 110900 ?      Ss   20:55   0:00 ora_mman_ymms
  7. oracle   31205  0.0  0.3 2484960 49460 ?       Ss   20:55   0:00 ora_diag_ymms
  8. oracle   31207  0.0  0.3 2484960 51844 ?       Ss   20:55   0:00 ora_dbrm_ymms
  9. oracle   31209  0.0  0.3 2484960 49456 ?       Ss   20:55   0:00 ora_vkrm_ymms
  10. oracle   31211  0.0  0.3 2486496 55148 ?       Ss   20:55   0:00 ora_dia0_ymms
  11. oracle   31213  0.0  0.3 2491608 58440 ?       Ss   20:55   0:00 ora_dbw0_ymms
  12. oracle   31215  0.0  0.3 2484960 51268 ?       Ss   20:55   0:00 ora_lgwr_ymms
  13. oracle   31217  0.0  0.3 2484960 54664 ?       Ss   20:55   0:00 ora_ckpt_ymms
  14. oracle   31221  0.0  0.3 2484956 50952 ?       Ss   20:55   0:00 ora_lg00_ymms
  15. oracle   31223  0.0  0.3 2484960 49384 ?       Ss   20:55   0:00 ora_smon_ymms
  16. oracle   31225  0.0  0.3 2484956 50828 ?       Ss   20:55   0:00 ora_lg01_ymms
  17. oracle   31227  0.0  0.3 2484960 49412 ?       Ss   20:55   0:00 ora_reco_ymms
  18. oracle   31229  0.1  0.3 2490740 52564 ?       Ss   20:55   0:00 ora_lreg_ymms
  19. oracle   31233  0.0  0.3 2484960 51592 ?       Ss   20:55   0:00 ora_pxmn_ymms
  20. oracle   31236  0.0  0.3 2484960 53592 ?       Ss   20:55   0:00 ora_mmon_ymms
  21. oracle   31238  0.0  0.3 2484960 53128 ?       Ss   20:55   0:00 ora_mmnl_ymms
  22. oracle   31251  1.8  0.5 2495304 89956 ?       Ss   20:55   0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  23. oracle   31262  0.5  0.4 2495240 71924 ?       Rs   20:55   0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  24. oracle   31303  0.3  0.4 2496788 74972 ?       Ss   20:55   0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  25. oracle   31320  0.2  0.4 2496480 67988 ?       Ss   20:55   0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  26. oracle   31348  0.3  0.4 2493872 66120 ?       Ss   20:55   0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  27. oracle   31354  0.6  0.4 2493868 65952 ?       Ss   20:55   0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  28. oracle   31363  2.0  0.4 2493872 65608 ?       Ss   20:55   0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  29. root     31369  0.0  0.0 224856  1068 pts/4    S+   20:55   0:00 grep --color=auto ymms
  30. [root@classroom ~]#
复制代码

下面是执行过程:

  1. oracle@classroom trace]$ rman target  /

  2. Recovery Manager: Release 12.1.0.2.0 - Production on 星期二 11月 24 20:52:34 2020

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

  4. connected to target database: ORCL (DBID=1574592120)

  5. RMAN> recover tablespace users until scn 12273726
  6. 2> auxiliary destination '/u01/app/oracle/oradata';

  7. Starting recover at 2020-11-24:20:54:36
  8. using target database control file instead of recovery catalog
  9. current log archived
  10. allocated channel: ORA_SBT_TAPE_1
  11. channel ORA_SBT_TAPE_1: SID=141 device type=SBT_TAPE
  12. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  13. allocated channel: ORA_SBT_TAPE_2
  14. channel ORA_SBT_TAPE_2: SID=375 device type=SBT_TAPE
  15. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  16. allocated channel: ORA_DISK_1
  17. channel ORA_DISK_1: SID=139 device type=DISK
  18. allocated channel: ORA_DISK_2
  19. channel ORA_DISK_2: SID=258 device type=DISK
  20. allocated channel: ORA_DISK_3
  21. channel ORA_DISK_3: SID=377 device type=DISK
  22. allocated channel: ORA_DISK_4
  23. channel ORA_DISK_4: SID=22 device type=DISK
  24. allocated channel: ORA_DISK_5
  25. channel ORA_DISK_5: SID=124 device type=DISK
  26. allocated channel: ORA_DISK_6
  27. channel ORA_DISK_6: SID=256 device type=DISK
  28. allocated channel: ORA_DISK_7
  29. channel ORA_DISK_7: SID=357 device type=DISK
  30. allocated channel: ORA_DISK_8
  31. channel ORA_DISK_8: SID=20 device type=DISK
  32. RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time

  33. List of tablespaces expected to have UNDO segments
  34. Tablespace SYSTEM
  35. Tablespace UNDOTBS1

  36. Creating automatic instance, with SID='ymms'

  37. initialization parameters used for automatic instance:
  38. db_name=ORCL
  39. db_unique_name=ymms_pitr_ORCL
  40. compatible=12.1.0.2.0
  41. db_block_size=8192
  42. db_files=200
  43. diagnostic_dest=/u01/app/oracle
  44. _system_trig_enabled=FALSE
  45. sga_target=2048M
  46. processes=200
  47. db_32k_cache_size=16M
  48. db_create_file_dest=/u01/app/oracle/oradata
  49. log_archive_dest_1='location=/u01/app/oracle/oradata'
  50. #No auxiliary parameter file used


  51. starting up automatic instance ORCL

  52. Oracle instance started

  53. Total System Global Area    2147483648 bytes

  54. Fixed Size                     2926472 bytes
  55. Variable Size                503318648 bytes
  56. Database Buffers            1627389952 bytes
  57. Redo Buffers                  13848576 bytes
  58. Automatic instance created


  59. List of tablespaces that have been dropped from the target database:
  60. Tablespace USERS

  61. contents of Memory Script:
  62. {
  63. # set requested point in time
  64. set until  scn 12273726;
  65. # restore the controlfile
  66. restore clone controlfile;

  67. # mount the controlfile
  68. sql clone 'alter database mount clone database';

  69. # archive current online log
  70. sql 'alter system archive log current';
  71. # avoid unnecessary autobackups for structural changes during TSPITR
  72. sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
  73. }
  74. executing Memory Script

  75. executing command: SET until clause

  76. Starting restore at 2020-11-24:20:55:44
  77. allocated channel: ORA_AUX_SBT_TAPE_1
  78. channel ORA_AUX_SBT_TAPE_1: SID=6 device type=SBT_TAPE
  79. channel ORA_AUX_SBT_TAPE_1: Oracle Secure Backup
  80. allocated channel: ORA_AUX_SBT_TAPE_2
  81. channel ORA_AUX_SBT_TAPE_2: SID=89 device type=SBT_TAPE
  82. channel ORA_AUX_SBT_TAPE_2: Oracle Secure Backup
  83. allocated channel: ORA_AUX_DISK_1
  84. channel ORA_AUX_DISK_1: SID=169 device type=DISK
  85. allocated channel: ORA_AUX_DISK_2
  86. channel ORA_AUX_DISK_2: SID=246 device type=DISK
  87. allocated channel: ORA_AUX_DISK_3
  88. channel ORA_AUX_DISK_3: SID=7 device type=DISK
  89. allocated channel: ORA_AUX_DISK_4
  90. channel ORA_AUX_DISK_4: SID=90 device type=DISK
  91. allocated channel: ORA_AUX_DISK_5
  92. channel ORA_AUX_DISK_5: SID=170 device type=DISK
  93. allocated channel: ORA_AUX_DISK_6
  94. channel ORA_AUX_DISK_6: SID=251 device type=DISK
  95. allocated channel: ORA_AUX_DISK_7
  96. channel ORA_AUX_DISK_7: SID=8 device type=DISK
  97. allocated channel: ORA_AUX_DISK_8
  98. channel ORA_AUX_DISK_8: SID=91 device type=DISK

  99. channel ORA_AUX_DISK_1: starting datafile backup set restore
  100. channel ORA_AUX_DISK_1: restoring control file
  101. channel ORA_AUX_DISK_1: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_24/ncnnf0_labs-14-contr-before-drop_0.431.1057350805
  102. channel ORA_AUX_DISK_1: piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/ncnnf0_labs-14-contr-before-drop_0.431.1057350805 tag=LABS-14-CONTR-BEFORE-DROP
  103. channel ORA_AUX_DISK_1: restored backup piece 1
  104. channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:00
  105. output file name=/u01/app/oracle/oradata/ORCL/controlfile/o1_mf_hvt0qopt_.ctl
  106. Finished restore at 2020-11-24:20:56:22

  107. sql statement: alter database mount clone database

  108. sql statement: alter system archive log current

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

  110. contents of Memory Script:
  111. {
  112. # set requested point in time
  113. set until  scn 12273726;
  114. # set destinations for recovery set and auxiliary set datafiles
  115. set newname for clone datafile  1 to new;
  116. set newname for clone datafile  3 to new;
  117. set newname for clone datafile  2 to new;
  118. set newname for clone tempfile  1 to new;
  119. set newname for datafile  4 to new;
  120. # switch all tempfiles
  121. switch clone tempfile all;
  122. # restore the tablespaces in the recovery set and the auxiliary set
  123. restore clone datafile  1, 3, 2, 4;

  124. switch clone datafile all;
  125. }
  126. executing Memory Script

  127. executing command: SET until clause

  128. executing command: SET NEWNAME

  129. executing command: SET NEWNAME

  130. executing command: SET NEWNAME

  131. executing command: SET NEWNAME

  132. executing command: SET NEWNAME

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

  134. Starting restore at 2020-11-24:20:56:30
  135. using channel ORA_AUX_SBT_TAPE_1
  136. using channel ORA_AUX_SBT_TAPE_2
  137. using channel ORA_AUX_DISK_1
  138. using channel ORA_AUX_DISK_2
  139. using channel ORA_AUX_DISK_3
  140. using channel ORA_AUX_DISK_4
  141. using channel ORA_AUX_DISK_5
  142. using channel ORA_AUX_DISK_6
  143. using channel ORA_AUX_DISK_7
  144. using channel ORA_AUX_DISK_8

  145. channel ORA_AUX_DISK_1: restoring datafile 00001
  146. input datafile copy RECID=73 STAMP=1057349934 file name=+FRA/ORCL/DATAFILE/system.422.1056559341
  147. destination for restore of datafile 00001: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_%u_.dbf
  148. channel ORA_AUX_DISK_2: restoring datafile 00003
  149. input datafile copy RECID=68 STAMP=1057349933 file name=+FRA/ORCL/DATAFILE/undotbs1.393.1056559337
  150. destination for restore of datafile 00003: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_%u_.dbf
  151. channel ORA_AUX_DISK_3: restoring datafile 00002
  152. input datafile copy RECID=69 STAMP=1057349933 file name=+FRA/ORCL/DATAFILE/sysaux.394.1056559335
  153. destination for restore of datafile 00002: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_%u_.dbf
  154. channel ORA_AUX_DISK_4: restoring datafile 00004
  155. input datafile copy RECID=75 STAMP=1057349934 file name=+FRA/ORCL/DATAFILE/users.426.1056559339
  156. destination for restore of datafile 00004: +data
  157. channel ORA_AUX_DISK_4: copied datafile copy of datafile 00004
  158. output file name=+DATA/ORCL/DATAFILE/users.262.1057352191 RECID=81 STAMP=1057352194
  159. channel ORA_AUX_DISK_1: copied datafile copy of datafile 00001
  160. output file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_hvt0qz17_.dbf RECID=82 STAMP=1057352215
  161. channel ORA_AUX_DISK_2: copied datafile copy of datafile 00003
  162. output file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_hvt0qz19_.dbf RECID=83 STAMP=1057352215
  163. channel ORA_AUX_DISK_3: copied datafile copy of datafile 00002
  164. output file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_hvt0qz19_.dbf RECID=84 STAMP=1057352215
  165. Finished restore at 2020-11-24:20:56:57

  166. datafile 4 switched to datafile copy
  167. input datafile copy RECID=85 STAMP=1057352217 file name=+DATA/ORCL/DATAFILE/users.262.1057352191
  168. datafile 1 switched to datafile copy
  169. input datafile copy RECID=86 STAMP=1057352217 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_hvt0qz17_.dbf
  170. datafile 3 switched to datafile copy
  171. input datafile copy RECID=87 STAMP=1057352218 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_hvt0qz19_.dbf
  172. datafile 2 switched to datafile copy
  173. input datafile copy RECID=88 STAMP=1057352218 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_hvt0qz19_.dbf

  174. contents of Memory Script:
  175. {
  176. # set requested point in time
  177. set until  scn 12273726;
  178. # online the datafiles restored or switched
  179. sql clone "alter database datafile  1 online";
  180. sql clone "alter database datafile  3 online";
  181. sql clone "alter database datafile  2 online";
  182. sql clone "alter database datafile  4 online";
  183. # recover and open resetlogs
  184. recover clone database tablespace  "USERS", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
  185. alter clone database open resetlogs;
  186. }
  187. executing Memory Script

  188. executing command: SET until clause

  189. sql statement: alter database datafile  1 online

  190. sql statement: alter database datafile  3 online

  191. sql statement: alter database datafile  2 online

  192. sql statement: alter database datafile  4 online

  193. Starting recover at 2020-11-24:20:56:58
  194. using channel ORA_AUX_SBT_TAPE_1
  195. using channel ORA_AUX_SBT_TAPE_2
  196. using channel ORA_AUX_DISK_1
  197. using channel ORA_AUX_DISK_2
  198. using channel ORA_AUX_DISK_3
  199. using channel ORA_AUX_DISK_4
  200. using channel ORA_AUX_DISK_5
  201. using channel ORA_AUX_DISK_6
  202. using channel ORA_AUX_DISK_7
  203. using channel ORA_AUX_DISK_8
  204. channel ORA_AUX_DISK_1: starting incremental datafile backup set restore
  205. channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
  206. destination for restore of datafile 00001: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_hvt0qz17_.dbf
  207. channel ORA_AUX_DISK_1: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.346.1057349941
  208. channel ORA_AUX_DISK_2: starting incremental datafile backup set restore
  209. channel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup set
  210. destination for restore of datafile 00002: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_hvt0qz19_.dbf
  211. channel ORA_AUX_DISK_2: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.376.1057349941
  212. channel ORA_AUX_DISK_3: starting incremental datafile backup set restore
  213. channel ORA_AUX_DISK_3: specifying datafile(s) to restore from backup set
  214. destination for restore of datafile 00004: +DATA/ORCL/DATAFILE/users.262.1057352191
  215. channel ORA_AUX_DISK_3: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.405.1057349943
  216. channel ORA_AUX_DISK_4: starting incremental datafile backup set restore
  217. channel ORA_AUX_DISK_4: specifying datafile(s) to restore from backup set
  218. destination for restore of datafile 00003: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_hvt0qz19_.dbf
  219. channel ORA_AUX_DISK_4: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.407.1057349941
  220. channel ORA_AUX_DISK_3: piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.405.1057349943 tag=ORAOEM_LEVEL_0
  221. channel ORA_AUX_DISK_3: restored backup piece 1
  222. channel ORA_AUX_DISK_3: restore complete, elapsed time: 00:00:01
  223. channel ORA_AUX_DISK_4: piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.407.1057349941 tag=ORAOEM_LEVEL_0
  224. channel ORA_AUX_DISK_4: restored backup piece 1
  225. channel ORA_AUX_DISK_4: restore complete, elapsed time: 00:00:03
  226. channel ORA_AUX_DISK_1: piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.346.1057349941 tag=ORAOEM_LEVEL_0
  227. channel ORA_AUX_DISK_1: restored backup piece 1
  228. channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
  229. channel ORA_AUX_DISK_2: piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.376.1057349941 tag=ORAOEM_LEVEL_0
  230. channel ORA_AUX_DISK_2: restored backup piece 1
  231. channel ORA_AUX_DISK_2: restore complete, elapsed time: 00:00:25

  232. starting media recovery

  233. archived log for thread 1 with sequence 6 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_6.420.1057349959
  234. archived log for thread 1 with sequence 7 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_7.390.1057350807
  235. archived log for thread 1 with sequence 8 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_8.372.1057350807
  236. archived log for thread 1 with sequence 9 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_9.433.1057350809
  237. archived log for thread 1 with sequence 10 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_10.432.1057350809
  238. archived log for thread 1 with sequence 11 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_11.434.1057350813
  239. archived log for thread 1 with sequence 12 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_12.395.1057350813
  240. archived log for thread 1 with sequence 13 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_13.257.1057352077
  241. archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_6.420.1057349959 thread=1 sequence=6
  242. archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_7.390.1057350807 thread=1 sequence=7
  243. archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_8.372.1057350807 thread=1 sequence=8
  244. archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_9.433.1057350809 thread=1 sequence=9
  245. archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_10.432.1057350809 thread=1 sequence=10
  246. archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_11.434.1057350813 thread=1 sequence=11
  247. archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_12.395.1057350813 thread=1 sequence=12
  248. archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_13.257.1057352077 thread=1 sequence=13
  249. media recovery complete, elapsed time: 00:00:13
  250. Finished recover at 2020-11-24:20:57:40

  251. database opened

  252. contents of Memory Script:
  253. {
  254. # make read only the tablespace that will be exported
  255. sql clone 'alter tablespace  USERS read only';
  256. # create directory for datapump import
  257. sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
  258. /u01/app/oracle/oradata''";
  259. # create directory for datapump export
  260. sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
  261. /u01/app/oracle/oradata''";
  262. }
  263. executing Memory Script

  264. sql statement: alter tablespace  USERS read only

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

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

  267. Performing export of metadata...
  268.    EXPDP> 启动 "SYS"."TSPITR_EXP_ymms_lzec":  
  269.    EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
  270.    EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE
  271.    EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/GRANT/OWNER_GRANT/OBJECT_GRANT
  272.    EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/INDEX/INDEX
  273.    EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/INDEX_STATISTICS
  274.    EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TRIGGER
  275.    EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE_STATISTICS
  276.    EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/STATISTICS/MARKER
  277.    EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/FGA_POLICY
  278.    EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  279.    EXPDP> 已成功加载/卸载了主表 "SYS"."TSPITR_EXP_ymms_lzec"
  280.    EXPDP> ******************************************************************************
  281.    EXPDP> SYS.TSPITR_EXP_ymms_lzec 的转储文件集为:
  282.    EXPDP>   /u01/app/oracle/oradata/tspitr_ymms_69605.dmp
  283.    EXPDP> ******************************************************************************
  284.    EXPDP> 可传输表空间 USERS 所需的数据文件:
  285.    EXPDP>   +DATA/ORCL/DATAFILE/users.262.1057352191
  286.    EXPDP> 作业 "SYS"."TSPITR_EXP_ymms_lzec" 已于 星期二 11月 24 20:59:29 2020 elapsed 0 00:01:26 成功完成
  287. Export completed


  288. contents of Memory Script:
  289. {
  290. # shutdown clone before import
  291. shutdown clone abort
  292. }
  293. executing Memory Script

  294. Oracle instance shut down

  295. Performing import of metadata...
  296.    IMPDP> 已成功加载/卸载了主表 "SYS"."TSPITR_IMP_ymms_hfyz"
  297.    IMPDP> 启动 "SYS"."TSPITR_IMP_ymms_hfyz":  
  298.    IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
  299.    IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE
  300.    IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/GRANT/OWNER_GRANT/OBJECT_GRANT
  301.    IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/INDEX/INDEX
  302.    IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/INDEX_STATISTICS
  303.    IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TRIGGER
  304.    IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE_STATISTICS
  305.    IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/STATISTICS/MARKER
  306.    IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/FGA_POLICY
  307.    IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  308.    IMPDP> 作业 "SYS"."TSPITR_IMP_ymms_hfyz" 已于 星期二 11月 24 21:00:15 2020 elapsed 0 00:00:36 成功完成
  309. Import completed


  310. contents of Memory Script:
  311. {
  312. # make read write and offline the imported tablespaces
  313. sql 'alter tablespace  USERS read write';
  314. sql 'alter tablespace  USERS offline';
  315. # enable autobackups after TSPITR is finished
  316. sql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;';
  317. }
  318. executing Memory Script

  319. sql statement: alter tablespace  USERS read write

  320. sql statement: alter tablespace  USERS offline

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

  322. Removing automatic instance
  323. Automatic instance removed
  324. auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_hvt0t9sc_.tmp deleted
  325. auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_3_hvt0t5y2_.log deleted
  326. auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_2_hvt0t592_.log deleted
  327. auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_1_hvt0t4lb_.log deleted
  328. auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_hvt0qz19_.dbf deleted
  329. auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_hvt0qz19_.dbf deleted
  330. auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_hvt0qz17_.dbf deleted
  331. auxiliary instance file /u01/app/oracle/oradata/ORCL/controlfile/o1_mf_hvt0qopt_.ctl deleted
  332. auxiliary instance file tspitr_ymms_69605.dmp deleted
  333. Finished recover at 2020-11-24:21:00:18

  334. RMAN>
复制代码






回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-21 21:48 , Processed in 0.052095 second(s), 24 queries .

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