Oracle Database Error Solutions & DBA Knowledge Base

Welcome to Oracle Database Error Solutions, a professional technical knowledge base dedicated to helping Oracle Database Administrators, Oracle E-Business Suite administrators, developers, and IT professionals troubleshoot Oracle Database and Oracle Linux issues with confidence.

This website provides practical, real-world troubleshooting guides based on hands-on Oracle administration experience. You'll find detailed solutions for Oracle Database errors, RMAN backup and recovery, Data Guard, ASM, RAC, Oracle Linux administration, Oracle E-Business Suite (EBS), cloning, performance tuning, patching, installation, and day-to-day DBA tasks.

Whether you're resolving ORA-27101, ORA-28040, ORA-01555, ORA-12154, ORA-01017, or other Oracle errors, our step-by-step articles are designed to save you time and help you solve problems efficiently.

ORA-12545: Connect Failed Because Target Host or Object Does Not Exist – Complete Oracle DBA Troubleshooting Guide

ORA-12545: Connect Failed Because Target Host or Object Does Not Exist – Complete Oracle DBA Troubleshooting Guide

Published: July 2026

Last Updated: July 2026

Reading Time: 16 Minutes

Applies To: Oracle Database 11g, 12c, 18c, 19c, 21c, 23ai, Oracle RAC, Oracle Data Guard, Oracle Cloud Infrastructure (OCI), Oracle Net Services


The ORA-12545: Connect failed because target host or object does not exist error is one of the most common Oracle Net Services connectivity problems encountered by Oracle Database Administrators, system administrators, developers, and application teams.

Unlike errors such as ORA-12541, where the Oracle Listener is unavailable, or ORA-12514, where the listener cannot locate the requested database service, ORA-12545 occurs much earlier in the connection process. The Oracle client cannot locate or communicate with the specified host because the hostname, IP address, DNS resolution, or network routing is incorrect or unavailable.

This error frequently appears after server migrations, hostname changes, firewall modifications, DNS updates, Oracle Cloud deployments, or incorrect configuration of tnsnames.ora, JDBC connection strings, or application connection parameters.

In this comprehensive Oracle DBA guide, you'll learn the complete connection process, understand why ORA-12545 occurs, and follow production-tested troubleshooting techniques to resolve the issue quickly and prevent future occurrences.

Quick Solution

ORA-12545 usually indicates that the Oracle client cannot locate or reach the database server.

The fastest troubleshooting sequence is:

  • Verify the hostname or IP address.
  • Ping the database server.
  • Verify DNS name resolution.
  • Confirm the listener host configuration.
  • Check the client's tnsnames.ora file.
  • Verify firewall connectivity.
  • Test the listener port.
  • Validate network routing between client and server.

In most production environments, correcting an incorrect hostname or DNS configuration resolves ORA-12545 without requiring any Oracle database changes.


Table of Contents

  1. What is ORA-12545?
  2. Error Message
  3. How Oracle Client Connections Work
  4. Connection Flow Diagram
  5. Difference Between ORA-12154, ORA-12514, ORA-12541 and ORA-12545
  6. Common Symptoms
  7. Common Causes
  8. Why ORA-12545 Happens
  9. Step-by-Step Troubleshooting
  10. Production Case Study
  11. Best Practices
  12. Frequently Asked Questions

Error Message

ORA-12545:
Connect failed because target host
or object does not exist

Depending on the client software, Oracle may also display additional Oracle Net Services errors indicating that the network destination could not be reached.


What Does ORA-12545 Mean?

ORA-12545 indicates that the Oracle client cannot locate or communicate with the specified database server before any connection to the Oracle Listener is established.

Unlike listener-related errors, ORA-12545 is primarily a network resolution problem. The hostname, IP address, DNS record, routing path, or firewall configuration prevents the client from reaching the target server.

Because the connection never reaches the listener, changing Oracle database parameters usually does not resolve this error. The root cause is typically found in the operating system, network infrastructure, DNS configuration, VPN connectivity, or client connection configuration.

DBA Insight

Many administrators immediately restart the Oracle Listener when they encounter ORA-12545. In reality, the listener is often never contacted. Always verify basic network connectivity before troubleshooting Oracle services.


How Oracle Client Connections Work

Understanding the Oracle connection process helps identify where ORA-12545 occurs.

Client Application

      │

      ▼

Hostname Resolution (DNS / Hosts File)

      │

      ▼

Network Routing

      │

      ▼

Firewall

      │

      ▼

Oracle Listener

      │

      ▼

Database Service

      │

      ▼

Database Instance

ORA-12545 occurs during the first stages of this workflow—typically while resolving the hostname or attempting to reach the target server over the network.


Difference Between Common Oracle Net Errors

Error Primary Cause
ORA-12154 Unable to resolve the connect identifier (TNS alias problem).
ORA-12514 Listener is running but requested service is unknown.
ORA-12541 Listener is unavailable or not responding.
ORA-12545 Client cannot locate or reach the database host.

Understanding these differences significantly reduces troubleshooting time because each error occurs at a different stage of the Oracle Net connection process.


Common Symptoms

  • SQL*Plus cannot connect to the database.
  • Oracle SQL Developer immediately reports ORA-12545.
  • JDBC applications fail to establish database sessions.
  • Oracle Enterprise applications cannot connect after server migration.
  • Applications fail after DNS changes.
  • Connections fail after hostname changes.
  • Remote users cannot connect over VPN.
  • Oracle Cloud clients cannot reach on-premises databases.

Common Causes

  • Incorrect hostname in tnsnames.ora.
  • Incorrect IP address.
  • DNS resolution failure.
  • Hosts file contains incorrect entries.
  • Firewall blocking Oracle listener port.
  • Network routing failure.
  • VPN connectivity issues.
  • Incorrect JDBC connection URL.
  • Oracle Listener configured with an invalid hostname.
  • Database server is powered off or unreachable.
  • Cloud security rules blocking access.
  • Incorrect SCAN hostname configuration in Oracle RAC.

Why ORA-12545 Happens

Before Oracle can communicate with the database listener, the client must first locate the target server using the hostname or IP address specified in the connection descriptor.

If hostname resolution fails, the IP address is incorrect, network routing is unavailable, or a firewall blocks communication, the Oracle client cannot establish the network session. Oracle therefore raises ORA-12545 because the target host or network object cannot be found.

Production Recommendation

Always verify basic operating system network connectivity using tools such as ping, nslookup, and traceroute before modifying Oracle configuration files. In most environments, ORA-12545 is a networking issue rather than an Oracle Database problem.


Next: Part 2 covers complete troubleshooting using ping, tnsping, nslookup, dig, traceroute, tracert, listener verification, firewall testing, DNS troubleshooting, Oracle RAC, Oracle Data Guard, Oracle Cloud Infrastructure (OCI), and a real-world production case study.


Step-by-Step Troubleshooting

When ORA-12545 occurs, avoid making changes to the Oracle database immediately. This error is almost always related to hostname resolution or network connectivity. The following troubleshooting process reflects the methodology commonly used by Oracle DBAs in production environments.


Solution 1 – Verify Basic Network Connectivity

The first step is to determine whether the client can reach the database server over the network.

Linux / Unix

ping dbserver

Windows

ping dbserver

Expected output:

Reply from 192.168.1.20:
bytes=32 time<1ms TTL=128

If the host cannot be reached, investigate DNS, routing, VPN, or firewall issues before troubleshooting Oracle.

DBA Tip

A successful ping confirms basic IP connectivity, but it does not verify that the Oracle Listener is available. Continue with the remaining steps even if ping succeeds.


Solution 2 – Verify DNS Name Resolution

Incorrect DNS records are one of the most common causes of ORA-12545.

Linux:

nslookup dbserver

or

dig dbserver

Windows:

nslookup dbserver

Verify that the returned IP address matches the actual database server.


Solution 3 – Verify the Hosts File

Many environments rely on local host file entries instead of DNS.

Linux:

cat /etc/hosts

Windows:

C:\Windows\System32\drivers\etc\hosts

Example:

192.168.1.20   dbserver

Ensure there are no duplicate or outdated hostname mappings.


Solution 4 – Verify Oracle Listener

After confirming network connectivity, verify that the listener is running.

lsnrctl status

Confirm:

  • Listener is running.
  • Listening on the expected host.
  • Listening on the expected port.
  • Database services are registered.

Solution 5 – Test Oracle Connectivity Using tnsping

Oracle provides the tnsping utility to test Oracle Net connectivity.

tnsping ORCL

Successful output:

OK (20 msec)

Failure indicates an Oracle Net configuration or network problem.


Solution 6 – Verify tnsnames.ora

Review the client connection descriptor.

ORCL=

(DESCRIPTION=

(ADDRESS=

(PROTOCOL=TCP)

(HOST=dbserver)

(PORT=1521))

(CONNECT_DATA=

(SERVICE_NAME=orcl)

))

