0

I am new on Oracle and stuck in a problem for almost a week, I am trying to connect to an oracle database through TOAD, i am able to direct login through SID and Service Name using toad Application itself .

But i have a requirement to use a custom launcher for toad which launches the application from command line which directly connects to OracleDB.

I am able to connect to Oracle DB using the following command through SID

C:\toad.exe -c Username/Passwd@host:port/SID (Works Perfectly) The above command launches the TOAD app and connects me to the Oracle DB through SID.

But when I try to pass the DB Servicename instead of SID it is giving me the following error I did a lot of R&D and no relevant solution.

ora-12505 tns listener does not currently know of SID"given in connect descriptor

Discussion with DB Team

I discussed with DB team according to them Toad.exe is not accepting the "ServiceName" as an argument and according to them the issue is not at their end as toad application itself connects to the database through both SID and Service Name.

Please Help.

  • As pointed out in @Sam answer, it appears from your syntax that you are already connecting via service name. It would be the rare database for which at least one service name wasn't the same as the SID. – EdStevens Jul 29 '20 at 21:39
  • @EdStevens I am able to connect through the SID, they have provided a SID and a service name in my case Service Name is MOCK, and SID is MOCK1.. i am able to connect through the SID but not with the given service name. – Mohsin Ali Jul 29 '20 at 21:50

2 Answers2

0

The syntax you have listed user/pass@host:port/service is for service connection only. For SID connections it is user/pass@host:port:SID

You are probably already connecting using service name. To be sure, you can ask you DBA to provide you the DB SID and listing of parameter services_names from the database.

Sam
  • 404
  • 4
  • 7
  • Sam It is SID i have Double checked it, DBAs have provided me a SID and a Service name and i able to connect to the DB through toad with both SID and Service name, I am facing this issue only when tried to launch the connection from Command line. when i use the SID in the same command it connects but not with service name – Mohsin Ali Jul 29 '20 at 22:11
  • Normally, there are multiple services for Oracle DB, SID is mostly part of the service. Can you check your parameter service_names ? – Sam Jul 29 '20 at 22:36
0

The issue was resolved by launching the toad using the following parameter

C:\toad.exe -c user/password@service_name