Bo's Oracle Station

查看: 2071|回复: 0

第9次活动:2017-08-20(星期日晚上7:00-10:00)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-8-20 19:44:57 | 显示全部楼层 |阅读模式
  1. RMAN>  run {
  2. 2> allocate channel c2 device type disk format '/home/oracle/dir1/%U','/home/oracle/dir2/%U';
  3. 3> backup tag 'COPIES6' copies 2     tablespace users;
  4. 4> }

  5. allocated channel: c2
  6. channel c2: SID=76 device type=DISK

  7. Starting backup at 2017-08-20:19:44:01
  8. channel c2: starting full datafile backup set
  9. channel c2: specifying datafile(s) in backup set
  10. input datafile file number=00004 name=+DATA/orcl/datafile/users.259.816169553
  11. channel c2: starting piece 1 at 2017-08-20:19:44:01
  12. channel c2: finished piece 1 at 2017-08-20:19:44:02 with 2 copies and tag COPIES6
  13. piece handle=/home/oracle/dir1/1iscdbc1_1_1 comment=NONE
  14. piece handle=/home/oracle/dir2/1iscdbc1_1_2 comment=NONE
  15. channel c2: backup set complete, elapsed time: 00:00:01
  16. Finished backup at 2017-08-20:19:44:02

  17. Starting Control File and SPFILE Autobackup at 2017-08-20:19:44:03
  18. piece handle=+FRA/orcl/autobackup/2017_08_20/s_952544643.279.952544643 comment=NONE
  19. Finished Control File and SPFILE Autobackup at 2017-08-20:19:44:04
  20. released channel: c2
复制代码
  1. RMAN> run {
  2. 2> allocate channel c1 device type sbt maxpiecesize 50M ;
  3. 3> backup tag 'MUTI1' tablespace sysaux;
  4. 4> }

  5. allocated channel: c1
  6. channel c1: SID=76 device type=SBT_TAPE
  7. channel c1: Oracle Secure Backup

  8. Starting backup at 2017-08-20:19:52:15
  9. channel c1: starting full datafile backup set
  10. channel c1: specifying datafile(s) in backup set
  11. input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.816169553
  12. channel c1: starting piece 1 at 2017-08-20:19:52:15
  13. channel c1: finished piece 1 at 2017-08-20:19:52:40
  14. piece handle=1kscdbrf_1_1 tag=MUTI1 comment=API Version 2.0,MMS Version 10.4.0.4
  15. channel c1: starting piece 2 at 2017-08-20:19:52:40
  16. channel c1: finished piece 2 at 2017-08-20:19:52:55
  17. piece handle=1kscdbrf_2_1 tag=MUTI1 comment=API Version 2.0,MMS Version 10.4.0.4
  18. channel c1: starting piece 3 at 2017-08-20:19:52:55
  19. channel c1: finished piece 3 at 2017-08-20:19:53:10
  20. piece handle=1kscdbrf_3_1 tag=MUTI1 comment=API Version 2.0,MMS Version 10.4.0.4
  21. channel c1: starting piece 4 at 2017-08-20:19:53:10
  22. channel c1: finished piece 4 at 2017-08-20:19:53:35
  23. piece handle=1kscdbrf_4_1 tag=MUTI1 comment=API Version 2.0,MMS Version 10.4.0.4
  24. channel c1: starting piece 5 at 2017-08-20:19:53:35
  25. channel c1: finished piece 5 at 2017-08-20:19:53:50
  26. piece handle=1kscdbrf_5_1 tag=MUTI1 comment=API Version 2.0,MMS Version 10.4.0.4
  27. channel c1: starting piece 6 at 2017-08-20:19:53:50
  28. channel c1: finished piece 6 at 2017-08-20:19:54:05
  29. piece handle=1kscdbrf_6_1 tag=MUTI1 comment=API Version 2.0,MMS Version 10.4.0.4
  30. channel c1: starting piece 7 at 2017-08-20:19:54:05
  31. channel c1: finished piece 7 at 2017-08-20:19:54:30
  32. piece handle=1kscdbrf_7_1 tag=MUTI1 comment=API Version 2.0,MMS Version 10.4.0.4
  33. channel c1: starting piece 8 at 2017-08-20:19:54:30
  34. channel c1: finished piece 8 at 2017-08-20:19:54:55
  35. piece handle=1kscdbrf_8_1 tag=MUTI1 comment=API Version 2.0,MMS Version 10.4.0.4
  36. channel c1: starting piece 9 at 2017-08-20:19:54:55
  37. channel c1: finished piece 9 at 2017-08-20:19:55:10
  38. piece handle=1kscdbrf_9_1 tag=MUTI1 comment=API Version 2.0,MMS Version 10.4.0.4
  39. channel c1: backup set complete, elapsed time: 00:02:55
  40. Finished backup at 2017-08-20:19:55:10

  41. Starting Control File and SPFILE Autobackup at 2017-08-20:19:55:10
  42. piece handle=c-1343950367-20170820-06 comment=API Version 2.0,MMS Version 10.4.0.4
  43. Finished Control File and SPFILE Autobackup at 2017-08-20:19:55:35
  44. released channel: c1
