How do I know which database links are used in queries for Oracle RDBMS?

I would like to know if there are any and which database links are used, for the schema and in which tables. Is this possible through a data dictionary?

Is this possible with Oracle RDBMS?

+5
source share
3 answers

This will show you any links to the databases created in the database:

select * from dba_db_links;

Then you will need to search for any queries or objects using the db link, doing their text search for the link syntax <tablename>@<dblink name>

+3
source

I know that Dugman’s answer is accepted and accurate. But here is some more information.

DBA, DBA_DB_LINKS. , USER_DB_LINKS db, , , .

ALL_DB_LINKS, , .

select * from all_db_links;
+3

You can first edit all the sql schema code: for example:

SELECT DBMS_METADATA.GET_DDL(object_type, object_name, owner)
  FROM all_OBJECTS
  WHERE (OWNER = 'your schema name');

and then search for the result of the db_link template, which looks like @dblink_name.

+1
source

All Articles