I am trying to connect with Oracle database from a server having Oracle client installed (RHEL Linux Environment). I installed DB Visualizer on client machine. But getting listner error on hitting connect button.

I have tried TNSPING and connecting through SQL Plus and both are fine. What's the possible cause of the error in DBViz? How can I fix it?

DB Connectivity Detail:

enter image description here

TNS Ping

[root@bvqa-emmcas01 bin]# ./tnsping CMSQA
    Used TNSNAMES adapter to resolve the alias
    OK (10 msec)

SQL Plus Connectivity

[root@bvqa-emmcas01 bin]# ./sqlplus temcsys/<password>@CMSQA
    SQL*Plus: Release Production on Tue Mar 24 00:08:35 2015
    Release Production on Tue Mar 24 00:08:35 2015
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release - 64bit Production


    (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))

Error in DB Visualzier

Long Message:
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

1 Answer 1


TNS Ping does not care about service or SID, all it checks is the availability of the listener, so this does not mean your connection string is correct. Connecting through SQL*Plus successfully however confirms it.

Your tnsnames.ora uses SERVICE_NAME in CONNECT_DATA, but your JDBC URL uses the SID syntax. SID and service name are different concepts, and their value can be different. In your case, you can connect with CMSQA provided as service name, but not as SID.

In this syntax, CMSQA means SID:


To use it as a service name, your connection string should be:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.