I had made connection to the remote Oracle database through SQLDeveloper on my system. Suddenly, t开发者_JS百科he power went down and I had to restart the system.
Now, when I am trying to connect to the remote oracle database, it's throwing an error message:
The Network adapter could not establish the connection.
Vendor code 20
Can anyone help me solving this problem?
https://forums.oracle.com/forums/thread.jspa?threadID=2150962
Re: SQL DevErr:The Network Adapter could not establish the connection VenCode20 Posted: Dec 7, 2011 3:23 AM in response to: MehulDoshi Reply
This worked for me:
Open the "New/Select Database Connection" dialogue and try changing the connection type setting from "Basic" to "TNS" and then selecting the network alias (for me: "ORCL").
Control Panel > Administrative Tools > Services >
Start OracleOraDb11g_home1TNSListener
Check the listener status to see if it is down:
ps -ef | grep tns
If you don't see output about the listener:
oracle 18244 /apps/oracle/product/11.2.0/db_1/bin/tnslsnr LISTENER -inherit
Then you will need to start it up. To do this, execute the lsnrctl
command.
Type start
in the LSNRCTL>
prompt.
I just created a local connection by breaking my head for hours. So thought of helping you guys.
Step 1: Check your file name listener.ora located at
C:\app\\product\12.1.0\dbhome_3\NETWORK\ADMIN
Check your HOSTNAME, PORT AND SERVICE and give the same while creating new database connection.
Step 2: if this doesnt work, try these combinations give
PORT:1521
andSID: orcl
give PORT: andSID: orcl
givePORT:1521
andSID: pdborcl
givePORT:1521
andSID: admin
If you get the error as "wrong username and password" :
Make sure you are giving correct username and password
if still it doesnt work try this: Username :system Password: .
Hope it helps!!!!
I have had the same problem. I am using windows 7 and this should also work for windows 8. The services responsible for the TNS listener and database were stopped when I looked in the Task Manager.
1: Hit Ctrl-Alt-Del and select "Start Task Manager".
From there go to the "Services" tab.
There are 5 services that need to be running for the database to be accessed correctly.
In the list below "databasename" is the database name you assigned during creation without the quotes.
I am also using database 11g, if you are using another type those fields would be different below. the * after home is the home install, if you have more than 1 database there would be home1, and home2
These are the 5 services
- OracleVssWriter"databasename"
- OracleService"databasename"
- OracleOraDb11g_home*TNSListener
- OracleOraDb11g_home*ClrAgent
- OracleDBConsole"databasename"
If any of these services are stopped right click on them and start them. After they have all started go back into SQL developer and re-try the connection and it should work.
If you have such error when using remote oracle database, you can delete your tnsname and listener then create new config with "hostname" or ip address instead of "localhost". such as listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
)
tnsnames.ora
DB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DB)
)
)
It works fine for me.
In the connection properties window I changed my selection from "SID" to "Service Name", and copied my SID into the Service Name field. No idea why this change happened or why it worked, but it got me back on Oracle.
Problem - I was not able to connect to DB through sql developer.
Solution - First thing to note is that SQL Developer is only UI to access to your database. I need to connect remote database not the localhost so I need not to install the oracle 8i/9i. Only I need is oracle client to install. After installation it got the path in environment variable like C:\oracle\product\10.2.0\client_1\bin. Still I was not able to connect the db.
Things to be checked.
- Listner/port should be up for the server IP where you want to connect.
- you will be able to ping the server. go to cmd prompt. type ping server Ip then enter.
- telnet the server IP and port. should be succesful.
If all points are ok for you then check from where you are running sql developer .exe file. I pasted sql developer folder to C:\oracle folder and run the .exe file from here and I am able to connect the database. and my problem of 'IO Error: The Network Adapter could not establish the connection' got resolved. Hurrey... :) :)
I had this error after fresh Oracle installation.
To fix this I've launched Net configuration assistant (from start menu or netca.bat in the bin folder) and simply added a Listener.
This worked for me :
Try deleting old listener using NETCA and then add new listener with same name.
Check The port 1521 in your server. May be its blocked by firewall. Or disable firewall and try.
For me this worked : I just navigated to this path in cmd /d/Oracle/dbHome/NETWORK/ADMIN
and then run command 'lsnrctl start' and now I am able to make a connection.
精彩评论