I'm using OCI_connectioncreate to connect to ORACLE, all worked fine, when I was using SID on db description, but now, I need too use the Service_Name.
When I'm using sqlplus to connect, like below, all goes fine:
but, when I'm using de OCI_connectioncreate function, from OCILIB, with service_name,it give me this error:
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
Hello,
I'm using OCI_connectioncreate to connect to ORACLE, all worked fine, when I was using SID on db description, but now, I need too use the Service_Name.
When I'm using sqlplus to connect, like below, all goes fine:
sqlplus username/password@localhost:port/service_name
but, when I'm using de OCI_connectioncreate function, from OCILIB, with service_name,it give me this error:
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
OCI_ConnectionCreate("localhost:port/service_name","username","password",OCI_SESSION_DEFAULT);
Tried the tsname.ora syntax, same error...
Anyone have see this?
I'm tried every link from google, that had some advice :)
Thanks in advice
Sorry my English
Fabricio