sqldeveloper错误消息:网络适配器无法建立连接错误
我已通过系统上的 SQLDeveloper 连接到远程 Oracle 数据库。突然,停电了,我不得不重新启动系统。
现在,当我尝试连接到远程 Oracle 数据库时,它会抛出一条错误消息:
网络适配器无法建立连接。
供应商代码 20
谁能帮我解决这个问题吗?
I had made connection to the remote Oracle database through SQLDeveloper on my system. Suddenly, the 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(12)
https://forums.oracle.com/forums/thread.jspa?threadID=2150962
回复: SQL DevErr:网络适配器无法建立连接 VenCode20
发布时间:2011 年 12 月 7 日凌晨 3:23 回复:MehulDoshi 回复
这对我有用:
打开“新建/选择数据库连接”对话框,尝试将连接类型设置从“基本”更改为“TNS”,然后选择网络别名(对我来说:“ORCL”)。
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").
控制面板>管理工具>服务>
启动 OracleOraDb11g_home1TNSListener
Control Panel > Administrative Tools > Services >
Start OracleOraDb11g_home1TNSListener
检查侦听器状态以查看其是否已关闭:
ps -ef | grep tns
如果您没有看到有关侦听器的输出:
oracle 18244 /apps/oracle/product/11.2.0/db_1/bin/tnslsnr LISTENER -inherit
那么您将需要启动它。为此,请执行 lsnrctl 命令。
在
LSNRCTL>
提示符中键入start
。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 theLSNRCTL>
prompt.我花了好几个小时才建立了本地连接。所以想到要帮助你们。
第1步:检查位于的文件名listener.ora
C:\app\\product\12.1.0\dbhome_3\NETWORK\ADMIN
检查您的主机名、端口和服务并给出相同的时间
创建新的数据库连接。
第 2 步:如果这不起作用,请尝试这些组合,
PORT:1521
和
SID: orcl
给出 PORT: 和SID: orcl
给出PORT:1521
和SID: pdborcl
给出PORT:1521
和SID:admin
如果你得到错误为“用户名和密码错误”:
确保您提供了正确的用户名和密码,
如果仍然不起作用,请尝试以下操作:
用户名:系统密码:。
希望有帮助!!!!
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
and
SID: 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!!!!
我也遇到过同样的问题。我使用的是 Windows 7,这也应该适用于 Windows 8。当我查看任务管理器时,负责 TNS 侦听器和数据库的服务已停止。
1:按 Ctrl-Alt-Del 并选择“启动任务管理器”。
从那里转到“服务”选项卡。
为了正确访问数据库,需要运行 5 个服务。
在下面的列表中,“databasename”是您在创建过程中指定的数据库名称(不带引号)。
我也使用数据库 11g,如果您使用其他类型,下面的字段会有所不同。 home 后面的 * 是主安装,如果您有超过 1 个数据库,则会有 home1 和 home2
这些是 5 个服务
如果其中任何一个服务已停止,右键单击它们并启动它们。全部启动后,返回 SQL Developer 并重新尝试连接,它应该可以工作。
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
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.
如果您在使用远程 Oracle 数据库时遇到此类错误,您可以删除 tnsname 和侦听器,然后使用“主机名”或 IP 地址而不是“localhost”创建新配置。
例如
Listener.ora
tnsnames.ora
对我来说效果很好。
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
tnsnames.ora
It works fine for me.
在连接属性窗口中,我将选择从“SID”更改为“服务名称”,并将我的 SID 复制到“服务名称”字段中。不知道为什么会发生这种变化,也不知道为什么它会起作用,但它让我重新使用了 Oracle。
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.
问题 - 我无法通过 sql Developer 连接到数据库。
解决方案 - 首先要注意的是,SQL Developer 只是访问数据库的 UI。我需要连接远程数据库而不是本地主机,所以我不需要安装 oracle 8i/9i。我只需要安装oracle客户端。安装后,它在环境变量中获得了路径,例如C:\oracle\product\10.2.0\client_1\bin。我仍然无法连接数据库。
需要检查的事情。
如果所有点都对你来说没问题,那么检查你运行 sql Developer .exe 文件的位置。我将 sql Developer 文件夹粘贴到 C:\oracle 文件夹并从此处运行 .exe 文件,我可以连接数据库。我的“IO 错误:网络适配器无法建立连接”的问题得到了解决。快点...:):)
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.
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... :) :)
全新安装 Oracle 后出现此错误。
为了解决这个问题,我启动了网络配置助手(从开始菜单或bin文件夹中的netca.bat)并简单地添加了一个侦听器。
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.
对我来说这有效:
我刚刚在cmd中导航到这个路径
/d/Oracle/dbHome/NETWORK/ADMIN
然后运行命令 'lsnrctl start'
现在我可以建立联系了。
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.
这对我有用:
尝试使用 NETCA 删除旧侦听器,然后添加具有相同名称的新侦听器。
This worked for me :
Try deleting old listener using NETCA and then add new listener with same name.
检查服务器中的端口 1521。可能是被防火墙阻止了。或者禁用防火墙并尝试。
Check The port 1521 in your server. May be its blocked by firewall. Or disable firewall and try.