【DataGuard】傳遞迴檔日誌是遇到ORA-12514

楊奇龍發表於2011-08-28
檢視dataguard 備庫報警日誌的時候發現有ORA-12514: TNS:listener does not currently know of service requested in connect descriptor 錯誤~!
錯誤的意思是listener 不知道連線解析器中的請求服務,這裡要說靜態監聽和動態監聽了。
動態註冊是在instance啟動的時候PMON程式根據init.ora中的instance_name,service_names兩個引數將例項和服務動態註冊到listener中。
靜態註冊就是例項啟動時讀取listener.ora檔案的配置,將例項和服務註冊到監聽程式。無論何時啟動一個資料庫,預設地都有兩條資訊註冊到監聽器中:資料庫伺服器對應的例項和服務。
搭建dataguard過程中,先啟動的資料庫,沒有在listener.ora 中設定靜態監聽。重新設定後。
# listener.ora Network Configuration File: /opt/oracle/10.2.0/orcl/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = orclpdg)
      (ORACLE_HOME = /opt/oracle/10.2.0/orcl)
    )
 --增加如下內容
    (SID_DESC =  
      (SID_NAME  = PLSExtProc)   
      (ORACLE_HOME = /opt/oracle/10.2.0/orcl)          
      (PROGRAM   =  extproc) 
    )   
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.250.7.230 )(PORT = 1521))
    )
  )                                                                                                                                               
"listener.ora" 24L, 609C 已寫入                                                
oracle@yangDB2:/opt/oracle/10.2.0/orcl/network/admin>lsnrctl
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 25-AUG-2011 09:50:13
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                24-AUG-2011 21:13:15
Uptime                    0 days 12 hr. 37 min. 2 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/10.2.0/orcl/network/admin/listener.ora
Listener Log File         /opt/oracle/10.2.0/orcl/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.250.7.230)(PORT=1521)))
Services Summary...
Service "orclpdg" has 1 instance(s).
  Instance "orclpdg", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                24-AUG-2011 21:13:15
Uptime                    0 days 12 hr. 37 min. 12 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/10.2.0/orcl/network/admin/listener.ora
Listener Log File         /opt/oracle/10.2.0/orcl/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.250.7.230)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orclpdg" has 1 instance(s).
  Instance "orclpdg", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> exit

再次檢視告警日誌檔案
oracle@yangDB2:/opt/oracle/std_arch>tf
Fetching gap sequence in thread 1, gap sequence 46-46
FAL[client, MRP0]: Error 12514 connecting to orcl for fetching gap sequence
Thu Aug 25 09:24:32 2011
Errors in file /opt/oracle/admin/orcl/bdump/orclpdg_mrp0_10763.trc:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor --修改之前的
Thu Aug 25 09:24:57 2011
RFS[1]: Archived Log: '/opt/oracle/std_arch/log1_46_758478551.arc'
Thu Aug 25 09:25:02 2011
Media Recovery Log /opt/oracle/std_arch/log1_46_758478551.arc
Media Recovery Waiting for thread 1 sequence 47 (in transit)
Thu Aug 25 09:51:15 2011
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 4: '/opt/oracle/oradata/orclpdg/redo04.log'
Thu Aug 25 09:51:18 2011
Media Recovery Log /opt/oracle/std_arch/log1_47_758478551.arc
Media Recovery Waiting for thread 1 sequence 48 (in transit)
Thu Aug 25 10:02:08 2011
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 5: '/opt/oracle/oradata/orclpdg/redo05.log'
Thu Aug 25 10:02:08 2011
沒有ORA-12514報錯了!

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22664653/viewspace-706047/,如需轉載,請註明出處,否則將追究法律責任。

相關文章