2012-11-02 42 views
0

我在Windows Server 2008R2上運行Oracle 11g。我有一個客戶端應用程序(Zabbix)正在嘗試連接到其他地方。與即時客戶端連接時出現ora-12154問題

客戶機具有:

  • 甲骨文instantclient11.2-基本-11.2.0.3.0-1.i386.rpm
  • 甲骨文instantclient11.2-devel的-11.2.0.3.0 -1.i386.rpm

因此,它沒有sqlnet.ora或tnsnames.ora文件。它試圖建立與直接尋址的連接。隨着在php print語句,我看到它被調用

ociplogon(user,password,$connect); 

與連接被設置爲// dbhostmachine:1521/ZABBIX。所以一切看起來都不錯。

C:\Users\mdobrini> lsnrctl services 

LSNRCTL for 64-bit Windows: Version 11.1.0.7.0 - Production on 02-NOV-2012 13:00:55 

Copyright (c) 1991, 2008, Oracle. All rights reserved. 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbhostmachine.dddd.cccc.com)(POR 
Services Summary... 
Service "zabbix" has 1 instance(s). 
    Instance "zabbix", status READY, has 1 handler(s) for this service... 
    Handler(s): 
     "DEDICATED" established:578 refused:0 state:ready 
     LOCAL SERVER 
Service "zabbixXDB" has 1 instance(s). 
    Instance "zabbix", status READY, has 1 handler(s) for this service... 
    Handler(s): 
     "D000" established:0 refused:0 current:0 max:1022 state:ready 
     DISPATCHER <machine: dbhostmachine, pid: 6384> 
     (ADDRESS=(PROTOCOL=tcp)(HOST=dbhostmachine.dddd.cccc.com)(PORT=61396)) 
Service "zabbix_XPT" has 1 instance(s). 
    Instance "zabbix", status READY, has 1 handler(s) for this service... 
    Handler(s): 
     "DEDICATED" established:578 refused:0 state:ready 
     LOCAL SERVER 
The command completed successfully 

試圖連接本地正常工作:

SQL*Plus: Release 11.1.0.7.0 - Production on Fri Nov 2 13:06:31 2012 

Copyright (c) 1982, 2008, Oracle. All rights reserved. 

Enter user-name: SYSTEM 
Enter password: 

Connected to: 
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production 

SQL> connect uuu/[email protected]/zabbix 
Connected. 
SQL> 

然而,遠程我得到的流行錯誤:

ociplogon(): ORA-12154: TNS:could not resolve the connect identifier specified 

奇怪的是,這是間歇性地工作之前。我會得到一個錯誤關於我的應用程序每10秒:

30923:20121101:142237.595 [Z3001] connection to database '//dbhostmachine:1521/zabbix'  failed: [-1] ORA-12516: TNS:listener could not find available handler with matching protocol stack 
30923:20121101:142237.596 watchdog: database is down 

但肯定是在通過網絡發送的數據,並在數據庫中仍然存在。重新啓動應用程序和服務器後,我不再能夠獲得連接,並且正在研究ORA-12154

回答

0

ORA-12154是由DNS問題引起的。切換到IP地址後,消失。

ORA-12516是由數據庫上達到的最大會話數/進程數引起的。調整之後,以及一些PHP OCI8參數也消失了。

相關問題