Oracle 23.26ConnectionLab-verified · 2026-12-02

ORA-12262: Cannot connect to database. Could not resolve hostname

The host name in the Easy Connect string cannot be resolved on the database server.

Oracle AI Database 26ai Free 23.26.3.0.0
ORA-12262: Cannot connect to database. Could not resolve hostname ********* in Easy Connect connection string *********

Jump to a cause

  1. 01Easy Connect string in a DB link uses a host name the server cannot resolve

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-12262 appears when the host in an Easy Connect string (host:port/service) cannot be resolved. In our Oracle 26ai run, both the host name and the connection string were masked as ********* in the message, and there was no Korean or Japanese translation.

This page shows a database link case reproduced on Oracle 26ai Free: USING 'erp-db01:1521/FREEPDB1', where the database server does not know erp-db01. Creating the link succeeds; the error appears on the first query through it.

FAQ

ORA-12262 shows the hostname as *********. How do I find it?

The message masked both the host and the connection string. For a DB link, SELECT db_link, host FROM user_db_links; showed the full string, erp-db01:1521/FREEPDB1.

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

CREATE DATABASE LINK does not connect. The host name was resolved only on the first query through the link, and that is where ORA-12262 appeared.

What is the difference between ORA-12262 and ORA-12545?

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

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