查看: 766|回复: 0

[Mysql数据库] 12c ADG无法删除备库归档RMAN-08137

发表于 2018-1-24 08:00:01

一、环境描述
12c 变化很大,目前上线的系统越来越多,大家需要不断更新自己的知识库。

  1. On : 12.1.0.2 version, RAC
  2. can't delete archivelog
  3. ERROR
  4. -----------------------
  5. RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
  6. archived log file name=+ARCHDG/ESBDG/ARCHIVELOG/2018_01_11/thread_1_seq_1416.987.965165573 thread=1 sequence=1416
  7. RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
  8. archived log file
复制代码

二、处理过程
1、备库无法删除归档可能是日志没有应用
2、参数设置不当,本例是参数设置问题

  1. SYS@esbdg> show parameter log_archive_dest_2
  2. NAME TYPE VALUE
  3. ------------------------------------ ----------- ------------------------------
  4. log_archive_dest_2 string service="esbdg", SYNC AFFIRM d
  5. elay=0 optional compression=di
  6. sable max_failure=0 max_connec
  7. tions=1 reopen=300 db_unique_n
  8. ame="esbdg" net_timeout=30, va
  9. lid_for=(online_logfile,all_ro
  10. les)
  11. ....略
  12. log_archive_dest_28 string
  13. log_archive_dest_29 string
  14. SYS@esbdg> show parameter log_archive_dest_state_2
  15. NAME TYPE VALUE
  16. ------------------------------------ ----------- ------------------------------
  17. log_archive_dest_state_2 string RESET
  18. log_archive_dest_state_20 string enable
  19. ...略
  20. log_archive_dest_state_28 string enable
  21. log_archive_dest_state_29 string enable
  22. SYS@esbdg> alter system set log_archive_dest_2='';
  23. System altered.
  24. SYS@esbdg> alter system set log_archive_dest_state_2=enable;
  25. System altered.
  26. SYS@esbdg>
  27. SYS@esbdg> show parameter log_archive_dest_2
  28. NAME TYPE VALUE
  29. ------------------------------------ ----------- ------------------------------
  30. log_archive_dest_2 string
  31. log_archive_dest_20 string
  32. log_archive_dest_21 string
  33. log_archive_dest_22 string
  34. log_archive_dest_23 string
  35. log_archive_dest_24 string
  36. log_archive_dest_25 string
  37. log_archive_dest_26 string
  38. log_archive_dest_27 string
  39. log_archive_dest_28 string
  40. log_archive_dest_29 string
  41. SYS@esbdg> show parameter log_archive_dest_state_2
  42. NAME TYPE VALUE
  43. ------------------------------------ ----------- ------------------------------
  44. log_archive_dest_state_2 string ENABLE
  45. log_archive_dest_state_20 string enable
  46. log_archive_dest_state_21 string enable
  47. log_archive_dest_state_22 string enable
  48. log_archive_dest_state_23 string enable
  49. log_archive_dest_state_24 string enable
  50. log_archive_dest_state_25 string enable
  51. log_archive_dest_state_26 string enable
  52. log_archive_dest_state_27 string enable
  53. log_archive_dest_state_28 string enable
  54. log_archive_dest_state_29 string enable
  55. SYS@esbdg>
  56. RMAN> delete archivelog until time 'sysdate-3';
  57. 737 2 1238 A 2018-01-13 06:42:30
  58. Name: +ARCHDG/ESBDG/ARCHIVELOG/2018_01_13/thread_2_seq_1238.366.965332721
  59. 739 2 1239 A 2018-01-13 19:52:36
  60. Name: +ARCHDG/ESBDG/ARCHIVELOG/2018_01_13/thread_2_seq_1239.428.965336957
  61. 740 2 1240 A 2018-01-13 21:11:05
  62. Name: +ARCHDG/ESBDG/ARCHIVELOG/2018_01_13/thread_2_seq_1240.418.965336957
  63. 742 2 1241 A 2018-01-13 21:11:06
  64. Name: +ARCHDG/ESBDG/ARCHIVELOG/2018_01_13/thread_2_seq_1241.549.965336973
  65. 746 2 1242 A 2018-01-13 21:11:25
  66. Name: +ARCHDG/ESBDG/ARCHIVELOG/2018_01_13/thread_2_seq_1242.497.965341443
  67. 747 2 1243 A 2018-01-13 22:25:43
  68. Name: +ARCHDG/ESBDG/ARCHIVELOG/2018_01_13/thread_2_seq_1243.351.965341451
  69. 749 2 1244 A 2018-01-13 22:25:54
  70. Name: +ARCHDG/ESBDG/ARCHIVELOG/2018_01_13/thread_2_seq_1244.615.965341451
  71. 750 2 1245 A 2018-01-13 22:26:00
  72. Name: +ARCHDG/ESBDG/ARCHIVELOG/2018_01_14/thread_2_seq_1245.529.965421539
  73. Do you really want to delete the above objects (enter YES or NO)? yes
复制代码

三、官网文档参考

  1. while deleting archived logs from standby (文档 ID 2169282.1)
复制代码


回复

使用道具 举报