Oracle 23.26ConnectionLab-verified · 2026-12-02

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

The host in the connect string cannot be reached by that name, or the string is not in a format Oracle Net reads as host and service.

Oracle AI Database 26ai Free 23.26.3.0.0
ORA-12545: Connect failed because target host or object does not exist

Jump to a cause

  1. 01The connect descriptor's HOST is a server name that cannot be resolved
  2. 02A JDBC-style host:port:SID string used in USING

Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-12-02 · container image gvenzl/oracle-free:23-slim

ORA-12545 means the connection never reached a listener: the host part of the connect string could not be used. In Oracle 26ai the message reads "Connect failed because target host or object does not exist" (older versions start it with "TNS:").

This page shows two database link cases that we reproduced on Oracle 26ai Free: a connect descriptor whose HOST is a server name this machine does not know, and a JDBC-style host:port:SID string copied into USING. In both cases CREATE DATABASE LINK succeeds, and the error appears on the first query through the link.

FAQ

What does ORA-12545 connect failed because target host or object does not exist mean?

The host part of the connect string could not be used. In our runs it was a server name the database server did not know (erp-db01) and a JDBC-style localhost:1521:FREEPDB1 string.

The DB link was created without error. Why ORA-12545 later?

CREATE DATABASE LINK does not connect. Both of our links were created successfully, and ORA-12545 appeared on the first query through the link.

How do I see which host a DB link uses?

Query SELECT db_link, host FROM user_db_links;. The HOST column showed the exact USING string, including the full descriptor.

Can I use a JDBC URL format like host:1521:SID in a DB link?

In our run 'localhost:1521:FREEPDB1' failed with ORA-12545, and 'localhost:1521/FREEPDB1' (slash before the service name) worked.

Why do I get ORA-12262 instead of ORA-12545 for an unknown host?

In our 26ai tests an unknown host in a full (DESCRIPTION=...) descriptor gave ORA-12545, while the same unknown host in an Easy Connect string erp-db01:1521/FREEPDB1 gave ORA-12262.

How we verify

Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.

lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free 23.26.3.0.0