[Oracle] Global name setting when db links doesn't work without ".world"
This article is showing how to resolve issue when query has an issue during its execution with database link.
When the query works with ".world" on the db link name, but it doesn't work without ".world".
Example) This has been tested on Oracle Database 12.2
17:14:27 TESTDB> select 1 from dual@SIMPLE;
select 1 from dual@SIMPLE
*
ERROR at line 1:
ORA-02019: connection description for remote database not found
Elapsed: 00:00:00.00
17:14:40 TESTDB> select 1 from dual@SIMPLE.world;
1
----------
1
Then, the global name setting should be checked :
17:20:58 TESTDB> select * from global_name;
GLOBAL_NAME
------------------------------
TESTDB
There is no ".world" at the end of the global_name. So just this simply can be updated with the following command. (No database bounce required)
17:21:58 TESTDB> ALTER DATABASE RENAME GLOBAL_NAME TO TESTDB.WORLD;
17:21:28 TESTDB> select * from global_name;
GLOBAL_NAME
------------------------------
TESTDB.WORLD
17:21:28 TESTDB> select 1 from dual@SIMPLE;
1
----------
1
FYI, this is not related with db domain name setting. If db_domain is changed, then you will need to change lots of things such as db service names, listeners, and so on. Please don't touch db_domain name for only this ".world" on db link name issue.
17:22:03 TESTDB> show parameter domain
NAME TYPE VALUE
------------------------------------ ---------- ------------------------------
db_domain string