Oracle DG 归档设置验证出现的问题


Oracle DG 归档设置验证出现的问题

  1. --主库   
  2. SQL> col status for a10  
  3. SQL> col destination for a20  
  4. SQL> col error for a20  
  5. SQL> SELECT STATUS,DESTINATION, ERROR FROM V$ARCHIVE_DEST;  
  6.   
  7. STATUS     DESTINATION          ERROR  
  8. ---------- -------------------- --------------------   
  9. VALID      /home/oracle/flash_r  
  10.            ecovery_area/ORCL/ar  
  11.            chivelog  
  12.   
  13. ERROR      orcl_st              ORA-12514:  
  14.                                 TNS:listener does  
  15.                                 not currently know  
  16.                                 of service  
  17.                                 requested in  
  18.                                 connect descriptor  
  19.   
  20.   
  21. STATUS     DESTINATION          ERROR  
  22. ---------- -------------------- --------------------   
  23. INACTIVE  
  24. INACTIVE  
  25. INACTIVE  
  26. INACTIVE  
  27. INACTIVE  
  28. INACTIVE  
  29. INACTIVE  
  30. INACTIVE  
  31.   
  32. 10 rows selected.  
  33.   
  34. --备库   
  35. SQL>  col status for a10  
  36. SQL>  col destination for a20  
  37. SQL>  col error for a20  
  38. SQL> SELECT STATUS,DESTINATION, ERROR FROM V$ARCHIVE_DEST;  
  39.   
  40. STATUS     DESTINATION          ERROR  
  41. ---------- -------------------- --------------------   
  42. VALID      /home/oracle/flash_r  
  43.            ecovery_area/ORCL/ar  
  44.            chivelog  
  45.   
  46. ERROR      orcl_pd              ORA-12514:  
  47.                                 TNS:listener does  
  48.                                 not currently know  
  49.                                 of service  
  50.                                 requested in  
  51.                                 connect descriptor  
  52.   
  53.   
  54. STATUS     DESTINATION          ERROR  
  55. ---------- -------------------- --------------------   
  56. INACTIVE  
  57. INACTIVE  
  58. INACTIVE  
  59. INACTIVE  
  60. INACTIVE  
  61. INACTIVE  
  62. INACTIVE  
  63. INACTIVE  
  64. VALID      /home/oracle/flash_r  
  65.            ecovery_area/ORCL/ar  
  66.            chivelog  
  67.   
  68. STATUS     DESTINATION          ERROR  
  69. ---------- -------------------- --------------------   
  70.   
  71.   
  72. 11 rows selected.  
修改主库与备库的监听文件,添加SID_DESC条目:
  1. SID_LIST_LISTENER =  
  2.   (SID_LIST =  
  3.     (SID_DESC =  
  4.       (SID_NAME = PLSExtProc)  
  5.       (ORACLE_HOME = /home/oracle/product/10.2.0/db_1)  
  6.       (PROGRAM = extproc)  
  7.     )  
  8.     <span style="background-color: rgb(0, 153, 0);">(SID_DESC =  
  9.       (GLOBAL_DBNAME = orcl)  
  10.       (ORACLE_HOME = /home/oracle/product/10.2.0/db_1)  
  11.       (SID_NAME = orcl)  
  12.     )  
  13. </span>  
  14.   )  
  15.   
  16. LISTENER =  
  17.   (DESCRIPTION_LIST =  
  18.     (DESCRIPTION =  
  19.       (ADDRESS = (PROTOCOL = TCP)(HOST = target)(PORT = 1521))  
  20.     )  
  21.   )  

同样查询V$ARCHIVE_DEST或v$archive_dest_status:
SQL> select status,destination, error from v$archive_dest;
SQL> select error from v$archive_dest_status;
出现以下错误:
ORA-16009: remote archive log destination must be a STANDBY database   
修改 主库与备库的log_archive_dest_2 参数,添加valid_for=(online_logfiles,primary_role) 选项
  1. SQL>alter system set log_archive_dest_2='service=orcl_pd valid_for=(online_logfiles,primary_role) DB_UNIQUE_NAME=orcl_pd'  
  2.   scope=both;  
  3. SQL>alter system set log_archive_dest_2='service=orcl_st valid_for=(online_logfiles,primary_role) DB_UNIQUE_NAME=orcl_st'  
  4.   scope=both;  

更多Oracle相关信息见Oracle 专题页面 http://www.bkjia.com/topicnews.aspx?tid=12

相关内容