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.
01Easy Connect string in a DB link uses a host name the server cannot resolve
The link was created with USING 'erp-db01:1521/FREEPDB1'. Creating it worked. The first SELECT COUNT(*) FROM user_tables@erp_link failed with ORA-12262, because the database server could not resolve erp-db01. The message showed only ********* instead of the host name.
Setup
GRANT CREATE DATABASE LINK TO lab_a, lab_b;Grant succeeded.CREATE DATABASE LINK erp_link CONNECT TO lab_b IDENTIFIED BY lab USING 'erp-db01:1521/FREEPDB1';Database link created.SELECT COUNT(*) FROM user_tables@erp_link;SELECT COUNT(*) FROM user_tables@erp_link
*
ERROR at line 1:
ORA-12262: Cannot connect to database. Could not resolve hostname ********* in Easy Connect connection string *********
Help: https://docs.oracle.com/error-help/db/ora-12262/COLUMN db_link FORMAT a10
COLUMN host FORMAT a25
SELECT db_link, host FROM user_db_links;DB_LINK HOST
---------- -------------------------
ERP_LINK erp-db01:1521/FREEPDB1
1 row selected.user_db_links shows HOST = erp-db01:1521/FREEPDB1, so the masked host name is erp-db01.
DROP DATABASE LINK erp_link;
CREATE DATABASE LINK erp_link CONNECT TO lab_b IDENTIFIED BY lab USING 'localhost:1521/FREEPDB1';Database link dropped.
Database link created.We recreated the link with the real server name, USING 'localhost:1521/FREEPDB1' in this lab. The same query returned a row.
SELECT COUNT(*) FROM user_tables@erp_link; COUNT(*)
----------
0
1 row selected.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