Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

SQL Exception - Io exception: The Network Adapter could not establish the connection

Posted on 2005-05-09
3
Medium Priority
?
1,357 Views
Last Modified: 2012-06-27
Hello there,

Had a problem that was resolved earlier on this forum. I was having problems starting the OEM 10g dbconsole service on Windows XP (Home Edition) due to installing Oracle on a home laptop running the DHCP network protocol. Full details of this problem and the solution can be seen here: http://www.experts-exchange.com/Databases/Oracle/Q_21417083.html

In a nutshell, I have installed the Microsoft Loopback Network Adapter to get around the dbconsole startup problem, and the dbconsole service will now start. However, when I attempt to start the Oracle database from OEM, I receive the following error message:

SQLException
Io exception: The Network Adapter could not establish the connection

When I check the Oracle service in the Services Menu in Windows XP however, the database shows as being started. I can also connect to the database as a DBA user via SQLplus without any problems.

I have a suspiscion this is some kind of network-related issue, so to try and give you some idea of how my Oracle installation is set up on Windows XP, my windows hosts file shows the following after I configured it to use the loopback adapter:


----------------------------------------------------------------------------------------
              WINDOWS HOSTS FILE
----------------------------------------------------------------------------------------
 Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost
192.168.1.1     JM-069D0D6EDC
-----------------------------------------------------------------------------------------
             END WINDOWS HOSTS FILE
-----------------------------------------------------------------------------------------


The 192.168.1.1 is the IP address asigned to my loopback adapter. JM-069D0D6EDC is the full computer name assigned to my laptop when I go to the Control Panel/System Properties/Computer Name.

My Oracle 10g database is installed on localhost. My TNSNames.ora and listener.ora files contain the following config data:


----------------------------------------------------------------------------------------
              TNSnames.ora FILE
----------------------------------------------------------------------------------------
# tnsnames.ora Network Configuration File: C:\oracle\product\10.1.0\Db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

MAINDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = MainDB)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )
----------------------------------------------------------------------------------------
              END TNSnames.ora FILE
----------------------------------------------------------------------------------------
****************************************************************************************

----------------------------------------------------------------------------------------
              listener.ora FILE
----------------------------------------------------------------------------------------
# listener.ora Network Configuration File: C:\oracle\product\10.1.0\Db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oracle\product\10.1.0\Db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = MainDB)
      (ORACLE_HOME = C:\oracle\product\10.1.0\Db_1)
      (SID_NAME = MainDB)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      )
    )
  )
----------------------------------------------------------------------------------------
              END listener.ora FILE
----------------------------------------------------------------------------------------


As already stated, I can connect to an instance of MainDB via SQLplus after clicking on "Startup" in OEM. One thing that is concerning me slightly is that since installing the loopback adapter, OEM has since been configured to use "JM-069D0D6EDC" rather than "localhost" as its host. For example, immediately after installing the database before I encountered the DBconsole restart issue, I would connect to OEM on the URL http://localhost:5501/em, whereas I now have to connect on http://JM-069D0D6EDC:5500/em. I notice in my database home, I now have two very similar folders containing the "sysman" folder. One is named "localhost_MainDB" and contains 64.7MB of data. The other is named "JM-069D0D6EDC_MainDB", and contains 60.0KB of data. I'm wondering if this could be part of the problem, or just a red herring?

I apologise for sounding completely clueless, but I am completely new to the DBA side of the Oracle database. The reason I installed Oracle 10g on my home laptop was so I could teach myself some DBA skills. I'm certainly learning about all the pitfalls for the unwary in an Oracle database installation. ;o)

Anyway, to summarise this mass of information, I would really appreciate answers to the following questions:

1. Why am I getting the error message "SQLException - Io exception: The Network Adapter could not establish the connection" when I attempt to startup the database from OEM 10g? Can anyone help me with the solution to this issue?

2. Is this issue related to the database service running on Localhost, and OEM now running on JM-069D0D6EDC (My Loopback Adapter)?

3. Should I have two different folders (localhost_MainDB and JM-069D0D6EDC_MainDB) in my ORACLE_HOME containing the SYSMAN folder, and is this part of the problem?
0
Comment
Question by:JamesMcN
2 Comments
 
LVL 1

Author Comment

by:JamesMcN
ID: 14009240
Just discovered I was getting this error because I hadn't started the listener service. Most strange; I could have sworn it was running (surely it must have been for me to be able to connect via SQLplus.........?!!), but after searching Oracle's technet for clues to the cause of this problem, I found this as a recommended 'solution'.

Guess it's a solution to those of us who are too clueless (ME!) to check all the essential services are running before trying to connect. OEM 10g is now working.
0
 

Accepted Solution

by:
PAQ_Man earned 0 total points
ID: 14053022
Question Closed, 250 points refunded.
PAQ_Man
Community Support Moderator
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question