Oracle DG 歸檔設定驗證出現的問題
- --主庫
- SQL> col status for a10
- SQL> col destination for a20
- SQL> col error for a20
- SQL> SELECT STATUS,DESTINATION, ERROR FROM V$ARCHIVE_DEST;
-
- STATUS DESTINATION ERROR
- ---------- -------------------- --------------------
- VALID /home/oracle/flash_r
- ecovery_area/ORCL/ar
- chivelog
-
- ERROR orcl_st ORA-12514:
- TNS:listener does
- not currently know
- of service
- requested in
- connect descriptor
-
-
- STATUS DESTINATION ERROR
- ---------- -------------------- --------------------
- INACTIVE
- INACTIVE
- INACTIVE
- INACTIVE
- INACTIVE
- INACTIVE
- INACTIVE
- INACTIVE
-
- 10 rows selected.
-
- --備庫
- SQL> col status for a10
- SQL> col destination for a20
- SQL> col error for a20
- SQL> SELECT STATUS,DESTINATION, ERROR FROM V$ARCHIVE_DEST;
-
- STATUS DESTINATION ERROR
- ---------- -------------------- --------------------
- VALID /home/oracle/flash_r
- ecovery_area/ORCL/ar
- chivelog
-
- ERROR orcl_pd ORA-12514:
- TNS:listener does
- not currently know
- of service
- requested in
- connect descriptor
-
-
- STATUS DESTINATION ERROR
- ---------- -------------------- --------------------
- INACTIVE
- INACTIVE
- INACTIVE
- INACTIVE
- INACTIVE
- INACTIVE
- INACTIVE
- INACTIVE
- VALID /home/oracle/flash_r
- ecovery_area/ORCL/ar
- chivelog
-
- STATUS DESTINATION ERROR
- ---------- -------------------- --------------------
-
-
- 11 rows selected.
修改主庫與備庫的監聽檔案,添加SID_DESC條目:
- SID_LIST_LISTENER =
- (SID_LIST =
- (SID_DESC =
- (SID_NAME = PLSExtProc)
- (ORACLE_HOME = /home/oracle/product/10.2.0/db_1)
- (PROGRAM = extproc)
- )
- <span style="background-color: rgb(0, 153, 0);">(SID_DESC =
- (GLOBAL_DBNAME = orcl)
- (ORACLE_HOME = /home/oracle/product/10.2.0/db_1)
- (SID_NAME = orcl)
- )
- </span>
- )
-
- LISTENER =
- (DESCRIPTION_LIST =
- (DESCRIPTION =
- (ADDRESS = (PROTOCOL = TCP)(HOST = target)(PORT = 1521))
- )
- )
同樣查詢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) 選項
- SQL>alter system set log_archive_dest_2='service=orcl_pd valid_for=(online_logfiles,primary_role) DB_UNIQUE_NAME=orcl_pd'
- scope=both;
- SQL>alter system set log_archive_dest_2='service=orcl_st valid_for=(online_logfiles,primary_role) DB_UNIQUE_NAME=orcl_st'
- scope=both;
更多Oracle相關資訊見Oracle 專題頁面 http://www.bkjia.com/topicnews.aspx?tid=12