设为首页收藏本站

Botang唐波's Oracle Station

查看: 702|回复: 0

课程第35次:2016-06-15星期三

[复制链接]

744

主题

1117

帖子

8081

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
8081
发表于 2016-6-16 09:45:18 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2016-6-16 09:46 编辑

【上完1Z0-053的第4章】:配置rman、TDE和rman三种加密方式
【1Z0-051】:共10章(0 1 2 3 4 5 6 7 8 9)
【1Z0-052】:共12章(0 1 2 3 4 5 6 9 10 14 15 16)
【1Z0-053】:共8章(0 1 2 3 4 10 11 12)
sqlnet.ora:
  1. ENCRYPTION_WALLET_LOCATION=
  2. (
  3.   SOURCE=(METHOD=FILE)
  4.           (METHOD_DATA=
  5.            (DIRECTORY=/u01/app/oracle/product/11.2.0/dbhome_1/mywallet/)
  6.           )
  7.   )
复制代码
rman随堂:

  1. [root@station90 桌面]# cd /tmp/
  2. [root@station90 tmp]# ls
  3. 9ufUH75P.zip.part                     keyring-JVmQ8t       OSB-SBT-PROXY-23952                    virtd4z96p7
  4. A+1AKQzH.pdf.part                     keyring-lrCZw0       OSB-SBT-PROXY-23966                    virtdaiCZ59
  5. acroread_0_0                          keyring-NVnfWr       OSB-SBT-PROXY-24053                    virtddBcF3K
  6. botang-config-server1                 keyring-QJZo3j       OSB-SBT-PROXY-24082                    virtdkhff5E
  7. botang-config-xshare                  keyring-SATyne       OSB-SBT-PROXY-24195                    virtdlvKiHx
  8. gnome-system-monitor.root.2623832447  keyring-tdXx54       OSB-SBT-PROXY-24204                    virtdU4qRPn
  9. hsperfdata_oracle                     keyring-xAKJWE       OSB-SBT-PROXY-24215                    virtdw7h3Gx
  10. kde-root                              ksocket-root         pulse-EeBQxGF73h1i                     virtdZYy9Px
  11. keyring-0pt7it                        libshadowsocks.log   pulse-sdb6jdQkkPR1                     virtual-oracle.7gpGsP
  12. keyring-0UVLlg                        ofaXGw.png           pulse-Z9SdZWt5bnwy                     virtual-root.Bd4BR8
  13. keyring-a43rtz                        orbit-gdm            sess_27a35bafcb12865982d98a9dba18e87b  virtual-root.EDY4fl
  14. keyring-E7WkyM                        orbit-oracle         SIP-XXLHcyZM                           virtual-root.hVnZFF
  15. keyring-ezvIzr                        orbit-root           SIP-XXv4poGm                           virtual-root.P7XyG2
  16. keyring-hzSHrh                        OSB-SBT-PROXY-23946  ssh-kpjZD21610                         virtual-root.ZE45zl
  17. [root@station90 tmp]# cd botang-config-xshare/
  18. [root@station90 botang-config-xshare]# ls
  19. blacklist       temp_command24       temp_command_doit16  temp_command_doit8  temp_prepare3        temp_prepare_doit20
  20. course          temp_command3        temp_command_doit17  temp_command_doit9  temp_prepare4        temp_prepare_doit21
  21. temp_command10  temp_command37       temp_command_doit18  temp_ip             temp_prepare5        temp_prepare_doit22
  22. temp_command11  temp_command38       temp_command_doit19  temp_prepare10      temp_prepare6        temp_prepare_doit24
  23. temp_command12  temp_command4        temp_command_doit20  temp_prepare11      temp_prepare7        temp_prepare_doit3
  24. temp_command13  temp_command5        temp_command_doit21  temp_prepare12      temp_prepare8        temp_prepare_doit4
  25. temp_command14  temp_command6        temp_command_doit22  temp_prepare13      temp_prepare9        temp_prepare_doit5
  26. temp_command15  temp_command7        temp_command_doit23  temp_prepare14      temp_prepare_doit10  temp_prepare_doit6
  27. temp_command16  temp_command8        temp_command_doit24  temp_prepare15      temp_prepare_doit11  temp_prepare_doit7
  28. temp_command17  temp_command9        temp_command_doit3   temp_prepare16      temp_prepare_doit12  temp_prepare_doit8
  29. temp_command18  temp_command_doit10  temp_command_doit37  temp_prepare17      temp_prepare_doit13  temp_prepare_doit9
  30. temp_command19  temp_command_doit11  temp_command_doit38  temp_prepare19      temp_prepare_doit14  temp_randomip
  31. temp_command20  temp_command_doit12  temp_command_doit4   temp_prepare20      temp_prepare_doit15  temp_selection
  32. temp_command21  temp_command_doit13  temp_command_doit5   temp_prepare21      temp_prepare_doit16  temp_xstartup
  33. temp_command22  temp_command_doit14  temp_command_doit6   temp_prepare22      temp_prepare_doit17
  34. temp_command23  temp_command_doit15  temp_command_doit7   temp_prepare24      temp_prepare_doit19
  35. [root@station90 botang-config-xshare]# cd course/
  36. [root@station90 course]# ls
  37. general
  38. [root@station90 course]# mkdir demo
  39. [root@station90 course]# cd demo/
  40. [root@station90 demo]# ls
  41. [root@station90 demo]# cp ../general/
  42. fnkeys                                           save201606201466430236_v_botang_all_ipsshd_open
  43. save201606141465873820_v_botang_all_ipsshd_open  save201606201466430251_v_botang_all_ipsshd_open
  44. save201606141465873881_v_botang_all_ipsshd_open  tmpp1_v_botang_all_ipsshd_open
  45. save201606141465873954_v_botang_all_ipsshd_open  tmp_v_botang_all_ipsshd_open
  46. save201606141465878146_v_botang_all_ipsshd_open  tmp_v_botang_dhcp_ipsshd_open
  47. save201606141465878482_v_botang_all_ipsshd_open  tmp_v_botang_notdhcp_ipsshd_open
  48. save201606181466256854_v_botang_all_ipsshd_open  v_botang_all_ipsshd_open
  49. save201606181466256951_v_botang_all_ipsshd_open  v_botang_dhcp_ip
  50. save201606181466257065_v_botang_all_ipsshd_open  v_botang_dhcp_ipsshd_open
  51. save201606181466257470_v_botang_all_ipsshd_open  v_botang_notdhcp_ipsshd_open
  52. save201606201466430166_v_botang_all_ipsshd_open  
  53. [root@station90 demo]# cp ../general/v_botang_all_ipsshd_open   ./
  54. [root@station90 demo]# ls
  55. v_botang_all_ipsshd_open
  56. [root@station90 demo]# vim v_botang_all_ipsshd_open
  57. [root@station90 demo]# ssh station90
  58. The authenticity of host 'station90 (192.168.0.90)' can't be established.
  59. RSA key fingerprint is b9:1c:59:ca:5c:15:d1:9a:d3:1b:14:b4:a4:bb:74:2a.
  60. Are you sure you want to continue connecting (yes/no)? yes
  61. Warning: Permanently added 'station90,192.168.0.90' (RSA) to the list of known hosts.
  62. Unable to get valid context for root
  63. Last login: Thu Jun  9 20:35:31 2016 from station90.example.com
  64. [root@station90 ~]# exit
  65. logout
  66. Connection to station90 closed.
  67. [root@station90 demo]# bcl --O11g05 1a  
  68. Password Number is: 5.
  69. RAC FITABLE
  70. The course for you to decide: ?
  71. demo  general
  72. Please input your decision: ? demo
  73. Your input is: "demo". Are you sure ?(y/n) y

  74. ****************************************************************************************************
  75. 一般注意事项:

  76.   1.以下大多数实验要求数据库处于归档模式,一些实验要求有全库备份,请一定注意users表空间要有单独的备份通道(使它自己包含在它自己的备份集中)。

  77.   2.把压缩包中各个实验脚本中的*.sql和bclcustom-subprogram放在/home/oracle/下面, 以root身份运行Cbclcustom.sh(可以放在任何地方),即可实施破坏并作实验。
  78.         
  79.   3.sys的密码一定要叫做oracle_4U。

  80.   4.实验环境的grid和db_home1一定要按照课程环境安装。

  81.   5.唯独实验6b和实验15需要在执行完成Cbclcustom.sh之后运行各自文件夹下面的begin-realpost。作进一步破坏,请打开begin-realpost阅读一下就明白了。

  82.   6.11g没有实验2。

  83. ****************************************************************************************************

  84. 0_copy_rever
  85. 10a_当前控制文件损坏_备份时下线user表空间不完全恢复_用控制文件二进制备份_数据不丢_不需备份
  86. 10b_当前控制文件损坏_备份时下线user表空间完全恢复_用控制文件脚本_不需备份
  87. 10c_当前控制文件损坏_备份时只读user表空间不完全恢复_用控制文件二进制备份_数据不丢_不需备份
  88. 10d_当前控制文件损坏_备份时只读user表空间完全恢复_用控制文件脚本_不需备份
  89. 11a_当前控制文件和日志文件全部损坏_不完全恢复_用控制文件二进制备份
  90. 11b_当前控制文件和日志文件全部损坏_不完全恢复_用控制文件脚本
  91. 12a_当前控制文件和日志文件全部损坏_备份时下线user表空间不完全恢复_用控制文件二进制备份
  92. 12b_当前控制文件和日志文件全部损坏_备份时下线user表空间不完全恢复_用控制文件脚本
  93. 12c_当前控制文件和日志文件全部损坏_备份时只读user表空间不完全恢复_用控制文件二进制备份
  94. 12d_当前控制文件和日志文件全部损坏_备份时只读user表空间不完全恢复_用控制文件脚本
  95. 13a_当前控制文件损坏_新建tbsocp05_test2表空间不完全恢复_用控制文件二进制备份_数据不丢_不需备份
  96. 13b_当前控制文件损坏_新建tbsocp05_test3表空间完全恢复_用控制文件脚本_不需备份
  97. 14_删除表空间不完全恢复
  98. 15_穿越incarnation不完全恢复
  99. 1a_users表空间在线损坏
  100. 1b_下线user表空间损坏
  101. 1c_只读user表空间损坏
  102. 1d_users表空间热备
  103. 3_system表空间离线损坏
  104. 4_tbsocp05_test没有备份的表空间损坏
  105. 5_基于时间的不完全恢复
  106. 6a_基于log序列号的不完全恢复
  107. 6b_基于cancel的不完全恢复
  108. 7a_当前控制文件和数据文件完好_日志文件全部损坏_正常关机不完全恢复_数据不丢_不需备份
  109. 7b_当前控制文件和数据文件完好_日志文件全部损坏_不正常关机不完全恢复
  110. 8a_当前控制文件损坏_不完全恢复_用控制文件二进制备份_数据不丢_不需备份
  111. 8b_当前控制文件损坏_完全恢复_用控制文件脚本_不需备份
  112. 9a_当前控制文件损坏_下线user表空间不完全恢复_用控制文件二进制备份_数据不丢_不需备份
  113. 9b_当前控制文件损坏_下线user表空间完全恢复_用控制文件脚本_不需备份
  114. 9c_当前控制文件损坏_只读user表空间不完全恢复_用控制文件二进制备份_数据不丢_不需备份
  115. 9d_当前控制文件损坏_只读user表空间完全恢复_用控制文件脚本_不需备份
  116. bclcustom-subprogram
  117. begin-prepare
  118. begin-real
  119. end
  120. ptable.sql
  121. rtable.sql
  122.   ********
  123.   * 提醒 * 从7b开始讲师需要准备catalog。 如果使用磁带机,从11a开始请注意users的备份是否存在。
  124.   ********
  125. Preparation or not, continue: ? y
  126. Password Number is: 5.
  127. RAC FITABLE
  128. The course for you to decide: ?
  129. demo  general
  130. Please input your decision: ? demo
  131. Your input is: "demo". Are you sure ?(y/n) y
  132. Uniquely Customing 192.168.0.90......
  133. Please wait ......
  134. 关闭 vsftpd:                                              [确定]
  135. 为 vsftpd 启动 vsftpd:                                    [确定]
  136. Preparation finished, continue: ? y
  137. Password Number is: 5.
  138. RAC FITABLE
  139. The course for you to decide: ?
  140. demo  general
  141. Please input your decision: ? demo
  142. Your input is: "demo". Are you sure ?(y/n) y
  143. Uniquely Customing 192.168.0.90......
  144. Please wait ......
  145. Waiting result for full output from 192.168.0.90......
  146. Waiting result for full output from 192.168.0.90......
  147. Waiting result for full output from 192.168.0.90......
  148. Waiting result for full output from 192.168.0.90......
  149. Waiting result for full output from 192.168.0.90......
  150. Waiting result for full output from 192.168.0.90......
  151. Waiting result for full output from 192.168.0.90......
  152. Waiting result for full output from 192.168.0.90......
  153. Waiting result for full output from 192.168.0.90......
  154. Waiting result for full output from 192.168.0.90......
  155. Waiting result for full output from 192.168.0.90......
  156. Waiting result for full output from 192.168.0.90......
  157. Waiting result for full output from 192.168.0.90......
  158. Waiting result for full output from 192.168.0.90......
  159. Waiting result for full output from 192.168.0.90......
  160. Waiting result for full output from 192.168.0.90......
  161. Waiting result for full output from 192.168.0.90......
  162. 关闭 vsftpd:                                              [确定]
  163. 为 vsftpd 启动 vsftpd:                                    [确定]
  164. Reallabs finished, continue ?y
  165. Password Number is: 5.
  166. RAC FITABLE
  167. The course for you to decide: ?
  168. demo  general
  169. Please input your decision: ? demo
  170. Your input is: "demo". Are you sure ?(y/n) y
  171. Uniquely Customing 192.168.0.90......
  172. Please wait ......
  173. 关闭 vsftpd:                                              [确定]
  174. 为 vsftpd 启动 vsftpd:                                    [确定]
  175. [root@station90 demo]# su - oracle
  176. [oracle@station90 ~]$ rman target /  

  177. Recovery Manager: Release 11.2.0.1.0 - Production on Tue Jun 21 00:07:33 2016

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

  179. connected to target database: ORCL (DBID=1343950367)

  180. RMAN> backup '2T_USERS_INCR0'  incremental level 0 tablespace users ;  

  181. RMAN-00571: ===========================================================
  182. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  183. RMAN-00571: ===========================================================
  184. RMAN-00558: error encountered while parsing input commands
  185. RMAN-01009: syntax error: found "single-quoted-string": expecting one of: "archivelog, as, auxiliary, backupset, backup, channel, check, controlfilecopy, copies, copy, cumulative, current, database, datafilecopy, datafile, db_file_name_convert, db_recovery_file_dest, device, diskratio, duration, filesperset, force, format, for, from, full, incremental, keep, maxsetsize, nochecksum, noexclude, nokeep, not, pool, proxy, recovery, reuse, section, skip readonly, skip, spfile, tablespace, tag, to, validate, ("
  186. RMAN-01007: at line 1 column 8 file: standard input

  187. RMAN> backup tag  '2T_USERS_INCR0'  incremental level 0 tablespace users ;  

  188. Starting backup at 2016-06-21:00:08:21
  189. using target database control file instead of recovery catalog
  190. allocated channel: ORA_SBT_TAPE_1
  191. channel ORA_SBT_TAPE_1: SID=86 device type=SBT_TAPE
  192. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  193. allocated channel: ORA_SBT_TAPE_2
  194. channel ORA_SBT_TAPE_2: SID=18 device type=SBT_TAPE
  195. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  196. allocated channel: ORA_SBT_TAPE_3
  197. channel ORA_SBT_TAPE_3: SID=138 device type=SBT_TAPE
  198. channel ORA_SBT_TAPE_3: Oracle Secure Backup
  199. allocated channel: ORA_SBT_TAPE_4
  200. channel ORA_SBT_TAPE_4: SID=83 device type=SBT_TAPE
  201. channel ORA_SBT_TAPE_4: Oracle Secure Backup
  202. allocated channel: ORA_SBT_TAPE_5
  203. channel ORA_SBT_TAPE_5: SID=20 device type=SBT_TAPE
  204. channel ORA_SBT_TAPE_5: Oracle Secure Backup
  205. allocated channel: ORA_SBT_TAPE_6
  206. channel ORA_SBT_TAPE_6: SID=145 device type=SBT_TAPE
  207. channel ORA_SBT_TAPE_6: Oracle Secure Backup
  208. allocated channel: ORA_SBT_TAPE_7
  209. channel ORA_SBT_TAPE_7: SID=23 device type=SBT_TAPE
  210. channel ORA_SBT_TAPE_7: Oracle Secure Backup
  211. allocated channel: ORA_SBT_TAPE_8
  212. channel ORA_SBT_TAPE_8: SID=152 device type=SBT_TAPE
  213. channel ORA_SBT_TAPE_8: Oracle Secure Backup
  214. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  215. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  216. input datafile file number=00004 name=+DATA/orcl/datafile/users.259.915062657
  217. channel ORA_SBT_TAPE_1: starting piece 1 at 2016-06-21:00:09:04
  218. RMAN-00571: ===========================================================
  219. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  220. RMAN-00571: ===========================================================
  221. RMAN-03009: failure of backup command on ORA_SBT_TAPE_1 channel at 06/21/2016 00:09:05
  222. ORA-19914: unable to encrypt backup
  223. ORA-28365: wallet is not open

  224. RMAN> set encryption on identified by "redhat12";

  225. executing command: SET encryption

  226. RMAN> backup tag  '2T_USERS_INCR0'  incremental level 0 tablespace users ;  

  227. Starting backup at 2016-06-21:00:09:29
  228. using channel ORA_SBT_TAPE_1
  229. using channel ORA_SBT_TAPE_2
  230. using channel ORA_SBT_TAPE_3
  231. using channel ORA_SBT_TAPE_4
  232. using channel ORA_SBT_TAPE_5
  233. using channel ORA_SBT_TAPE_6
  234. using channel ORA_SBT_TAPE_7
  235. using channel ORA_SBT_TAPE_8
  236. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  237. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  238. input datafile file number=00004 name=+DATA/orcl/datafile/users.259.915062657
  239. channel ORA_SBT_TAPE_1: starting piece 1 at 2016-06-21:00:09:29
  240. RMAN-00571: ===========================================================
  241. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  242. RMAN-00571: ===========================================================
  243. RMAN-03009: failure of backup command on ORA_SBT_TAPE_1 channel at 06/21/2016 00:09:30
  244. ORA-19914: unable to encrypt backup
  245. ORA-28365: wallet is not open

  246. RMAN> run {
  247. 2> set encryption on identified by "redhat12";
  248. 3>  backup tag  '2T_USERS_INCR0'  incremental level 0 tablespace users ;
  249. 4> }

  250. RMAN-00571: ===========================================================
  251. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  252. RMAN-00571: ===========================================================
  253. RMAN-03032: this option of set command needs to be used outside of a run block

  254. RMAN> show all;

  255. RMAN configuration parameters for database with db_unique_name ORCL are:
  256. CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
  257. CONFIGURE BACKUP OPTIMIZATION ON;
  258. CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
  259. CONFIGURE CONTROLFILE AUTOBACKUP OFF;
  260. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
  261. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
  262. CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO COMPRESSED BACKUPSET;
  263. CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 8 BACKUP TYPE TO BACKUPSET;
  264. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  265. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  266. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  267. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  268. CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  269. CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  270. CONFIGURE CHANNEL 3 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  271. CONFIGURE CHANNEL 4 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  272. CONFIGURE CHANNEL 5 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  273. CONFIGURE CHANNEL 6 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  274. CONFIGURE CHANNEL 7 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  275. CONFIGURE CHANNEL 8 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  276. CONFIGURE MAXSETSIZE TO UNLIMITED; # default
  277. CONFIGURE ENCRYPTION FOR DATABASE ON;
  278. CONFIGURE ENCRYPTION ALGORITHM 'AES256';
  279. CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
  280. CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
  281. CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl.f'; # default

  282. RMAN> set encryption on identified by "redhat12"  only ;

  283. executing command: SET encryption

  284. RMAN>  backup tag  '2PET_USERS_INCR0'  incremental level 0 tablespace users ;

  285. Starting backup at 2016-06-21:00:10:50
  286. using channel ORA_SBT_TAPE_1
  287. using channel ORA_SBT_TAPE_2
  288. using channel ORA_SBT_TAPE_3
  289. using channel ORA_SBT_TAPE_4
  290. using channel ORA_SBT_TAPE_5
  291. using channel ORA_SBT_TAPE_6
  292. using channel ORA_SBT_TAPE_7
  293. using channel ORA_SBT_TAPE_8
  294. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  295. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  296. input datafile file number=00004 name=+DATA/orcl/datafile/users.259.915062657
  297. channel ORA_SBT_TAPE_1: starting piece 1 at 2016-06-21:00:10:50
  298. channel ORA_SBT_TAPE_1: finished piece 1 at 2016-06-21:00:11:15
  299. piece handle=6rr8lg8a_1_1 tag=2PET_USERS_INCR0 comment=API Version 2.0,MMS Version 10.3.0.2
  300. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  301. Finished backup at 2016-06-21:00:11:15

  302. RMAN> exit


  303. Recovery Manager complete.
  304. [oracle@station90 ~]$ rman target /

  305. Recovery Manager: Release 11.2.0.1.0 - Production on Tue Jun 21 00:12:32 2016

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

  307. connected to target database: ORCL (DBID=1343950367)

  308. RMAN> list backup;

  309. using target database control file instead of recovery catalog

  310. List of Backup Sets
  311. ===================


  312. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  313. ------- ---- -- ---------- ----------- ------------ -------------------
  314. 197     Incr 0  1.25M      SBT_TAPE    00:00:24     2016-06-20:23:56:17
  315.         BP Key: 213   Status: AVAILABLE  Compressed: NO  Tag: 1ET_USERS_INCR0
  316.         Handle: 6or8lfc9_1_1   Media: station90-000019
  317.   List of Datafiles in backup set 197
  318.   File LV Type Ckp SCN    Ckp Time            Name
  319.   ---- -- ---- ---------- ------------------- ----
  320.   4    0  Incr 2126701    2016-06-20:23:55:53 +DATA/orcl/datafile/users.259.915062657

  321. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  322. ------- ---- -- ---------- ----------- ------------ -------------------
  323. 198     Incr 0  1.25M      SBT_TAPE    00:00:24     2016-06-21:00:11:14
  324.         BP Key: 214   Status: AVAILABLE  Compressed: NO  Tag: 2PET_USERS_INCR0
  325.         Handle: 6rr8lg8a_1_1   Media: station90-000019
  326.   List of Datafiles in backup set 198
  327.   File LV Type Ckp SCN    Ckp Time            Name
  328.   ---- -- ---- ---------- ------------------- ----
  329.   4    0  Incr 2131009    2016-06-21:00:10:50 +DATA/orcl/datafile/users.259.915062657

  330. RMAN> restore  tablespace users ;

  331. Starting restore at 2016-06-21:00:13:08
  332. allocated channel: ORA_DISK_1
  333. channel ORA_DISK_1: SID=201 device type=DISK
  334. allocated channel: ORA_DISK_2
  335. channel ORA_DISK_2: SID=17 device type=DISK
  336. allocated channel: ORA_DISK_3
  337. channel ORA_DISK_3: SID=75 device type=DISK
  338. allocated channel: ORA_DISK_4
  339. channel ORA_DISK_4: SID=130 device type=DISK
  340. allocated channel: ORA_DISK_5
  341. channel ORA_DISK_5: SID=205 device type=DISK
  342. allocated channel: ORA_DISK_6
  343. channel ORA_DISK_6: SID=24 device type=DISK
  344. allocated channel: ORA_DISK_7
  345. channel ORA_DISK_7: SID=85 device type=DISK
  346. allocated channel: ORA_DISK_8
  347. channel ORA_DISK_8: SID=140 device type=DISK
  348. allocated channel: ORA_SBT_TAPE_1
  349. channel ORA_SBT_TAPE_1: SID=195 device type=SBT_TAPE
  350. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  351. allocated channel: ORA_SBT_TAPE_2
  352. channel ORA_SBT_TAPE_2: SID=135 device type=SBT_TAPE
  353. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  354. allocated channel: ORA_SBT_TAPE_3
  355. channel ORA_SBT_TAPE_3: SID=9 device type=SBT_TAPE
  356. channel ORA_SBT_TAPE_3: Oracle Secure Backup
  357. allocated channel: ORA_SBT_TAPE_4
  358. channel ORA_SBT_TAPE_4: SID=137 device type=SBT_TAPE
  359. channel ORA_SBT_TAPE_4: Oracle Secure Backup
  360. allocated channel: ORA_SBT_TAPE_5
  361. channel ORA_SBT_TAPE_5: SID=84 device type=SBT_TAPE
  362. channel ORA_SBT_TAPE_5: Oracle Secure Backup
  363. allocated channel: ORA_SBT_TAPE_6
  364. channel ORA_SBT_TAPE_6: SID=22 device type=SBT_TAPE
  365. channel ORA_SBT_TAPE_6: Oracle Secure Backup
  366. allocated channel: ORA_SBT_TAPE_7
  367. channel ORA_SBT_TAPE_7: SID=78 device type=SBT_TAPE
  368. channel ORA_SBT_TAPE_7: Oracle Secure Backup
  369. allocated channel: ORA_SBT_TAPE_8
  370. channel ORA_SBT_TAPE_8: SID=86 device type=SBT_TAPE
  371. channel ORA_SBT_TAPE_8: Oracle Secure Backup

  372. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  373. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  374. channel ORA_SBT_TAPE_1: restoring datafile 00004 to +DATA/orcl/datafile/users.259.915062657
  375. channel ORA_SBT_TAPE_1: reading from backup piece 6rr8lg8a_1_1
  376. RMAN-00571: ===========================================================
  377. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  378. RMAN-00571: ===========================================================
  379. RMAN-03002: failure of restore command at 06/21/2016 00:14:28
  380. ORA-19870: error while restoring backup piece 6rr8lg8a_1_1
  381. ORA-19913: unable to decrypt backup
  382. ORA-28365: wallet is not open

  383. RMAN> set decrytion identified by "java12","oracle12";

  384. RMAN-00571: ===========================================================
  385. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  386. RMAN-00571: ===========================================================
  387. RMAN-00558: error encountered while parsing input commands
  388. 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"
  389. RMAN-01008: the bad identifier was: decrytion
  390. RMAN-01007: at line 1 column 5 file: standard input

  391. RMAN> set decryption identified by "java12","oracle12";

  392. executing command: SET decryption

  393. RMAN> restore  tablespace users ;

  394. Starting restore at 2016-06-21:00:15:40
  395. using channel ORA_DISK_1
  396. using channel ORA_DISK_2
  397. using channel ORA_DISK_3
  398. using channel ORA_DISK_4
  399. using channel ORA_DISK_5
  400. using channel ORA_DISK_6
  401. using channel ORA_DISK_7
  402. using channel ORA_DISK_8
  403. using channel ORA_SBT_TAPE_1
  404. using channel ORA_SBT_TAPE_2
  405. using channel ORA_SBT_TAPE_3
  406. using channel ORA_SBT_TAPE_4
  407. using channel ORA_SBT_TAPE_5
  408. using channel ORA_SBT_TAPE_6
  409. using channel ORA_SBT_TAPE_7
  410. using channel ORA_SBT_TAPE_8

  411. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  412. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  413. channel ORA_SBT_TAPE_1: restoring datafile 00004 to +DATA/orcl/datafile/users.259.915062657
  414. channel ORA_SBT_TAPE_1: reading from backup piece 6rr8lg8a_1_1

  415. RMAN-00571: ===========================================================
  416. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  417. RMAN-00571: ===========================================================
  418. RMAN-03002: failure of restore command at 06/21/2016 00:16:09
  419. ORA-19870: error while restoring backup piece 6rr8lg8a_1_1
  420. ORA-19913: unable to decrypt backup
  421. ORA-28365: wallet is not open

  422. RMAN> set decryption identified by "java12","redhat12","oracle12";

  423. executing command: SET decryption

  424. RMAN> restore  tablespace users ;

  425. Starting restore at 2016-06-21:00:16:25
  426. using channel ORA_DISK_1
  427. using channel ORA_DISK_2
  428. using channel ORA_DISK_3
  429. using channel ORA_DISK_4
  430. using channel ORA_DISK_5
  431. using channel ORA_DISK_6
  432. using channel ORA_DISK_7
  433. using channel ORA_DISK_8
  434. using channel ORA_SBT_TAPE_1
  435. using channel ORA_SBT_TAPE_2
  436. using channel ORA_SBT_TAPE_3
  437. using channel ORA_SBT_TAPE_4
  438. using channel ORA_SBT_TAPE_5
  439. using channel ORA_SBT_TAPE_6
  440. using channel ORA_SBT_TAPE_7
  441. using channel ORA_SBT_TAPE_8

  442. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  443. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  444. channel ORA_SBT_TAPE_1: restoring datafile 00004 to +DATA/orcl/datafile/users.259.915062657
  445. channel ORA_SBT_TAPE_1: reading from backup piece 6rr8lg8a_1_1
  446. channel ORA_SBT_TAPE_1: piece handle=6rr8lg8a_1_1 tag=2PET_USERS_INCR0
  447. channel ORA_SBT_TAPE_1: restored backup piece 1
  448. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:25
  449. Finished restore at 2016-06-21:00:16:51

  450. RMAN> recover tablespace users ;

  451. Starting recover at 2016-06-21:00:17:12
  452. using channel ORA_DISK_1
  453. using channel ORA_DISK_2
  454. using channel ORA_DISK_3
  455. using channel ORA_DISK_4
  456. using channel ORA_DISK_5
  457. using channel ORA_DISK_6
  458. using channel ORA_DISK_7
  459. using channel ORA_DISK_8
  460. using channel ORA_SBT_TAPE_1
  461. using channel ORA_SBT_TAPE_2
  462. using channel ORA_SBT_TAPE_3
  463. using channel ORA_SBT_TAPE_4
  464. using channel ORA_SBT_TAPE_5
  465. using channel ORA_SBT_TAPE_6
  466. using channel ORA_SBT_TAPE_7
  467. using channel ORA_SBT_TAPE_8

  468. starting media recovery
  469. media recovery complete, elapsed time: 00:00:00

  470. Finished recover at 2016-06-21:00:17:13

  471. RMAN>