复制代码
Screenshot.png


  1. RMAN> set encryption on identified by "microsoft123" only;

  2. executing command: SET encryption

  3. RMAN> backup tag 'PASSWD' tablespace example;

  4. Starting backup at 2017-08-20:21:47:28
  5. using channel ORA_SBT_TAPE_1
  6. using channel ORA_SBT_TAPE_2
  7. channel ORA_SBT_TAPE_1: starting full datafile backup set
  8. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  9. input datafile file number=00005 name=+DATA/orcl/datafile/example.265.816169651
  10. channel ORA_SBT_TAPE_1: starting piece 1 at 2017-08-20:21:47:28
  11. channel ORA_SBT_TAPE_1: finished piece 1 at 2017-08-20:21:47:53
  12. piece handle=24scdijg_1_1 tag=PASSWD comment=API Version 2.0,MMS Version 10.4.0.4
  13. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  14. Finished backup at 2017-08-20:21:47:53

  15. Starting Control File and SPFILE Autobackup at 2017-08-20:21:47:53
  16. piece handle=c-1343950367-20170820-0c comment=API Version 2.0,MMS Version 10.4.0.4
  17. Finished Control File and SPFILE Autobackup at 2017-08-20:21:48:18

  18. RMAN> list backup of tablespace example;


  19. List of Backup Sets
  20. ===================


  21. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  22. ------- ---- -- ---------- ----------- ------------ -------------------
  23. 35      Incr 0  657.75M    SBT_TAPE    00:00:27     2017-05-18:16:43:26
  24.         BP Key: 35   Status: AVAILABLE  Compressed: NO  Tag: 0T_INCR0_WHOLE
  25.         Handle: 12s4ih4j_1_1   Media: station90-000001
  26.   List of Datafiles in backup set 35
  27.   File LV Type Ckp SCN    Ckp Time            Name
  28.   ---- -- ---- ---------- ------------------- ----
  29.   5    0  Incr 1057421    2017-05-18:16:42:59 +DATA/orcl/datafile/example.265.816169651

  30. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  31. ------- ---- -- ---------- ----------- ------------ -------------------
  32. 55      Full    87.75M     SBT_TAPE    00:00:17     2017-08-20:20:00:28
  33.         BP Key: 69   Status: AVAILABLE  Compressed: NO  Tag: EXCLUDE1
  34.         Handle: 1pscdcab_1_1   Media: station90-000001
  35.   List of Datafiles in backup set 55
  36.   File LV Type Ckp SCN    Ckp Time            Name
  37.   ---- -- ---- ---------- ------------------- ----
  38.   5       Full 1132719    2017-08-20:20:00:12 +DATA/orcl/datafile/example.265.816169651

  39. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  40. ------- ---- -- ---------- ----------- ------------ -------------------
  41. 66      Full    69.63M     SBT_TAPE    00:00:16     2017-08-20:21:47:44
  42.         BP Key: 80   Status: AVAILABLE  Compressed: NO  Tag: PASSWD
  43.         Handle: 24scdijg_1_1   Media: station90-000001
  44.   List of Datafiles in backup set 66
  45.   File LV Type Ckp SCN    Ckp Time            Name
  46.   ---- -- ---- ---------- ------------------- ----
  47.   5       Full 1140564    2017-08-20:21:47:28 +DATA/orcl/datafile/example.265.816169651

  48. RMAN> restore tablespace example from tag 'PASSWD';

  49. Starting restore at 2017-08-20:21:49:10
  50. allocated channel: ORA_DISK_1
  51. channel ORA_DISK_1: SID=203 device type=DISK
  52. allocated channel: ORA_DISK_2
  53. channel ORA_DISK_2: SID=79 device type=DISK
  54. allocated channel: ORA_DISK_3
  55. channel ORA_DISK_3: SID=143 device type=DISK
  56. allocated channel: ORA_DISK_4
  57. channel ORA_DISK_4: SID=204 device type=DISK
  58. allocated channel: ORA_DISK_5
  59. channel ORA_DISK_5: SID=18 device type=DISK
  60. allocated channel: ORA_DISK_6
  61. channel ORA_DISK_6: SID=80 device type=DISK
  62. allocated channel: ORA_DISK_7
  63. channel ORA_DISK_7: SID=144 device type=DISK
  64. allocated channel: ORA_DISK_8
  65. channel ORA_DISK_8: SID=205 device type=DISK
  66. using channel ORA_SBT_TAPE_1
  67. using channel ORA_SBT_TAPE_2

  68. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  69. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  70. channel ORA_SBT_TAPE_1: restoring datafile 00005 to +DATA/orcl/datafile/example.265.816169651
  71. channel ORA_SBT_TAPE_1: reading from backup piece 24scdijg_1_1
  72. RMAN-00571: ===========================================================
  73. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  74. RMAN-00571: ===========================================================
  75. RMAN-03002: failure of restore command at 08/20/2017 21:49:36
  76. ORA-19870: error while restoring backup piece 24scdijg_1_1
  77. ORA-19913: unable to decrypt backup
  78. ORA-28365: wallet is not open

  79. RMAN> set decrypt identified by "java123456","a123456","bwqhqwkeq";

  80. RMAN-00571: ===========================================================
  81. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  82. RMAN-00571: ===========================================================
  83. RMAN-00558: error encountered while parsing input commands
  84. RMAN-01009: syntax error: found "identifier": expecting one of: "archivelog, autobackup, auxiliary, auxname, backup, command, compression, controlfile, database, dbid, decryption, echo, encryption, high, incarnation, maxcorrupt, maxseq, newname, nocfau, restore, snapshot, to restore point, until restore point, until"
  85. RMAN-01008: the bad identifier was: decrypt
  86. RMAN-01007: at line 1 column 5 file: standard input

  87. RMAN> set decryption identified by "java123456","a123456","bwqhqwkeq";

  88. executing command: SET decryption

  89. RMAN> restore tablespace example from tag 'PASSWD';

  90. Starting restore at 2017-08-20:21:50:46
  91. using channel ORA_DISK_1
  92. using channel ORA_DISK_2
  93. using channel ORA_DISK_3
  94. using channel ORA_DISK_4
  95. using channel ORA_DISK_5
  96. using channel ORA_DISK_6
  97. using channel ORA_DISK_7
  98. using channel ORA_DISK_8
  99. using channel ORA_SBT_TAPE_1
  100. using channel ORA_SBT_TAPE_2

  101. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  102. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  103. channel ORA_SBT_TAPE_1: restoring datafile 00005 to +DATA/orcl/datafile/example.265.816169651
  104. channel ORA_SBT_TAPE_1: reading from backup piece 24scdijg_1_1
  105. RMAN-00571: ===========================================================
  106. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  107. RMAN-00571: ===========================================================
  108. RMAN-03002: failure of restore command at 08/20/2017 21:51:12
  109. ORA-19870: error while restoring backup piece 24scdijg_1_1
  110. ORA-19913: unable to decrypt backup
  111. ORA-28365: wallet is not open

  112. RMAN> set decryption identified by "java123456","a123456","bwqhqwkeq","microsoft123";

  113. executing command: SET decryption

  114. RMAN> restore tablespace example from tag 'PASSWD';

  115. Starting restore at 2017-08-20:21:51:49
  116. using channel ORA_DISK_1
  117. using channel ORA_DISK_2
  118. using channel ORA_DISK_3
  119. using channel ORA_DISK_4
  120. using channel ORA_DISK_5
  121. using channel ORA_DISK_6
  122. using channel ORA_DISK_7
  123. using channel ORA_DISK_8
  124. using channel ORA_SBT_TAPE_1
  125. using channel ORA_SBT_TAPE_2

  126. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  127. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  128. channel ORA_SBT_TAPE_1: restoring datafile 00005 to +DATA/orcl/datafile/example.265.816169651
  129. channel ORA_SBT_TAPE_1: reading from backup piece 24scdijg_1_1
  130. channel ORA_SBT_TAPE_1: piece handle=24scdijg_1_1 tag=PASSWD
  131. channel ORA_SBT_TAPE_1: restored backup piece 1
  132. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:25
  133. Finished restore at 2017-08-20:21:52:15
复制代码


回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-29 14:24 , Processed in 0.039202 second(s), 27 queries .

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