Oracle connection exception due to dual NIC environment

Source: Internet
Author: User
Tags ldap

Now is the fashion to the highest level, the deployment of this project, good SQL Server threw it (there is a genuine authorized Enterprise Edition, God ... ), every person will boast: "We are on the top of the Oracle Database system! ”。 Look at the price, it is really very top-level, 600,000, frighten directly did not dare to include in the overall project budget.

But is the expensive thing easy to use? Not necessarily. This building is in Java, with UNIX-style things, a rigid face. When the outfit was told to pay attention to, can not install listener may not come up ... Fortunately, I also practiced, the Windows version of the Linux is not so strange, tossing a few times are very normal. However, bullying novice things, always to give people scare, this afternoon in the above to install ARCSDE, just can't even to the database, fierce error TNS: Unable to parse the name.

This is very strange, with the management page to see, monitoring is very normal in the run, with the connection string to connect, also very normal log in and operation. This at least proves that the database instance and the listener are working, but what is the cause of the inability to connect? Based on the error message, using Tnsping, the tnsping ORCL (the SID of the default startup database) is found to return the same error. This puts the problem in the name of the resolution, the Oracle Network service TNS name resolution, generally use LDAP or local Tnsnames.ora file, because the network does not configure the Oracle LDAP Service, so open Tnsnames.ora, inside the "ORCL = "The entry does not see any problem, using the Oracle Net Manager tool, you can see the configuration Listener.ora and Tnsnames.ora in the configuration of ORCL entries are exactly the same, host name, port number is nothing unusual.

In this case, I had to repeatedly restart the service and modify the configuration attempt, but did not have the effect, but also nearly the oracle to make a bad, a few times the monitoring can not get up, frighten me a sweat. In desperation accidentally will tnsping as the ordinary ping command, type "tnsping hostname", suddenly came to the spirit, the magic found in the results returned, the host name is Ezconnect resolved to a strange IP address. I found that the server network management has 2 NICs, one is the actual NIC, IP for the normal use of the correct IP, and the other is I have left colleagues do not know because of what the Microsoft Loopback Adapter, configured IP address is that strange IP.

Immediately on-line search data, found that because Oracle must be the host name resolution to an IP, and the host name in the case of the double network card cross-network segment is not working properly, because a name can not be resolved to 2 addresses, resulting in the monitoring in the case of dual-NIC work is not normal. My current situation is that the two network network segments caused confusion, the listener's name resolution is bound to the strange IP that does not actually function, from the normal network adapter to use the hostname of the connection all failed, and the direct use of IP as a connection field connection is successful.

At first, it was also intended to correct the Windows Hosts file to force the name resolution back to the correct IP, but it caused ezconnect confusion. After eating enough lessons, will listen to the configuration using IP address rewrite, and at the same time bind to two network card IP, and then the Tnsnames.ora in the entry of the host name is also changed to an IP address, test finally OK

Oracle connection exception due to dual NIC environment

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.