While researching a security concern, I discovered that users are able to query a remote database without the need of a dblink.
However, this was only true for databases that had no value for DB_DOMAIN
. If the local database's DB_DOMAIN
was qualified with "foo.com", then a user could not query the remote DB and required a dblink.
I could not find any documentation that explains why this happens and am a very new DBA. What is it about Oracle that allows this to happen? Is the only way to prevent this to qualify every database's DB_DOMAIN
with "foo.com"?
Example of accessing information from remote DB without a dblink below:
From DB: FooB
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Feb 26 16:05:21 2015
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter db_domain;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_domain string
From DB:FooA
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Feb 26 16:08:25 2015
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter db_domain;
NAME TYPE VALUE
------------------------------------ ----------- -----------------------------
db_domain string
SQL> select sysdate from dual@FooB;
SYSDATE
---------
26-FEB-15
SQL> select db_link from all_db_links;
no rows selected
Best Answer
What you described here is absolutely normal and intended. This feature is called a global database link:
http://docs.oracle.com/cd/E24693_01/server.11203/e17120/ds_concepts002.htm#i1007888
It is a "side effect" when for example Oracle Internet Directory is in use, I have seen this at a few companies who have a lot of databases.
More and better explanation can be found in the support note: What are Global Database Link and How do you Disable them? (Doc ID 1632329.1)