Home >Backend Development >PHP Tutorial >诡异异常! adodb连接oracle 出错 但是用PL/SQl能正常连接

诡异异常! adodb连接oracle 出错 但是用PL/SQl能正常连接

WBOY
WBOYOriginal
2016-06-13 09:59:461147browse

诡异错误!! adodb连接oracle 出错 但是用PL/SQl能正常连接
Warning: ocilogon() 
\adodb\drivers\adodb-oci8.inc.php on line 244

172.17.66.11:1521: ORA-12505: TNS: 监听程序当前无法识别连接描述符中所给出的 SID

tnsnames.ora配置如下

KFDBRAC =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.66.11)(PORT = 1521))
  )
  (CONNECT_DATA =
  (SERVICE_NAME = kfdbrac)
  )
  )

listener.ora配置如下
LISTENER =
  (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
  (ADDRESS = (PROTOCOL = TCP)(HOST = admin-PC)(PORT = 1521))
  )
  )
self::$conn = &ADONewConnection("oci8");
self::$conn->Connect('172.17.66.11:1521','tyyy','tyyy','KFDBRAC');

172.17.66.11上做了数据集群。



------解决方案--------------------
kfdbrac
------解决方案--------------------
那你改用 ocr 试试
我没在 adodb + oci8 方式下连接过 oracle

值用过 PDO + ocr 方式的
------解决方案--------------------
ado+oracle 高啊。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn