Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sqlplus remote connection giving ORA-21561

Tags:

oracle

sqlplus

I have installed sqlplus based on instruction given here

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.

like image 755
Neo Avatar asked Jul 10 '15 10:07

Neo


2 Answers

Append the name of your server to the hosts file.

If your /etc/hosts file looks like this:

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".

like image 131
Prasanth Pennepalli Avatar answered Oct 19 '22 10:10

Prasanth Pennepalli


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

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

like image 17
Eswar Avatar answered Oct 19 '22 10:10

Eswar