ORA-12545: 대상 호스트 또는 객체가 존재하지 않아 연결에 실패했습니다 (ORA-12545: connect failed because target host or object does not exist)

ORA-12545: 대상 호스트 또는 객체가 존재하지 않아 연결에 실패했습니다

해당 오류는, 호스트 또는 객체가 존재하지 않는 경우보다는, 찾을 수 없어서 발생할 가능성이 높습니다. 존재하지 않는 게 맞다면 오라클 서버를 설정하는 처음 단계부터 제대로 안 되어 있는 것일 겁니다.

이번 주제는 리스너, 핑, 홈, TNS 등을 확인하여 ORA-12545: connect failed because target host or object does not exist 오류를 해결하는 방법에 대해 알아보도록 하겠습니다.

ORA-12545: 대상 호스트 또는 객체가 존재하지 않아 연결에 실패했습니다

lsnrctl status 확인하기

호스트에 연결이 불가한 이유를 점검하시면 해결할 수 있습니다. 리스너 상태를 확인하기 위해 lsnrctl status를 체크해 보겠습니다. 예제는 정상인 상태입니다.

lsnrctl status

LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 0-0월 -0000 00:00:00

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
Start Date                0-0월 -0000 00:00:00
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Default Service           XE
Listener Parameter File   C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\listener.ora
Listener Log File         C:\oraclexe\app\oracle\diag\tnslsnr\beomsang\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESK)(PORT=0)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESK)(PORT=0))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
  Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
  Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully

PING 또는 TNSPING 확인하기

네트워크 상태를 tnsping 명령어 등으로 확인해 봅니다. 이외에도 DNS를 통한 연결 상태를 확인해 보기도 합니다.

tnsping xe

TNS Ping Utility for 32-bit Windows: Version 10.2.0.3.0 - Production on 0-0월 -0000 00:00:00

Copyright (c) 1997, 2006, Oracle.  All rights reserved.

사용된 매개변수 파일:
C:\oracle\product\10.2.0\client_1\network\admin\sqlnet.ora

오라클 홈 및 tnsnames.ora 파일 확인하기

다음은 오라클 10g 기준 tnsnames.ora파일 경로입니다. 설정된 호스트, 포트를 확인하거나 오라클 홈이 제대로 설정되어 있는지 확인해 봅니다.

C:\oracle\product\10.2.0\client_1\network\ADMIN
댓글 쓰기
가져가실 때, 출처 표시 부탁드려요! 감사합니다. 💗