Sqlplus Connecting Oracle Failure Analysis and resolution

Source: Internet
Author: User
Tags sqlplus

Background:

Multiple Linux servers require the installation of an Oracle client to perform business processing with the Oracle database connection.

After the first installation, the installed directory is compressed and copied directly to several other machines, and when the Sqlplus connection database is started, the user name and password are always prompted.

[xxxxxxx]$ sqlplus user/[email protected]sql*plus:release 11.2.0.4.0 Production on Fri Feb 5 10:56:38 2016Copyright (c) 1 982, Oracle.  

Error ora-21561:oid generation failed output was found using Strace trace.

Strace sqlplus User/[email protected]

Close (5)                                = 0write (1, "error:\n", 7ERROR:)                 = 7write (1, "ora-21561:oid generation Failed" ..., 33ora-21561:oid Gen Eration failed) = 33write (1, "\ n", 1)                       = 1write (1, "\ n", 1)                       = 1write (1, "Enter user-name:", 17Enter user-name:) 
   = 17fstat (0, {st_mode=s_ifchr|0620, St_rdev=makedev (136, 1), ...}) = 0mmap (NULL, 4096, prot_read| Prot_write, map_private| Map_anonymous,-1, 0) = 0x7feaa51c9000read (0, ^c <unfinished ...>

The error ora-21561:oid generation failed is caused by inconsistencies in hostname and host name in the Hosts file.

Workaround:

Querying the host name of a machine using the command hostname

[Xxxxx]$ hostnamebillingserver001

Modify the/etc/hosts file to add the host name to the hosts file.

[xxxxx]$ cat/etc/hosts127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4::1         localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.1.2     billingserver001

Re-use Sqlplus User/[email protected] to connect to the database, the connection is successful.

[xxxxx]$ sqlplus user/[email protected]sql*plus:release 11.2.0.4.0 Production on Fri Feb 5 11:05:57 2016Copyright (c) 198 2, Oracle.  All rights reserved.  Connected to:oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit productionwith The partitioning, OLAP, Data Mining and Real Application testing optionssql>

Done.

Sqlplus Connecting Oracle Failure Analysis and resolution

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.