Able to connect through CMD but not to Oracle SQL developer to Oracle DB

how to connect to oracle database using sql developer
sql developer not connecting to oracle database
network adapter could not establish the connection in sql developer
status : failure -test failed: io error: the network adapter could not establish the connection
pl/sql developer not connected to oracle
how to connect to oracle database using sql command line
how to connect to oracle database using sqlplus
sql developer hangs on connection

So I got connected to Oracle 11g in cmd as follows

However, when I type the same username and password in Oracle SQL Developer, it does not work. And I have uname and pwd, what goes in the connection name?

This what I got, when i entered a connection name and My uname and PWD Oracle SQL Developer

Just give any string in your connection name, that is used for identify different connection in sql developer.

Like,

Connection name : Connection_1
username : system
password : yourpass

If you want to create another connection to another database or another schema then you have to give another name and by login you can directly access that particular schema.

Hope it will help.

This seems to be a hostname resolution problem. Please try to connect to the IP address instead of the hostname. If this is not the solution could you please post  eTour.com is the newest place to search, delivering top results from across the web. Content updated daily for sql database developer.

I think the issue might be that SQL Developer uses a different tnsnames.ora file. The file can be set under:

Tools>Preferences>Database>Advanced

Choose the correct tnsnames directory there. Depending on your developer version, you might also want to set the Oracle Client folder.

After that in your connection dialog choose TNS instead of BASIC. And pick the tnsalias name from the list from the file.

Let me know if that works.

How do I connect to a different database in Oracle? - didnt give us what tool you were using when you said "but I am able to connect through windows cmd command", because the "cmd" command definitely cannot natively talk to an oracle database - didnt give us the version of sql developer - didnt tell us how you were trying to connect (basic, tns, etc etc) - didnt give us much at all.

I also faced the same issue and after trying series of steps came to this conclusion.

1)Make sure to follow the blog to install the DB and check the validation steps too : https://www.oracle.com/webfolder/technetwork/tutorials/obe/db/12c/r1/Windows_DB_Install_OBE/Installing_Oracle_Db12c_Windows.html

This blog makes sure that you are able to connect to SQL via CMD.

2) If you still face issue while connecting to SQL developer for the same configuration,check : Advanced system settings-->Environment variables-->system variables--> PATH

Make sure you have entry for the DB here. Environment variable for DB

3) If above step is a success,check the tnsnames.ora and listener.ora files present in the location : dbhome_1\network\admin

These files should have a valid entry for the localhost and SID/service name.

Thanks, Sandeep

I am unable to connect to oracle database using SQL DEVELOPER but I am able to connect through windows cmd command. It gives me error i/o error network adapter could not establish connection. vendor code 17002. This blog makes sure that you are able to connect to SQL via CMD. 2) If you still face issue while connecting to SQL developer for the same configuration,check : Advanced system settings-->Environment variables-->system variables--> PATH. Make sure you have entry for the DB here. Environment variable for DB

SQL*Plus is a client program with which you can access Oracle Database. At the command prompt, type sqlplus and press the key Enter. If SQL Developer is not installed on your system, see Oracle Database SQL Developer User's Guide​  SQL Developer is a client program with which you can access Oracle Database. This section assumes that SQL Developer is installed on your system, and shows how to start it and connect to Oracle Database. If SQL Developer is not installed on your system, see Oracle Database SQL Developer User's Guide for installation instructions.

SQL Developer is a client program with which you can access Oracle Database. If you are not connected to Oracle Database as user HR from SQL*Plus, see With SQL*Plus, you can use the SQL*Plus command DESCRIBE to view the  Creating a SQL Developer Connection When the Listener Port Is Blocked. If the listener port has not been unblocked by enabling the ora_p2_dblistener access rule, you can define an SSH connection in Oracle SQL Developer 4.0.3 or later, with functionality to connect to a database through port forwarding.

For information about using database connections in SQL Developer, see the section Oracle Database XE supports connections between the SQL Command Line You can install Oracle Database XE separately on remote computers. It is To connect remotely, you must supply not just a user name and password, but a  To find out the tnsnames.ora go the the Oracle installation folder where the Oracle software is installed in the installation location you will find a folder called as network under network there will be a folder admin which contains the Oracle networking files (Listenet.ora,tnsnames.ora,sqlnet.ora), if you have taken default path of 10g then

Comments
  • check your ORACLE_HOME path. I guess there are two oracle directories. check in which directory TNS file is present.
  • there is no ORACLE_HOME .can you tell me how to set it, or refer to link if already exist.
  • yeah, set ORACLE_HOME and give path your oracle directory.
  • Should it be something like this in cmd set ORACLE_HOME=C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora