GLOBAL_NAMES=TRUE forces DBLINK to use local domain name
SQL> create database link REMOTEDB connect to REMOTEUSER identified by
USERPASSWORD using 'REMOTEDB';
The TNS entry for this database (which works) is:
REMOTEDB.A.B.C, REMOTEDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostn)(PORT= ####))
(ADDRESS = (PROTOCOL = TCP)(HOST = hostm)(PORT= ####))
(ADDRESS = (PROTOCOL = TCP)(HOST = hosto)(PORT= ####))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = REMOTEDB)
)
)
I test the dblink to make it's working, but it's not, seems to force the local domain name into the dblink name.
SQL> select 'HI' from dual@REMOTEDB;
select 'HI' from dual@REMOTEDB
*
ERROR at line 1:
ORA-02085: database link REMOTEDB.WORLD connects to REMOTEDB