Ошибка при подключении к бд оракл ошибка ввода вывода the network adapter could not establish

Most probably you have listener configured wrongly, the hostname you specify in connection string must be the same as in the listener.

First check the Firewall and network related issues.

Check if Oracle Listener service is available and running. If not you may use Oracle Net Configuration Assistant tool to add and register new listener.

If the above steps are ok then you need to configure Oracle Listener appropriately. You may use Oracle Net Manager tool or edit “%ORACLE_HOME%networkadminlistener.ora” file manually.

There are 2 options that need to be considered carefully:
Listening Locations associated with the Listener – Hostname(IP) and Port in Listening Location must exactly match the ones used in the connection string.

For example, if you use 192.168.74.139 as target hostname, then there must be Listening Location registered with the same IP address.

Also make sure the you use the same SID as indicated in Database Service associated with the Listener.

Fix Oracle “IO ERROR: The network adapter could not establish the connection” error

I created a database using SQL developer list of 1000 entries and it created successfully. The connection also succeeded. But today while I’m trying to connect there is an error occurring:

IO Error: The Network Adapter could not establish the connection in SQL developer

I can surely say it is not connecting I tried it in Command prompt also in prompt it is mentioning as Protocol Adapter Error.

What is the problem here?

What is meant by Protocol Adapter Error how can i overcome it?

What is Network Adapter Error?

Aruna's user avatar

Aruna

11.9k3 gold badges28 silver badges42 bronze badges

asked Jul 2, 2014 at 6:56

Dhivya's user avatar

0

Please check the listener to see if it is down:-

ps -ef | grep tns

If you dont find the output of the listener then you have to start it. To do that type start in the LSNRCTL> prompt.

From the Oracle forum:

If the Oracle clients have been installed with 11.1.2.3 the TNS_ADMIN
will be point to user_projectsconfigdbclient In
that folder there should be a tnsnames.ora, if the Oracle DB is on the
same machine you may want to copy the contents of database tnsnames
folder to the TNS_ADMIN folder or as suggested change the environment
variable.

answered Jul 2, 2014 at 7:00

Rahul Tripathi's user avatar

Rahul TripathiRahul Tripathi

167k31 gold badges278 silver badges331 bronze badges

You need to follow few steps .

  1. Go to the directory «C:oraclexeapporacleproduct11.2.0servernetworkADMIN»
  2. Open tnsnames.ora file and change the host. Generally localhost in your case

    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
    )
    
  3. Open listener.ora file and change the listener host name to localhost.

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    )
    
  4. Open command prompt as administrator. Check for the listener status.

    c:> lsnrctl status
    

    If you find listener is up then you can be able to connect to the sql developer. Other wise start the listener by using below command.

    c:> lsnrctl start
    

    Now you can be able to login to sql developer without the above mentioned error.

answered Jun 8, 2018 at 10:14

Ananta Chandra Das's user avatar

1

SQL Developer problem: The network adapter could not establish the connection

  1. Open the file sqldeveloper.conf in wordpad or your favourite text editor. The file is placed in the installation directory, probably:

    %programfiles%sqldevelopersqldeveloperbinsqldeveloper.conf
    
  2. Add the following line at the bottom of the file and save:

    AddVMOption -Djava.net.preferIPv4Stack=true
    
  3. Restart SQL Developer.

answered Apr 10, 2018 at 12:36

Robert's user avatar

1

I had a similar issue where I also continuously got the same error. I tried many things like changing the listener port number, turning off the firewall etc. Finally I was able to resolve the issue by changing listener.ora file. I changed the following line:

(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

to

(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))

I also added an entry in the /etc/hosts file.

you can use Oracle net manager to change the above line in listener.ora file. See Oracle Net Services Administrator’s Guide for more information on how to do it using net manager.

Also you can use the service name (database_name.domain_name) instead of SID while making the connnection.

Hope this helps.

answered Dec 16, 2014 at 19:28

scv's user avatar

scvscv

4905 silver badges14 bronze badges

