SQL Query to list all DB Links in a database

By | October 10, 2015
/*********************************************************
 *PURPOSE: Query to list all DB Links in a database      *
 *AUTHOR: Shailender Thallam                             *
 *********************************************************/
SELECT obj.object_type "Object Type",
  obj.owner            "Object Owner",
  obj.object_name      "Object Name",
  obj.STATUS           "Object Status",
  dbl.db_link          "DB Link",
  dbl.username         "DB User Name",
  dbl.host             "DB Host"
FROM dba_objects obj,
  dba_db_links dbl
WHERE obj.object_name = dbl.db_link
AND obj.object_type   = 'DATABASE LINK';
WOW! Did you like this post? We'll send more interesting posts like SQL Query to list all DB Links in a database to you!
Enter your Email Address: