Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

The Network Adapter could not establish the connection

701126May 13 2009 — edited May 13 2009
I am trying to connect to Oracle 11 DB from Squirrel SQL.
I am using proper steps but getting this error:
java.sql.SQLRecoverableException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:101)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:458)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:411)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:490)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:202)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:465)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.execute(OpenConnectionCommand.java:97)
at net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.run(ConnectToAliasCommand.java:280)
at net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
at java.lang.Thread.run(Unknown Source)


My SQL Plus is working fine and
select INSTANCE_NAME from V$INSTANCE; gives me "orcl"

and my id/password is also okay.


On command prompt also-it's working fine:
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>lsnrctl

LSNRCTL for 64-bit Windows: Version 11.1.0.6.0 - Production on 12-MAY-2009 23:54
:36

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> help
The following operations are available
An asterisk (*) denotes a modifier or extended command:

start stop status
services version reload
save_config trace change_password
quit exit set*
show*

LSNRCTL> start
Starting tnslsnr: please wait...

TNSLSNR for 64-bit Windows: Version 11.1.0.6.0 - Production
System parameter file is D:\app\product\11.1.0\db_1\network\admin\listener.ora
Log messages written to d:\app\diag\tnslsnr\Ayush-PC\listener\alert\log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)
))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.4)(PORT=1521))
)

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.1.0.6.0 - Produ
ction
Start Date 12-MAY-2009 23:55:19
Uptime 0 days 0 hr. 0 min. 4 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\app\product\11.1.0\db_1\network\admin\listener.ora
Listener Log File d:\app\diag\tnslsnr\Ayush-PC\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.4)(PORT=1521)))
The listener supports no services
The command completed successfully
LSNRCTL>



But getting this error.

I am using right DB driver at D:\app\product\11.1.0\db_1\jdbc\lib\ojdbc6.jar which is 1932 KB

and i have this DB:

SQL*Plus: Release 11.1.0.6.0 - Production on Tue May 12 23:31:58 2009

on windows vista

This is my connection string
jdbc:oracle:thin:@localhost:1521:orcl

also i checked the services and TNSListener is also working fine
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 10 2009
Added on May 13 2009
1 comment
2,765 views