一次DG搭建過程中碰到的問題
原本這次去客戶現場只是做一次簡單的巡檢,正巧碰到客戶在搭建DG,順便協助客戶搭建。本來是一次很正常的搭建過程,而且對於DG的搭建也算是一名標準的熟練工。卻碰到了一個比較奇怪的問題
在全部搭建完成後,開啟了傳輸程式:
alter system set log_archive_dest_state_2=enable;
但是日誌切換過程中,備庫並沒有接收到傳輸過來的日誌
檢查檢視:
SQL> select error,destination from v$archive_dest;
ERROR
-----------------------------------------------------------------
DESTINATION
--------------------------------------------------------------------------------
/arch ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
同時在後臺的alert日誌中看到如下錯誤:
Error 12154 received logging on to the standby
FAL[server, ARC0]: FAL archive failed, see trace file.
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance addr - Archival Error. Archiver continuing.
但是我們檢測連線串,發現並沒有發現問題:
tnsping沒有問題
[oracle@addr ~]$ tnsping addrdg
TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 09-APR-2015 20:25:56
Copyright (c) 1997, 2011, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.166.209)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = addrdg)))
OK (0 msec)
直接連線備庫也沒有問題:
[oracle@addr ~]$ sqlplus "sys/oracle@addrdg as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 9 20:26:17 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
檢查密碼檔案,系統防火牆,安全協議也沒有問題
到這裡,似乎走進了死衚衕,於是乎,我們去檢查系統產生的詳細的arch程式的跟蹤檔案:
Redo shipping client performing standby login
*** 2015-04-09 14:30:05.701
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
'
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
'
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
'
*** 2015-04-09 14:30:05.702 4320 krsh.c
Error 12154 received logging on to the standby
Detailed OCI error val is 12154 and errmsg
這個報錯似乎定位的更加精確
對以上的報錯,我們檢索了MOS,從這個報錯的定位來看,我認為應該可以在MOS上發現一定的蛛絲馬跡,果然,發現如下文件:
Adding an new Standby fails with error Ora-12154: TNS:could not resolve the connect identifier specified (文件 ID 1240558.1)
CAUSE
After adding a new standby database, a corresponding new TNS alias entry was added to the tnsnames.ora on the primary node, but neither the instance nor the archiver processes were restarted.
The ARC processes read the tnsnames.ora only once during process initialization, any updates to the tnsnames.ora after startup will not be known to the ARC process and hence the error
ORA-12154: TNS:could not resolve the connect identifier specified
is reported when the ARC processes try to resolve the (new) value for the 'service' attribute.
SOLUTION
1. Shutdown and restart the primary database instance.
This will cause a (short) outage of the primary database and may not be feasible for this reason.
2. Use a connect descriptor for the 'service' parameter.
Instead of using a TNS alias for the service parameter (which requires a lookup of the tnsnames.ora file) one can use the connect descriptor itself.
Assume the following (new) entry in the tnsnames.ora on the primary node:
REMOTE_DEST_NEW = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = standbynode)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = STDBY) ) )
從以上資訊看,似乎需要重啟資料庫才可以,但是作為生產資料庫,並不是說重啟就可以的。那我可以考慮新建一個傳輸程式
之前我們設定的是log_archive_dest_2。我們重置該引數,設定log_archive_dest_3引數
alter system set log_archive_dest_3=service="(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.166.209)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = addrdg)))" ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=addrdg' scope=both;
alter system set log_archive_dest_state_3 = enable;
重置後,比較幸運,並不需要重啟資料庫,歸檔就及時傳送過去,且沒有報錯。
------------------------------------------------------------------------------------
原部落格地址:http://blog.itpub.net/23732248/
原作者:應以峰 (frank-ying)
-------------------------------------------------------------------------------------
在全部搭建完成後,開啟了傳輸程式:
alter system set log_archive_dest_state_2=enable;
但是日誌切換過程中,備庫並沒有接收到傳輸過來的日誌
檢查檢視:
SQL> select error,destination from v$archive_dest;
ERROR
-----------------------------------------------------------------
DESTINATION
--------------------------------------------------------------------------------
/arch ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
同時在後臺的alert日誌中看到如下錯誤:
Error 12154 received logging on to the standby
FAL[server, ARC0]: FAL archive failed, see trace file.
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance addr - Archival Error. Archiver continuing.
但是我們檢測連線串,發現並沒有發現問題:
tnsping沒有問題
[oracle@addr ~]$ tnsping addrdg
TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 09-APR-2015 20:25:56
Copyright (c) 1997, 2011, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.166.209)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = addrdg)))
OK (0 msec)
直接連線備庫也沒有問題:
[oracle@addr ~]$ sqlplus "sys/oracle@addrdg as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 9 20:26:17 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
檢查密碼檔案,系統防火牆,安全協議也沒有問題
到這裡,似乎走進了死衚衕,於是乎,我們去檢查系統產生的詳細的arch程式的跟蹤檔案:
Redo shipping client performing standby login
*** 2015-04-09 14:30:05.701
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
'
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
'
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
'
*** 2015-04-09 14:30:05.702 4320 krsh.c
Error 12154 received logging on to the standby
Detailed OCI error val is 12154 and errmsg
這個報錯似乎定位的更加精確
對以上的報錯,我們檢索了MOS,從這個報錯的定位來看,我認為應該可以在MOS上發現一定的蛛絲馬跡,果然,發現如下文件:
Adding an new Standby fails with error Ora-12154: TNS:could not resolve the connect identifier specified (文件 ID 1240558.1)
CAUSE
After adding a new standby database, a corresponding new TNS alias entry was added to the tnsnames.ora on the primary node, but neither the instance nor the archiver processes were restarted.
The ARC processes read the tnsnames.ora only once during process initialization, any updates to the tnsnames.ora after startup will not be known to the ARC process and hence the error
ORA-12154: TNS:could not resolve the connect identifier specified
is reported when the ARC processes try to resolve the (new) value for the 'service' attribute.
SOLUTION
1. Shutdown and restart the primary database instance.
This will cause a (short) outage of the primary database and may not be feasible for this reason.
2. Use a connect descriptor for the 'service' parameter.
Instead of using a TNS alias for the service parameter (which requires a lookup of the tnsnames.ora file) one can use the connect descriptor itself.
Assume the following (new) entry in the tnsnames.ora on the primary node:
REMOTE_DEST_NEW = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = standbynode)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = STDBY) ) )
從以上資訊看,似乎需要重啟資料庫才可以,但是作為生產資料庫,並不是說重啟就可以的。那我可以考慮新建一個傳輸程式
之前我們設定的是log_archive_dest_2。我們重置該引數,設定log_archive_dest_3引數
alter system set log_archive_dest_3=service="(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.166.209)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = addrdg)))" ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=addrdg' scope=both;
alter system set log_archive_dest_state_3 = enable;
重置後,比較幸運,並不需要重啟資料庫,歸檔就及時傳送過去,且沒有報錯。
------------------------------------------------------------------------------------
原部落格地址:http://blog.itpub.net/23732248/
原作者:應以峰 (frank-ying)
-------------------------------------------------------------------------------------
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23732248/viewspace-1558544/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORACLE RAC TO RAC DG搭建過程中可能遇到的問題Oracle
- Oracle 12c PDB中碰到的DG問題Oracle
- Cacti監控MySQL實現過程中碰到的問題解彙總MySql
- Oracle RAC之--安裝過程中碰到的問題及解決方法Oracle
- ora11_node_dg(1)DG搭建過程
- iOS 彈幕開發過程碰到的問題總結iOS
- oracle 19c dg搭建duplicate過程中報錯Oracle
- 搭建dataguard碰到的幾個小問題
- 一次DG故障診斷過程分析
- 開發過程中碰到有導航無導航之間的跳轉問題
- oracle817在AIX5L安裝過程中碰到的幾個問題OracleAI
- 記錄一次XTTS遷移碰到的問題TTS
- 記一次OOM問題排查過程OOM
- 一次線上問題的排查解決過程
- 一次IO效能問題的發現過程
- 【RAC】 RAC For W2K8R2 安裝--安裝過程中碰到的問題(九)
- 偶發的儲存過程呼叫效能問題的一次調優過程儲存過程
- 爬蟲過程中遇到的問題爬蟲
- webpack碰到的問題Web
- 一次ygc越來越慢的問題排查過程GC
- 記一次 Composer 問題的解決過程!!
- 記一次線上崩潰問題的排查過程
- 11g兩個節點RAC搭建單例項DG過程問題以及解決方法單例
- 在學習play framework中碰到的問題Framework
- 一次IOS通知推送問題排查全過程iOS
- 一次線上問題處理過程記錄
- 一次Row Cache Lock問題處理過程
- 安裝yeoman,grunt過程中的問題
- 學習vue過程中遇到的問題Vue
- STATSPACK安裝過程中遇到的問題
- 一次「找回」TraceId的問題分析與過程思考
- Hodoop碰到的問題628OdooOOP
- 記一次wordpress安裝過程中遇到的問題及解決辦法
- Android 通過httpclient 呼叫碰到的問題總結AndroidHTTPclient
- Oracle 11g Data Guard搭建過程中問題解決兩例Oracle
- 搭建rtmp流媒體伺服器過程中遇到的一個小問題伺服器
- 電商APP測試過程中遇到的問題APP
- Vue 實踐過程中的幾個問題Vue