我如何解决从读取调用 oracle sql 开发人员那里得到的减一?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30730644/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 00:53:30  来源:igfitidea点击:

How can i solve Got minus one from a read call oracle sql developer?

oracleoracle-sqldeveloper

提问by behzad razzaqi

When i run the sql developer and set the all data,click the connect but i get this error:

当我运行 sql developer 并设置所有数据时,单击连接但我收到此错误:

Status : Failure -Test failed: IO Error: Got minus one from a read call


I'm beginner in Oracle ,how can i solve that error?
my windows:7 64bit and oracle 12c
enter image description here


我是 Oracle 的初学者,我该如何解决该错误?
我的 Windows:7 64 位和 oracle 12c
在此处输入图片说明

回答by Aditi Mane

I got the same issue but following steps worked for me, it seems Gaurav also has shared it already:

我遇到了同样的问题,但以下步骤对我有用,似乎 Gaurav 也已经分享了它:

1.Go to the folder where you have installed the database (Like: F:\app)
2.Here you will be able to see many folders, go to product.2.0("your databse version")\dbhome_1\NETWORK\ADMIN
3.find listener.ora file and open as text file
4.Check for the port number in that file
5.Now provide that port number while doing connection in sql developer.

回答by Popeye

You need set "tcp.validnode_checking= no" or comment this parameter in sqlnet.ora file then restartlisteneron db server and test again.

您需要在 sqlnet.ora 文件中设置“ tcp.validnode_checking= no”或注释此参数,然后重新启动数据库服务器上的侦听器并再次测试。

Try it.

尝试一下。

回答by Kris Rice

From your inputs in the dialog, you are using port 5500. That port is what is used for EM Express. It answers to HTTPs traffic only. So in this case the -1 error message means the protocol negotiation failed. SQLDEV is trying to talk SQL*NET to something listening for HTTPs.

根据对话框中的输入,您使用的是端口 5500。该端口用于 EM Express。它仅响应 HTTPS 流量。所以在这种情况下 -1 错误消息意味着协议协商失败。SQLDEV 正在尝试将 SQL*NET 与侦听 HTTP 的对象进行对话。

The port you are looking for is 1521 if it wasn't altered. If it was check the $ORACLE_HOME/network/admin/listener.ora for the proper port number.

如果未更改,您要查找的端口是 1521。如果是检查 $ORACLE_HOME/network/admin/listener.ora 以获取正确的端口号。

回答by József K?kény

回答by Marcin

Most of the answers out there for this problem point to using the wrong PORT number in your connection options, or similar. In my case, after a couple hours of searching, the reason showed to be something else.

这个问题的大部分答案都指向在您的连接选项或类似选项中使用了错误的端口号。就我而言,经过几个小时的搜索,原因表明是其他原因。

Mind which user you are using when starting Oracle listener. You should do it with the oracleuser, not as root. Otherwise you end up with listener files being created as e.g. user deamongroup rootinstead of user oraclegroup dba. This in turn leads to:

请注意您在启动 Oracle 侦听器时使用的是哪个用户。您应该使用oracle用户而不是root 来执行此操作。否则,您最终会创建侦听器文件,例如用户deamonroot而不是用户oracledba。这反过来又导致:

TNS-12555: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   Linux Error: 1: Operation not permitted

To check whether this is the case, go to

要检查是否是这种情况,请转到

/var/tmp/.oracle

and list all files (ls -la). If you find out some of the s#* files being created by a root-group user, stop the listener (lsnrctl stop), delete the above files as root and restart the listener as oracleuser.

并列出所有文件(ls -la)。如果您发现某些 s#* 文件是由 root 组用户创建的,请停止侦听器(lsnrctl stop),以 root用户身份删除上述文件并以oracle用户身份重新启动侦听器。

Unfortunately sqldeveloper doesn't show the full stack-trace when reading "Got minus one from a read call". I could find the problem thanks to switching to SQL-Squirrel.

不幸的是 sqldeveloper 在阅读“从读取调用中得到减一”时没有显示完整的堆栈跟踪。由于切换到 SQL-Squirrel,我可以找到问题。

回答by Programming learner

Try Connection name: HR_ORCL Username: HR , Password: hr , Connection type : local, Role: SYSDBA Click on connect. It will work.

尝试连接名称:HR_ORCL 用户名:HR,密码:hr,连接类型:本地,角色:SYSDBA 单击连接。它会起作用。

回答by viv kumar

Seems you have enabled ACL on the listener.

似乎您已在侦听器上启用了 ACL。

You can follow these steps to avoid the error:

您可以按照以下步骤避免错误:

1. Go to directory $ORACLE_HOME/network/admin
2. Modify sqlnet.ora file with following parameter: 
tcp.validnode_checking = no

3. If you don't want to disable this, you can put the machine names as follows:
tcp.invited_nodes=(machine1, machine2)

3. Bounce the listener.

Hope that helps

希望有帮助

回答by Rogerio Coelho

Ensure the DB is up and running and you can connect locally AS SYSDBA to the database using Oracle binaries owner (usually oracle:oinstall Unix / Linux user). If it does not work, probably you encounter a different problem. Check privileges of an Oracle file on Unix / Linux host where database is running:

确保数据库已启动并正在运行,您可以使用 Oracle 二进制文件所有者(通常是 oracle:oinstall Unix / Linux 用户)将本地 AS SYSDBA 连接到数据库。如果它不起作用,您可能会遇到不同的问题。在运行数据库的 Unix / Linux 主机上检查 Oracle 文件的权限:

cd $ORACLE_HOME/bin
ls -ltr oracle
-rwxr-xr-x    1 oracle   oinstall       136803483 Mar 16 20:32 oracle

Change permissions as below:

更改权限如下:

chmod 6751 oracle
ls -ltr oracle
-rwsr-s--x    1 oracle   oinstall       136803483 Mar 16 20:32 oracle

回答by Artem

Try to do what the link, or check listener directory permission, or use command /dbhome/bin/relink all

尝试做链接,或检查侦听器目录权限,或使用命令 /dbhome/bin/relink all

回答by Gaurav Singh

Actually, It is not database specific issue. it is related to port value generated by database during your installation. To overcome on this issue, please follow below.

实际上,这不是特定于数据库的问题。它与安装过程中数据库生成的端口值有关。要克服这个问题,请按照以下步骤进行操作。

  1. Go to the folder where you have installed the database (Like: F:\app)
  2. Here you will be able to see many folders, go to product\11.2.0("your databse version")\dbhome_1\NETWORK\ADMIN
  3. find listener.ora file and open as text file
  4. Check for the port number in that file
  5. Now provide that port number while doing connection in sql developer.
  1. 转到安装数据库的文件夹(如:F:\app)
  2. 在这里你会看到很多文件夹,去product\11.2.0("你的数据库版本")\dbhome_1\NETWORK\ADMIN
  3. 找到 listener.ora 文件并作为文本文件打开
  4. 检查该文件中的端口号
  5. 现在在 sql developer 中进行连接时提供该端口号。

Hope it will resolve your issue.

希望它能解决您的问题。