0

I am using Zend Framework 1 and connecting Oracle Database using Zend_Db_Adapter_Oracle class (it uses the php_oci8 extension).

While connecting with Oracle Server it throwing below error:

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

However, When I use Zend_Db_Adapter_Pdo_Oci class (It uses pdo_oci driver) all works fine, The only issue with pdo_oci extencion is that I am not able to fetch values of the columns those have define as CLOB data type. Also found this saying there is some issue with CLOB datatype if using pdo_coi. That's why I am looking forward for php_oci8 extension.

Any help to fix the issue appreciated.

Thank You.

Community
  • 1
  • 1
Irfan.gwb
  • 668
  • 2
  • 13
  • 35
  • Need more information. Please output the connect string – Bjarte Brandt Aug 10 '15 at 16:40
  • @Bjarte, Thank for commentating. After you comment i looked for connection string for php_oci8 and change it to pdo_oci formate like below. Ex: (DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.XX.XXX)(PORT = 1521)))(CONNECT_DATA=(SID=XXXX))) and it works. Thank for clue :) – Irfan.gwb Aug 12 '15 at 09:56

1 Answers1

0

Found the way to make it work.

I change the database parameter to below format and pass it:

$database = (DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.XX.XXX)(PORT = 1521)))(CONNECT_DATA=(SID=XXXX)))

It works perfectly, Now able to fetch CLOB data type values.

Irfan.gwb
  • 668
  • 2
  • 13
  • 35