Oracle: converting a TNS entry with SID to instantclient?
Вопрос
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
Решение
Use your working connection that connects using the SID to find which services are in the database. If you are connected run:
select name, blocked from v$active_services;
and use one of the names you get to connect to.
sqlplus myname/mypass@//myhost.example.com:1521/{a name from query}
Не связан с dba.stackexchange