How do I convert a TNS entry that has a SID to instantclient format?
I'm able to connect with a TNS string but not with the equivalent (I thought!) instantclient string.
$ ./sqlplus 'myname/mypass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost.example.com)(PORT=1521))(CONNECT_DATA=(SID=mysid)))'
Connected to: ...
$ ./sqlplus myname/mypass@//myhost.example.com:1521/mysid
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Best Answer
Use your working connection that connects using the SID to find which services are in the database. If you are connected run:
and use one of the names you get to connect to.