oracle sqlplus 远程连接给出 ORA-21561

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31338916/
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:54:50  来源:igfitidea点击:

sqlplus remote connection giving ORA-21561

oraclesqlplus

提问by Neo

I have installed sqlplus based on instruction given here

我已经根据此处给出的说明安装了 sqlplus

sqlplus 'username/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.100)(PORT=1521))(CONNECT_DATA=(SID=ORCL)))'

This is giving me error

这给了我错误

SQL*Plus: Release 11.2.0.4.0 Production on Fri Jul 10 16:10:38 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-21561: OID generation failed


Enter user-name: 

What is the solution for this problem?

这个问题的解决方案是什么?

PS: I have already added hostname and hosts have already have value.

PS:我已经添加了主机名,主机已经有了价值。

回答by Prasanth Pennepalli

Append the name of your server to the hosts file.

将您的服务器名称附加到主机文件中。

If your /etc/hosts file looks like this:

如果您的 /etc/hosts 文件如下所示:

127.0.0.1   localhost localhost.localdomain

It should be changed to:

应该改为:

127.0.0.1   localhost localhost.localdomain hostname

hostname can be obtained from the command "hostname".

主机名可以从命令“hostname”中获得。

回答by Eswar

If you are using Mac add local computer name to your 127.0.0.1 in /etc/hosts

如果您使用的是 Mac,请将本地计算机名称添加到 /etc/hosts 中的 127.0.0.1

It will be like

它会像

127.0.0.1       localhost <local_computer_name>

Way to find local computer name

查找本地计算机名的方法

System Preferences>Sharing(search for it if you cant find) on the top you can see your local computer name

系统偏好设置>共享(如果找不到请搜索)在顶部可以看到您的本地计算机名称

or you can use "hostname" command to get local computer name

或者您可以使用“hostname”命令获取本地计算机名称

回答by val

look at /etc/sysconfig/network change if needed the hostname

如果需要,查看 /etc/sysconfig/network 更改主机名

回答by Geraldo Milagre

This issue can also be cause by wrong permissions on the /etc/hostsfile. If it is not readable for the Oracle uid, the errors will show.

此问题也可能是由/etc/hosts文件的错误权限引起的。如果 Oracle uid 不可读,则会显示错误。

Make sure your /etc/hosts is readable by everybody:

确保每个人都可以读取您的 /etc/hosts:

$ ls -l /etc/hosts
-rw-r--r--    1 root     system        7446 Mar 28 23:03 /etc/hosts 
$

回答by Diogo PEREIRA MARQUES

Answer obtained here.

答案在这里获得。

1 - Get your hostname:

1 - 获取您的主机名:

$ hostname

$主机名

new-host

新主机

2 - Change the contents of /etc/hosts:

2 - 更改 /etc/hosts 的内容:

$ sudo cat /etc/hosts

$ 须藤猫 /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

$ sudo nano /etc/hosts

$ sudo nano /etc/hosts

$ sudo cat /etc/hosts

$ 须藤猫 /etc/hosts

127.0.0.1 localhost new-host

127.0.0.1 本地主机新主机

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

Hope this helps (:

希望这可以帮助 (:

回答by Shravan Yadav

try this, don't put single quotes

试试这个,不要放单引号

sqlplus username/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.100)(PORT=1521))(CONNECT_DATA=(SID=ORCL)))