the answer for your question is some times the listener will be shut-down at this point it will not allow you to connect to the database, for example when the machine restarts.
Solution is : Go to services check the Oracle_ora Db —> tns_listener is in running mode are not if not restart the services.

answered Apr 1, 2015 at 9:50

Hemanth Kumar's user avatar

I had a similar issue with oracle running on my suse vm.
This fixed the problem:
1.) Removed the file listener.ora.
2.) Made listener part of tnsnames.ora

LISTENER_MDB1 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

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

There may be a better solution though.

answered Jun 30, 2015 at 5:14

ssv's user avatar

ssvssv

1251 silver badge11 bronze badges

3

In my case I need to set Hostname like «my-oracle-server-name», not by ip (192.168.1.23)

answered Oct 9, 2017 at 12:34

Vlad's user avatar

VladVlad

97714 silver badges17 bronze badges

I had this issue but finally found a solution.
Follow the next steps.

  1. Stop all services that you hace runnig about oracle
  2. Please check your ip configuration in a console(windows command ipconfig, linux command ifconfig), save that ip
  3. Change the ip than you have in the following files:
    listener.ora
    tnsnames.ora
  4. Start all services that you stoped

The previous steps should have solved the issue.

Note: if you don’t want to repeat the above steps every time you restart your computer, just put in the ip addresses 127.0.0.1 in the files.

answered Jul 6, 2021 at 14:56

Xavier Angeles's user avatar

Всем Доброго времени суток! Взялся за изучение сервлетов, там нужна бд oracle(это принципиально) и вот уже несколько дней пытаюсь перейти от борьбы с ней к самому sql. Итак нужно подключить бд к sql developer получаю вот

это

1c222c1f244a441b9c05b54bf6649967.png

.

Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection

.
При чем вчера я это сделал, бд подключалось, а сегодня споткнулся о другие грабли, решил проверить работает ли то что вчера делал, а оно не работает.

Подскажите в чем ошибка или в какую сторону копать?
Заранее Спасибо!

p.s. ОС Fedora 21.

Most probably you have listener configured wrongly, the hostname you specify in connection string must be the same as in the listener.

First check the Firewall and network related issues.

Check if Oracle Listener service is available and running. If not you may use Oracle Net Configuration Assistant tool to add and register new listener.

If the above steps are ok then you need to configure Oracle Listener appropriately. You may use Oracle Net Manager tool or edit “%ORACLE_HOME%networkadminlistener.ora” file manually.

There are 2 options that need to be considered carefully:
Listening Locations associated with the Listener – Hostname(IP) and Port in Listening Location must exactly match the ones used in the connection string.

For example, if you use 192.168.74.139 as target hostname, then there must be Listening Location registered with the same IP address.

Also make sure the you use the same SID as indicated in Database Service associated with the Listener.

Fix Oracle “IO ERROR: The network adapter could not establish the connection” error

Обновлено май 2023: перестаньте получать сообщения об ошибках и замедлите работу вашей системы с помощью нашего инструмента оптимизации. Получить сейчас в эту ссылку

  1. Скачайте и установите инструмент для ремонта здесь.
  2. Пусть он просканирует ваш компьютер.
  3. Затем инструмент почини свой компьютер.

Oracle SQL — это интегрированная среда разработки, предназначенная для работы с базами данных Oracle с использованием SQL. Этот продукт разработан и бесплатно предоставляется корпорацией Oracle и основан на Java Development Kit. В последнее время появилось много сообщений об «ошибке ввода-вывода: сетевой адаптер может подключиться» при тестировании соединения с базой данных.

В чем причина этой ошибки?

Всякий раз, когда вы видите, что сетевой адаптер не может подключиться, у вас либо неправильный URL-адрес разработчика SQL, либо у вас есть базовая проблема с подключением к SQL * Net! Эта ошибка, скорее всего, вызвана одним из следующих факторов:

  • Вы используете неправильный URL
  • Использован неправильный номер порта или IP-адрес (или имя хоста DNS).
  • Динамик не настроен правильно.
  • Процесс прослушивания (сервис) не выполняется. Вы можете запустить его с помощью команды «lsnrctl start» или перезапустить в Windows, запустив службу Listener.

