ORA-12560: TNS: PROTOCOL ADAPTER ERROR PHP, ORACLE, WAMP

1k views Asked by At

I am trying to connect to an oracle database on a remote server with php but it throws a warning: ora-12560 so I can't get connected with php but I can with toad for oracle, I am using odbc and I already set up my driver with microsoft odbc administrator:

I used odbc_connect(ConnectionString, UserID, UserPassword) in php

ConnectionString = Driver={Oracle en OraClient10g_home1};Server=xxx.xx.x.xxx;Port=1521;Database=xxxxxx;

I don't have access to the server where the database is located but I don't think the oracle service is down because I can connect with toad so it must be another thing. Here in my client I can make tnsping successful too.

Here is my tnsnames.ora

xxxxxx =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xx.x.xxx)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = xxxxxx)
    )
  )
1

There are 1 answers

3
Bjarte Brandt On

Are you connecting to an Oracle RAC environment?

I have had issues like the one you describe when instance parameter local_listener is using a simplified notation like "dbnode-vip:1521" instead of "(ADDRESS=(PROTOCOL=TCP)(HOST=dbnode-vip)(PORT=1521))".

You can test this scenario by accessing the vip-address directly:

xxxxxx = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ip-of-the-dbnode-vip-address)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = xxxxxx) ) )

Another possible solution would be to utilize a newer version of your Oracle Client software. 10g is like Windows XP. Who uses such old de-supported software?