Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


database links

Posted on 2011-10-06
Medium Priority
Last Modified: 2012-05-12
Hi Guys,
There is any query to get code of all the database links in a database'.
Question by:nirvairghuman
  • 2
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 36925346
Not the entire SQL string per say.

You can get most of the info from dba_db_links and if the links are not public, even the password from user_db_links.
LVL 74

Accepted Solution

sdstuber earned 500 total points
ID: 36925789
sselect dbms_metadata.get_ddl('DB_LINK',db_link,owner) from dba_db_links
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 36925810
I guess there is a way after all.
LVL 35

Expert Comment

by:Mark Geerlings
ID: 36925902
I usually use this query for that:

select OWNER, DB_LINK, USERNAME, HOST, to_char(CREATED,'DD-MON-YY HH24:MI:SS') "Created"
from all_db_links;

Note that there are some other columns available in this view.  Also, you could use either the dba_db_links or user_db_links (which will not have the "owner" column) instead of the "all..." view depending on your logon priviliges.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Via a live example, show how to take different types of Oracle backups using RMAN.
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question