复制代码
加密部分:
  1. [root@station90 桌面]# su - oracle
  2. [oracle@station90 ~]$ sqlplus /nolog

  3. SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 20 23:50:09 2016

  4. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  5. SQL> conn   / as sysdba
  6. Connected.
  7. SQL> alter system set encryption wallet close identified  by "oracle12";

  8. System altered.

  9. SQL> alter system set encryption wallet open identified  by "oracle12";

  10. System altered.

  11. SQL> exit
  12. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  13. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  14. and Real Application Testing options
  15. [oracle@station90 ~]$ rman target  /

  16. Recovery Manager: Release 11.2.0.1.0 - Production on Mon Jun 20 23:51:17 2016

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

  18. connected to target database: ORCL (DBID=1343950367)

  19. RMAN> delete noprompt backup ;

  20. using target database control file instead of recovery catalog
  21. allocated channel: ORA_DISK_1
  22. channel ORA_DISK_1: SID=137 device type=DISK
  23. allocated channel: ORA_DISK_2
  24. channel ORA_DISK_2: SID=135 device type=DISK
  25. allocated channel: ORA_DISK_3
  26. channel ORA_DISK_3: SID=197 device type=DISK
  27. allocated channel: ORA_DISK_4
  28. channel ORA_DISK_4: SID=14 device type=DISK
  29. allocated channel: ORA_DISK_5
  30. channel ORA_DISK_5: SID=78 device type=DISK
  31. allocated channel: ORA_DISK_6
  32. channel ORA_DISK_6: SID=140 device type=DISK
  33. allocated channel: ORA_DISK_7
  34. channel ORA_DISK_7: SID=191 device type=DISK
  35. allocated channel: ORA_DISK_8
  36. channel ORA_DISK_8: SID=15 device type=DISK
  37. allocated channel: ORA_SBT_TAPE_1
  38. channel ORA_SBT_TAPE_1: SID=75 device type=SBT_TAPE
  39. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  40. allocated channel: ORA_SBT_TAPE_2
  41. channel ORA_SBT_TAPE_2: SID=198 device type=SBT_TAPE
  42. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  43. allocated channel: ORA_SBT_TAPE_3
  44. channel ORA_SBT_TAPE_3: SID=195 device type=SBT_TAPE
  45. channel ORA_SBT_TAPE_3: Oracle Secure Backup
  46. allocated channel: ORA_SBT_TAPE_4
  47. channel ORA_SBT_TAPE_4: SID=139 device type=SBT_TAPE
  48. channel ORA_SBT_TAPE_4: Oracle Secure Backup
  49. allocated channel: ORA_SBT_TAPE_5
  50. channel ORA_SBT_TAPE_5: SID=17 device type=SBT_TAPE
  51. channel ORA_SBT_TAPE_5: Oracle Secure Backup
  52. allocated channel: ORA_SBT_TAPE_6
  53. channel ORA_SBT_TAPE_6: SID=144 device type=SBT_TAPE
  54. channel ORA_SBT_TAPE_6: Oracle Secure Backup
  55. allocated channel: ORA_SBT_TAPE_7
  56. channel ORA_SBT_TAPE_7: SID=86 device type=SBT_TAPE
  57. channel ORA_SBT_TAPE_7: Oracle Secure Backup
  58. allocated channel: ORA_SBT_TAPE_8
  59. channel ORA_SBT_TAPE_8: SID=22 device type=SBT_TAPE
  60. channel ORA_SBT_TAPE_8: Oracle Secure Backup

  61. List of Backup Pieces
  62. BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
  63. ------- ------- --- --- ----------- ----------- ----------
  64. 181     177     1   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnsnn0_1d_system_incr0_0.301.915056827
  65. 182     178     1   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/ncnnn0_1d_system_incr0_0.303.915056829
  66. 183     179     1   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnndn0_1d_system_incr0_0.300.915056829
  67. 184     180     1   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnsnn0_2d_system_incr0_0.306.915057063
  68. 185     181     1   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/ncnnn0_2d_system_incr0_0.316.915057065
  69. 186     182     1   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.268.915057065
  70. 187     182     2   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.310.915057067
  71. 188     182     3   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.309.915057071
  72. 189     182     4   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.311.915057073
  73. 190     182     5   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.314.915057077
  74. 191     182     6   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.308.915057079
  75. 192     182     7   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.341.915057083
  76. 193     183     1   1   AVAILABLE   DISK        /home/oracle/maxpieces/6ar8laie_1_1.bkp
  77. 194     183     2   1   AVAILABLE   DISK        /home/oracle/maxpieces/6ar8laie_2_1.bkp
  78. 195     183     3   1   AVAILABLE   DISK        /home/oracle/maxpieces/6ar8laie_3_1.bkp
  79. 196     183     4   1   AVAILABLE   DISK        /home/oracle/maxpieces/6ar8laie_4_1.bkp
  80. 197     183     5   1   AVAILABLE   DISK        /home/oracle/maxpieces/6ar8laie_5_1.bkp
  81. 198     183     6   1   AVAILABLE   DISK        /home/oracle/maxpieces/6ar8laie_6_1.bkp
  82. 199     183     7   1   AVAILABLE   DISK        /home/oracle/maxpieces/6ar8laie_7_1.bkp
  83. 200     184     1   1   AVAILABLE   DISK        /home/oracle/maxpieces/6br8lain_1_1.bkp
  84. 201     185     1   1   AVAILABLE   SBT_TAPE    6dr8latl_1_1
  85. 202     186     1   1   AVAILABLE   SBT_TAPE    6cr8latl_1_1
  86. 203     187     1   1   AVAILABLE   SBT_TAPE    6fr8laup_1_1
  87. 204     188     1   1   AVAILABLE   SBT_TAPE    6er8laup_1_1
  88. 205     189     1   1   AVAILABLE   SBT_TAPE    6jr8lauq_1_1
  89. 206     190     1   1   AVAILABLE   SBT_TAPE    6gr8laup_1_1
  90. 207     191     1   1   AVAILABLE   SBT_TAPE    6hr8laup_1_1
  91. 208     192     1   1   AVAILABLE   SBT_TAPE    6ir8laup_1_1
  92. 210     194     1   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnsnn0_1cd_system_incr0_0.305.915058285
  93. 211     195     1   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/ncnnn0_1cd_system_incr0_0.328.915058287
  94. 212     196     1   1   AVAILABLE   DISK        +FRA/orcl/backupset/2016_06_20/nnndn0_1cd_system_incr0_0.334.915058285
  95. deleted backup piece
  96. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnsnn0_1d_system_incr0_0.301.915056827 RECID=181 STAMP=915056827
  97. deleted backup piece
  98. backup piece handle=+FRA/orcl/backupset/2016_06_20/ncnnn0_1d_system_incr0_0.303.915056829 RECID=182 STAMP=915056828
  99. deleted backup piece
  100. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnndn0_1d_system_incr0_0.300.915056829 RECID=183 STAMP=915056827
  101. deleted backup piece
  102. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnsnn0_2d_system_incr0_0.306.915057063 RECID=184 STAMP=915057062
  103. deleted backup piece
  104. backup piece handle=+FRA/orcl/backupset/2016_06_20/ncnnn0_2d_system_incr0_0.316.915057065 RECID=185 STAMP=915057063
  105. deleted backup piece
  106. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.268.915057065 RECID=186 STAMP=915057064
  107. deleted backup piece
  108. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.310.915057067 RECID=187 STAMP=915057067
  109. deleted backup piece
  110. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.309.915057071 RECID=188 STAMP=915057070
  111. deleted backup piece
  112. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.311.915057073 RECID=189 STAMP=915057073
  113. deleted backup piece
  114. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.314.915057077 RECID=190 STAMP=915057076
  115. deleted backup piece
  116. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.308.915057079 RECID=191 STAMP=915057079
  117. deleted backup piece
  118. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnndn0_2d_system_incr0_0.341.915057083 RECID=192 STAMP=915057082
  119. deleted backup piece
  120. backup piece handle=/home/oracle/maxpieces/6ar8laie_1_1.bkp RECID=193 STAMP=915057230
  121. deleted backup piece
  122. backup piece handle=/home/oracle/maxpieces/6ar8laie_2_1.bkp RECID=194 STAMP=915057233
  123. deleted backup piece
  124. backup piece handle=/home/oracle/maxpieces/6ar8laie_3_1.bkp RECID=195 STAMP=915057234
  125. deleted backup piece
  126. backup piece handle=/home/oracle/maxpieces/6ar8laie_4_1.bkp RECID=196 STAMP=915057235
  127. deleted backup piece
  128. backup piece handle=/home/oracle/maxpieces/6ar8laie_5_1.bkp RECID=197 STAMP=915057236
  129. deleted backup piece
  130. backup piece handle=/home/oracle/maxpieces/6ar8laie_6_1.bkp RECID=198 STAMP=915057237
  131. deleted backup piece
  132. backup piece handle=/home/oracle/maxpieces/6ar8laie_7_1.bkp RECID=199 STAMP=915057238
  133. deleted backup piece
  134. backup piece handle=/home/oracle/maxpieces/6br8lain_1_1.bkp RECID=200 STAMP=915057240
  135. deleted backup piece
  136. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnsnn0_1cd_system_incr0_0.305.915058285 RECID=210 STAMP=915058285
  137. deleted backup piece
  138. backup piece handle=+FRA/orcl/backupset/2016_06_20/ncnnn0_1cd_system_incr0_0.328.915058287 RECID=211 STAMP=915058286
  139. deleted backup piece
  140. backup piece handle=+FRA/orcl/backupset/2016_06_20/nnndn0_1cd_system_incr0_0.334.915058285 RECID=212 STAMP=915058285
  141. Deleted 23 objects

  142. deleted backup piece
  143. backup piece handle=6dr8latl_1_1 RECID=201 STAMP=915057589
  144. deleted backup piece
  145. backup piece handle=6cr8latl_1_1 RECID=202 STAMP=915057589
  146. deleted backup piece
  147. backup piece handle=6fr8laup_1_1 RECID=203 STAMP=915057626
  148. deleted backup piece
  149. backup piece handle=6er8laup_1_1 RECID=204 STAMP=915057625
  150. deleted backup piece
  151. backup piece handle=6jr8lauq_1_1 RECID=205 STAMP=915057626
  152. deleted backup piece
  153. backup piece handle=6gr8laup_1_1 RECID=206 STAMP=915057626
  154. deleted backup piece
  155. backup piece handle=6hr8laup_1_1 RECID=207 STAMP=915057626
  156. deleted backup piece
  157. backup piece handle=6ir8laup_1_1 RECID=208 STAMP=915057627
  158. Deleted 8 objects


  159. RMAN> delete noprompt copy;

  160. released channel: ORA_DISK_1
  161. released channel: ORA_DISK_2
  162. released channel: ORA_DISK_3
  163. released channel: ORA_DISK_4
  164. released channel: ORA_DISK_5
  165. released channel: ORA_DISK_6
  166. released channel: ORA_DISK_7
  167. released channel: ORA_DISK_8
  168. released channel: ORA_SBT_TAPE_1
  169. released channel: ORA_SBT_TAPE_2
  170. released channel: ORA_SBT_TAPE_3
  171. released channel: ORA_SBT_TAPE_4
  172. released channel: ORA_SBT_TAPE_5
  173. released channel: ORA_SBT_TAPE_6
  174. released channel: ORA_SBT_TAPE_7
  175. released channel: ORA_SBT_TAPE_8
  176. allocated channel: ORA_DISK_1
  177. channel ORA_DISK_1: SID=137 device type=DISK
  178. allocated channel: ORA_DISK_2
  179. channel ORA_DISK_2: SID=135 device type=DISK
  180. allocated channel: ORA_DISK_3
  181. channel ORA_DISK_3: SID=197 device type=DISK
  182. allocated channel: ORA_DISK_4
  183. channel ORA_DISK_4: SID=14 device type=DISK
  184. allocated channel: ORA_DISK_5
  185. channel ORA_DISK_5: SID=78 device type=DISK
  186. allocated channel: ORA_DISK_6
  187. channel ORA_DISK_6: SID=140 device type=DISK
  188. allocated channel: ORA_DISK_7
  189. channel ORA_DISK_7: SID=191 device type=DISK
  190. allocated channel: ORA_DISK_8
  191. channel ORA_DISK_8: SID=15 device type=DISK
  192. specification does not match any datafile copy in the repository
  193. specification does not match any control file copy in the repository
  194. specification does not match any archived log in the repository

  195. RMAN> list copy;

  196. specification does not match any datafile copy in the repository
  197. specification does not match any control file copy in the repository
  198. specification does not match any archived log in the repository

  199. RMAN> list backup;

  200. specification does not match any backup in the repository

  201. RMAN> show all;

  202. RMAN configuration parameters for database with db_unique_name ORCL are:
  203. CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
  204. CONFIGURE BACKUP OPTIMIZATION ON;
  205. CONFIGURE DEFAULT DEVICE TYPE TO DISK;
  206. CONFIGURE CONTROLFILE AUTOBACKUP OFF;
  207. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
  208. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
  209. CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO COMPRESSED BACKUPSET;
  210. CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 8 BACKUP TYPE TO BACKUPSET;
  211. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  212. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  213. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  214. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  215. CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  216. CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  217. CONFIGURE CHANNEL 3 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  218. CONFIGURE CHANNEL 4 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  219. CONFIGURE CHANNEL 5 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  220. CONFIGURE CHANNEL 6 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  221. CONFIGURE CHANNEL 7 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  222. CONFIGURE CHANNEL 8 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  223. CONFIGURE MAXSETSIZE TO UNLIMITED; # default
  224. CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
  225. CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
  226. CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
  227. CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
  228. CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl.f'; # default

  229. RMAN> CONFIGURE ENCRYPTION FOR DATABASE  ON;

  230. new RMAN configuration parameters:
  231. CONFIGURE ENCRYPTION FOR DATABASE ON;
  232. new RMAN configuration parameters are successfully stored

  233. RMAN> CONFIGURE ENCRYPTION ALGORITHM 'AES192' ;

  234. new RMAN configuration parameters:
  235. CONFIGURE ENCRYPTION ALGORITHM 'AES192';
  236. new RMAN configuration parameters are successfully stored

  237. RMAN> CONFIGURE ENCRYPTION ALGORITHM 'AES256';

  238. old RMAN configuration parameters:
  239. CONFIGURE ENCRYPTION ALGORITHM 'AES192';
  240. new RMAN configuration parameters:
  241. CONFIGURE ENCRYPTION ALGORITHM 'AES256';
  242. new RMAN configuration parameters are successfully stored

  243. RMAN> show all;

  244. RMAN configuration parameters for database with db_unique_name ORCL are:
  245. CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
  246. CONFIGURE BACKUP OPTIMIZATION ON;
  247. CONFIGURE DEFAULT DEVICE TYPE TO DISK;
  248. CONFIGURE CONTROLFILE AUTOBACKUP OFF;
  249. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
  250. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
  251. CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO COMPRESSED BACKUPSET;
  252. CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 8 BACKUP TYPE TO BACKUPSET;
  253. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  254. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  255. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  256. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  257. CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  258. CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  259. CONFIGURE CHANNEL 3 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  260. CONFIGURE CHANNEL 4 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  261. CONFIGURE CHANNEL 5 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  262. CONFIGURE CHANNEL 6 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  263. CONFIGURE CHANNEL 7 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  264. CONFIGURE CHANNEL 8 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station90)';
  265. CONFIGURE MAXSETSIZE TO UNLIMITED; # default
  266. CONFIGURE ENCRYPTION FOR DATABASE ON;
  267. CONFIGURE ENCRYPTION ALGORITHM 'AES256';
  268. CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
  269. CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
  270. CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl.f'; # default

  271. RMAN> CONFIGURE DEFAULT DEVICE TYPE TO  sbt;

  272. old RMAN configuration parameters:
  273. CONFIGURE DEFAULT DEVICE TYPE TO DISK;
  274. new RMAN configuration parameters:
  275. CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
  276. new RMAN configuration parameters are successfully stored
  277. released channel: ORA_DISK_1
  278. released channel: ORA_DISK_2
  279. released channel: ORA_DISK_3
  280. released channel: ORA_DISK_4
  281. released channel: ORA_DISK_5
  282. released channel: ORA_DISK_6
  283. released channel: ORA_DISK_7
  284. released channel: ORA_DISK_8

  285. RMAN> backup tag  '1ET_USERS_INCR0' incremental level 0  tablespace users ;

  286. Starting backup at 2016-06-20:23:55:11
  287. allocated channel: ORA_SBT_TAPE_1
  288. channel ORA_SBT_TAPE_1: SID=137 device type=SBT_TAPE
  289. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  290. allocated channel: ORA_SBT_TAPE_2
  291. channel ORA_SBT_TAPE_2: SID=135 device type=SBT_TAPE
  292. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  293. allocated channel: ORA_SBT_TAPE_3
  294. channel ORA_SBT_TAPE_3: SID=197 device type=SBT_TAPE
  295. channel ORA_SBT_TAPE_3: Oracle Secure Backup
  296. allocated channel: ORA_SBT_TAPE_4
  297. channel ORA_SBT_TAPE_4: SID=14 device type=SBT_TAPE
  298. channel ORA_SBT_TAPE_4: Oracle Secure Backup
  299. allocated channel: ORA_SBT_TAPE_5
  300. channel ORA_SBT_TAPE_5: SID=78 device type=SBT_TAPE
  301. channel ORA_SBT_TAPE_5: Oracle Secure Backup
  302. allocated channel: ORA_SBT_TAPE_6
  303. channel ORA_SBT_TAPE_6: SID=140 device type=SBT_TAPE
  304. channel ORA_SBT_TAPE_6: Oracle Secure Backup
  305. allocated channel: ORA_SBT_TAPE_7
  306. channel ORA_SBT_TAPE_7: SID=191 device type=SBT_TAPE
  307. channel ORA_SBT_TAPE_7: Oracle Secure Backup
  308. allocated channel: ORA_SBT_TAPE_8
  309. channel ORA_SBT_TAPE_8: SID=15 device type=SBT_TAPE
  310. channel ORA_SBT_TAPE_8: Oracle Secure Backup
  311. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  312. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  313. input datafile file number=00004 name=+DATA/orcl/datafile/users.259.914101365
  314. channel ORA_SBT_TAPE_1: starting piece 1 at 2016-06-20:23:55:53
  315. channel ORA_SBT_TAPE_1: finished piece 1 at 2016-06-20:23:56:18
  316. piece handle=6or8lfc9_1_1 tag=1ET_USERS_INCR0 comment=API Version 2.0,MMS Version 10.3.0.2
  317. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  318. Finished backup at 2016-06-20:23:56:18

  319. RMAN> exit


  320. Recovery Manager complete.
  321. [oracle@station90 ~]$ sqlplus /nolog

  322. SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 20 23:59:22 2016

  323. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  324. SQL> conn / as sysdba
  325. Connected.
  326. SQL> alter system set encryption wallet close identfied "oracle12";
  327. alter system set encryption wallet close identfied "oracle12"
  328.                                          *
  329. ERROR at line 1:
  330. ORA-28364: invalid wallet operation


  331. SQL> alter system set encryption wallet close identified "oracle12";
  332. alter system set encryption wallet close identified "oracle12"
  333.                                                     *
  334. ERROR at line 1:
  335. ORA-28392: invalid close wallet syntax


  336. SQL> alter system set encryption wallet close identified  by "oracle12";

  337. System altered.

  338. SQL> alter database datafile 4 offline;

  339. Database altered.

  340. SQL> alter system set encryption wallet open identified  by "oracle12";

  341. System altered.

  342. SQL> alter tablespace users online ;

  343. Tablespace altered.

  344. SQL> alter system set encryption wallet close  identified  by "oracle12";

  345. System altered.

  346. SQL> alter tablespace users online ;
  347. alter tablespace users online
  348. *
  349. ERROR at line 1:
  350. ORA-01113: file 4 needs media recovery
  351. ORA-01110: data file 4: '+DATA/orcl/datafile/users.259.915062657'


  352. SQL> alter tablespace users online ;

  353. Tablespace altered.

  354. SQL>


复制代码





回复

使用道具 举报

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

本版积分规则

QQ|手机版|Botang唐波's Oracle Station   

GMT+8, 2018-11-19 14:48 , Processed in 0.247681 second(s), 24 queries .

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