Ora 12560 tns ошибка адаптера протокола как исправить

от admin

How to fix ORA-12560: TNS:protocol adapter error on Windows (Doc ID 2313175.1)

Oracle offers a comprehensive and fully integrated stack of cloud applications and platform services. For more information about Oracle (NYSE:ORCL), visit oracle.com. � Oracle | Contact and Chat | Support | Communities | Connect with us | Facebook | Twitter | Linked In | Legal Notices | Terms of Use

How to Resolve ORA-12560 on Windows Server

In this post, I’ll talk about 3 error patterns of ORA-12560 on Windows platform.

Database Service is Stop

When we tried to connect to the database via SYSDBA, we got ORA-12560.

C:\Users\Administrator>sqlplus / as sysdba
.
ERROR:
ORA-12560: TNS:protocol adapter error

This is because the database service is stopped by someone or something, you need to start or restart to get the database service working. This is the most common problem of ORA-12560.

Datapatch

If you saw the error in datapatch (i.e. SQL patching) after issuing datapatch -verbose like this:

C:\Users\Administrator>datapatch -verbose
.
Connecting to database.
Error: prereq checks failed!
Database connect failed with: ORA-12560: TNS:protocol adapter error (DBD ERROR: OCIServerAttach)
.

Then you know what to do it to solve it.

Incorrect ORACLE_SID

First of all, allow me reproduce the error ORA-12560 for you.

Check the instance name and current status.

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Thu Oct 24 20:31:22 2019

Copyright (c) 1982, 2016, Oracle. All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 — 64bit Production

SQL> select instance_name, status from v$instance;

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 — 64
bit Production

As you can see, I connect the database with OS authentication without problem.

Now I set a non-existing ORACLE_SID .

C:\Users\Administrator>set ORACLE_SID=ERPAPP2
C:\Users\Administrator>echo %ORACLE_SID%
ERPAPP2

Then connect again.

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Thu Oct 24 20:32:36 2019

Copyright (c) 1982, 2016, Oracle. All rights reserved.

ERROR:
ORA-12560: TNS:protocol adapter error

Enter user-name: ^C

Oh, I got ORA-12560. The response to an unrecognized ORACLE_SID is very different in Windows from Linux. In Linux, it still connect for you, but show «Connected to an idle instance».

In such situation, you’d better to check ORACLE_SID in software registry editor.

Windows Regedit - Oracle Software - Check "ORACLE_SID"

Windows Regedit — Oracle Software — Check «ORACLE_SID»

In this case, we should set the correct ORACLE_SID in registry or set it temporarily for your working environment like this:

C:\Users\Administrator>set ORACLE_SID=ERPAPP
C:\Users\Administrator>echo %ORACLE_SID%
ERPAPP

Reach Limitation of PROCESSES

Found repeated Oracle TNS error messages in listener log during peak-hours on Windows Server 2008.

.
19-Oct-2010 05:32:10 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCL11)(CID=(PROGRAM=C:ap001client.exe)(HOST=WIN3451)(USER=EDCHEN))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.1.2.3)(PORT=49874)) * establish * ORCL11 * 12518
TNS-12518: TNS:listener could not hand off client connection
ORA-12560: TNS:protocol adapter error
.

The error pattern combined with TNS-12518 and ORA-12560, and it repeated itself until some point off the peak.

I think restarting the database should work, but it should also cost your time or credits to explain the inconvenience to your users.

I suspect that PMON was not responsive enough to reclaim the timeout or dead processes and let the whole database reach the maximum number of processes, and eventually, no more new connections will be allowed.

If you are not convenient to patch the database. Here are two alternatives that you may choose:

    Raise the maximum number of processes online: SQL> alter system set processes=3000 scope=both;

The whole concept of this tactic is to make the database survive through the daily peak-hours and let PMON can take its time to reclaim the unused processes.

SQL> alter system set dispatchers='(address=(protocol=tcp)(PORT=1521)) (dispatchers=20)(sessions=1000)’ scope=both;

In the above statement, we force all connections coming from port 1521 to use dispatchers (shared server mode). DBA and specific users can use other port like 1522 to connect as dedicated mode to finish their jobs. At the beginning, users might feel that the speed of responses of database is slightly affected. I think it’s a trade-off that you must think over before making the decision.

Since the shared server processes will be soon allocated in the server when the database startup, the number of processes can be easily controlled by DBA. For more shared server configuration, you can refer to Oracle documentation: Configuring Oracle Database for Shared Server.

DBA Career

Hair follicle drug tests may also be required for legal and medical purposes. More often than not, you are the one who chooses whether you give a hair sample or not. Nothing is done without your consent. Your employer can’t forcibly take a hair sample from you. Labs can detect drugs but can’t determine when those drugs were taken. The idea they can be is just a myth. Visit: https://www.urineworld.com/

Thank you for sharing such a useful article. I had a great time. This article was fantastic to read. Continue to publish more articles on

ORA-12560: TNS: ошибка адаптера протокола

Изображение 625

I Google [d] для этой ошибки ORA-12560: TNS: ошибка адаптера протокола, но не может найти фактическую причину и как решить эту ошибку?

Может ли кто-нибудь сказать мне идеальное решение для решения проблемы входа в систему.

16 ответов

  • Перейдите на машину Windows, на которой размещен сервер базы данных Oracle.
  • Перейдите в Пуск → Выполнить → Службы .msc в окнах. Найти OracleService (здесь OracleServiceORCL) и нажмите «Начать», чтобы запустить службу базы данных oracle (если она еще не запущена).

После запуска и запуска из командной строки выполните следующее:

(запись tnsalias вы можете найти в файле tnsnames.ora)

Изображение 7158

Кажется, что база данных не работает. Возможно, это связано с перезагрузкой машины, и экземпляр не настроен на автозапуск, и поэтому он не запускается вручную после запуска с экрана служб.

Просто перейдите в командную строку

Установить Oracle SID C: > set oracle_sid = ORCL

Теперь запустите команду Net start. C: > net start oracleserviceORCL

В моем случае у меня не было OracleService (OracleServiceORCL) в Windows Services.msc , как описано в ответе Бхарати.

Я выполнил эту команду:

а затем OracleService , называемый OracleServiceORCL, только что появился и запущен в Services.msc. Действительно приятно.

Добавьте в среду vars следующую переменную и значение, чтобы определить место файла tnsnames.ora:

из командной консоли, если вы получите эту ошибку, вы можете избежать ее, набрав sqlplus/nolog

то вы можете подключиться conn user/pass @host: порт/сервис

Довольно часто это означает, что слушатель не запустился. Проверьте панель «Службы».

В Windows (как и вы) еще одна распространенная причина заключается в том, что ORACLE_SID не определен в реестре. Либо отредактируйте реестр, либо установите ORACLE_SID в поле CMD. (Поскольку вы хотите запустить sqlplusw.exe, я предлагаю вам отредактировать реестр.)

После поиска у него есть простой способ его решить. Просто выполните следующие действия.

Related Posts