Обновление за май 2023 года:

Теперь вы можете предотвратить проблемы с ПК с помощью этого инструмента, например, защитить вас от потери файлов и вредоносных программ. Кроме того, это отличный способ оптимизировать ваш компьютер для достижения максимальной производительности. Программа с легкостью исправляет типичные ошибки, которые могут возникнуть в системах Windows — нет необходимости часами искать и устранять неполадки, если у вас под рукой есть идеальное решение:

  • Шаг 1: Скачать PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista — Microsoft Gold Certified).
  • Шаг 2: Нажмите «Начать сканирование”, Чтобы найти проблемы реестра Windows, которые могут вызывать проблемы с ПК.
  • Шаг 3: Нажмите «Починить все», Чтобы исправить все проблемы.

скачать

Убедитесь, что ваши записи верны.

Чтобы исправить «Сетевой адаптер не может установить соединение”, Сначала убедитесь, что вы ввели правильное имя пользователя и пароль, а также правильное имя хоста и номер порта. Хотя это мелочи, мы не можем их избежать. «Больше всего важны мелочи в отношениях».

Для правильного имени хоста и номера порта вы можете проверить файл Listener.ora, если у вас есть доступ к вашему серверу, потому что Listener — это процесс сервера. Если у вас нет доступа к файлу listener.ora, вы можете проверить файл tnsnames.ora.

В случае файла Listener.ora проверьте запись хоста и порта в метке Listener, чтобы убедиться, что имена хостов и номера портов являются действительными.

И если вы используете файл TNSnames.ora для проверки имени хоста и номера порта, найдите запись с тем же именем, что и ваш SID, а затем найдите запись хоста и номера порта в этом конкретном теге.

Теперь попробуйте подключиться. Если это решит вашу проблему, вы можете избежать следующего шага. Но если ошибка «Сетевому адаптеру не удалось подключиться» все еще присутствует, не беспокойтесь, просто выполните следующий шаг.

Запуск службы прослушивателя

Возможно, что услуга для аудитора не была запущена. Эта услуга требуется приложением для установления соединения. Поэтому на этом этапе мы запустим службу, введя команду в командной строке. Для этого:

  • Нажмите «Windows» + «R», чтобы открыть командную строку «Выполнить».
  • Введите «Cmd» и нажмите «Shift» + «Ctrl» + «Enter», чтобы назначить права администратора.
  • Введите следующую команду, чтобы убедиться, что служба запущена.

lsnrctl Status

  • Если результат похож на изображение ниже, это означает, что служба не была запущена.
  • Введите следующую команду, чтобы запустить службу вручную.

lsnrctl start

  • После запуска службы прослушивания откройте приложение и проверьте, можно ли установить новое соединение.

https://community.oracle.com/thread/2547624

Совет экспертов: Этот инструмент восстановления сканирует репозитории и заменяет поврежденные или отсутствующие файлы, если ни один из этих методов не сработал. Это хорошо работает в большинстве случаев, когда проблема связана с повреждением системы. Этот инструмент также оптимизирует вашу систему, чтобы максимизировать производительность. Его можно скачать по Щелчок Здесь

ed_moyes

CCNA, веб-разработчик, ПК для устранения неполадок

Я компьютерный энтузиаст и практикующий ИТ-специалист. У меня за плечами многолетний опыт работы в области компьютерного программирования, устранения неисправностей и ремонта оборудования. Я специализируюсь на веб-разработке и дизайне баз данных. У меня также есть сертификат CCNA для проектирования сетей и устранения неполадок.

Сообщение Просмотров: 795

  • Ошибка при подключении к бд не хватает прав на создание объекта ядра
  • Ошибка при подключении к бд мис
  • Ошибка при подключении к бд unable to connect to any of the specified mysql hosts
  • Ошибка при подключении к айтюнс 0xe800000a
  • Ошибка при подключении к ncalayer mac os