Verify:

  • Hostname
  • Listener Port
  • SERVICE_NAME

Even a small typo in the hostname can result in ORA-12545.


Solution 7 – Verify sqlnet.ora

Review Oracle Net configuration.

SQLNET.AUTHENTICATION_SERVICES=(NONE)

NAMES.DIRECTORY_PATH=(TNSNAMES,EZCONNECT)

Incorrect naming methods can prevent proper hostname resolution.


Solution 8 – Verify Firewall Connectivity

Network firewalls frequently block Oracle Listener ports.

Linux:

telnet dbserver 1521

or

nc -zv dbserver 1521

Windows PowerShell:

Test-NetConnection dbserver -Port 1521

Successful communication confirms that the listener port is reachable.


Solution 9 – Trace the Network Route

Routing problems can prevent clients from reaching the Oracle server.

Linux:

traceroute dbserver

Windows:

tracert dbserver

Unexpected routing failures usually indicate a network infrastructure issue rather than an Oracle problem.


Solution 10 – Verify the JDBC URL

Many Java applications fail due to incorrect hostnames in JDBC URLs.

Correct example:

jdbc:oracle:thin:@//dbserver:1521/orcl

Confirm that:

  • The hostname exists.
  • The port is correct.
  • The service name is valid.

Solution 11 – Oracle RAC Considerations

In Oracle RAC environments, verify the SCAN listeners and VIP configuration.

Useful commands:

srvctl status listener

srvctl status scan_listener

srvctl status service

Ensure that SCAN hostnames resolve correctly from client machines.


Solution 12 – Oracle Data Guard Considerations

After a switchover or failover, application connection strings may still reference the old primary database hostname.

Verify:

  • Current primary database host.
  • Listener status.
  • DNS records.
  • Application connection strings.

Solution 13 – Oracle Cloud Infrastructure (OCI) Considerations

When Oracle databases are deployed in OCI, ORA-12545 may result from cloud networking restrictions.

Verify the following:

  • Virtual Cloud Network (VCN) configuration.
  • Security Lists.
  • Network Security Groups (NSGs).
  • Route Tables.
  • Internet Gateway or DRG configuration.
  • Public or Private IP addresses.

Ensure that TCP port 1521 (or your configured listener port) is permitted by all relevant OCI networking policies.


Real Production Case Study

A financial institution migrated its Oracle 19c production database to a new Linux server. The database and listener started successfully, but all application users received:

ORA-12545:
Connect failed because target host
or object does not exist

Investigation showed that the applications were still using the old hostname stored in their tnsnames.ora files.

The DBA updated the hostname, verified DNS resolution with nslookup, confirmed connectivity using tnsping, and validated listener availability with lsnrctl status.

After correcting the connection descriptor, all applications reconnected successfully without any changes to the Oracle database.


Production Troubleshooting Checklist

Verification Status
Hostname Correct
IP Address Verified
DNS Resolution Successful
Hosts File Verified
Ping Successful
Listener Running
Listener Port Reachable
tnsnames.ora Verified
sqlnet.ora Verified
Firewall Rules Verified
Application Connection String Verified
OCI / RAC / Data Guard Configuration Verified (if applicable)


Oracle Version Considerations

Although ORA-12545 has existed for many Oracle Database releases, the surrounding networking technologies have evolved significantly. Understanding the behavior across versions helps Oracle DBAs troubleshoot connectivity issues more efficiently.

Oracle Version Network Characteristics
Oracle 11g Traditional listener configuration with dynamic registration through PMON.
Oracle 12c Supports Multitenant (CDB/PDB) architecture and improved Oracle Net diagnostics.
Oracle 19c Long Term Support (LTS) release with enhanced Oracle Net stability and RAC networking.
Oracle 21c / 23ai Improved cloud connectivity, TLS support, and Oracle Cloud Infrastructure integration.

Oracle Multitenant (CDB/PDB) Considerations

In Oracle Multitenant environments, ORA-12545 is generally unrelated to the PDB itself. However, after a successful network connection, clients may still fail if the requested Pluggable Database is unavailable or if the service name is incorrect.

Verify the current container:

SHOW CON_NAME;

List all Pluggable Databases:

SHOW PDBS;

Open the required PDB if necessary:

ALTER PLUGGABLE DATABASE pdb_name OPEN;
DBA Tip

If the hostname is unreachable, Oracle returns ORA-12545 before any PDB validation occurs. Resolve network connectivity first, then verify database services.


Common Mistakes

  • Misspelled hostname in tnsnames.ora.
  • Using an outdated IP address after server migration.
  • Ignoring DNS resolution failures.
  • Incorrect entries in the operating system hosts file.
  • Firewall blocking the Oracle Listener port.
  • Testing only from the database server instead of the client machine.
  • Incorrect JDBC connection URL.
  • Using the wrong SCAN hostname in Oracle RAC.
  • Forgetting to update connection strings after Data Guard failover.
  • Assuming the Oracle Listener is at fault without verifying network connectivity.

Oracle DBA Best Practices

  • Use DNS aliases instead of hard-coded IP addresses whenever possible.
  • Maintain accurate DNS and hosts file entries.
  • Verify Oracle Listener availability after every server restart.
  • Document all Oracle Net configuration files.
  • Standardize listener ports across environments where practical.
  • Regularly validate firewall rules after infrastructure changes.
  • Test connectivity from both application servers and client workstations.
  • Monitor Oracle Listener logs for recurring connection failures.
  • Review network changes before Oracle maintenance activities.
  • Keep Oracle client software updated to supported versions.

ORA-12545 vs Other Oracle Network Errors

Error Meaning Primary Troubleshooting Area
ORA-12154 Cannot resolve connect identifier. TNS Alias / tnsnames.ora
ORA-12514 Listener does not know requested service. Database Service Registration
ORA-12541 No Listener. Oracle Listener
ORA-12545 Target host cannot be reached. Network / DNS / Hostname

Frequently Asked Questions (FAQ)

What causes ORA-12545?

ORA-12545 is typically caused by an invalid hostname, incorrect IP address, DNS resolution failure, firewall restrictions, routing issues, or an unreachable database server.

How do I test hostname resolution?

Use one of the following commands:

nslookup hostname

dig hostname

ping hostname

Can ORA-12545 occur if the listener is running?

Yes. ORA-12545 usually occurs before the Oracle Listener is contacted. The listener may be functioning normally, but the client cannot reach the database server.

How is ORA-12545 different from ORA-12541?

ORA-12545 indicates that the client cannot locate or reach the server. ORA-12541 means the client reached the server but could not communicate with an Oracle Listener.

Does ORA-12545 occur in Oracle RAC?

Yes. Incorrect SCAN hostname resolution, VIP configuration issues, or network problems between cluster nodes and clients can result in ORA-12545.


Useful Oracle Net Diagnostic Commands

Command Purpose
ping hostname Verify basic IP connectivity.
tnsping service_name Test Oracle Net connectivity.
lsnrctl status Display Oracle Listener status.
lsnrctl services Display registered database services.
nslookup hostname Verify DNS resolution.
dig hostname Detailed DNS lookup (Linux).
traceroute hostname Trace network path (Linux).
tracert hostname Trace network path (Windows).
Test-NetConnection hostname -Port 1521 Verify Oracle Listener port (PowerShell).

Related Oracle Articles


About the Author

Rana Abdul Wahid is a seasoned Oracle Database Consultant with more than 15 years of experience in Oracle Database Administration, Oracle E-Business Suite Application DBA, Oracle Cloud Infrastructure (OCI), Oracle RAC, Oracle Data Guard, RMAN Backup & Recovery, Performance Tuning, Linux/Unix Administration, MySQL, Microsoft SQL Server, PostgreSQL, and enterprise database management.

He shares practical Oracle DBA solutions, production-tested troubleshooting guides, Oracle networking best practices, backup and recovery strategies, and performance tuning techniques to help database professionals solve real-world Oracle challenges.

Learn more about the author →


Conclusion

The ORA-12545: Connect failed because target host or object does not exist error indicates that the Oracle client cannot locate or communicate with the database server. Unlike listener or service registration errors, ORA-12545 almost always points to a hostname resolution, DNS, routing, firewall, or general network connectivity issue.

By following a structured troubleshooting approach—verifying hostname resolution, testing network connectivity, confirming Oracle Net configuration, checking listener availability, and validating firewall settings—you can quickly identify the root cause and restore database connectivity with minimal downtime.

Final DBA Recommendation

Always begin with operating system networking tools such as ping, nslookup, and tnsping before modifying Oracle configuration files. In most production cases, ORA-12545 is resolved by correcting network configuration rather than changing Oracle Database settings.

Found this guide useful? Explore our Oracle Error Codes Guide for more Oracle DBA troubleshooting articles covering networking, backup and recovery, performance tuning, and security.

Comments