database links

Posted on 2011-10-06
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
    LVL 76

    Expert Comment

    by:slightwv (䄆 Netminder)
    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 73

    Accepted Solution

    sselect dbms_metadata.get_ddl('DB_LINK',db_link,owner) from dba_db_links
    LVL 76

    Expert Comment

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

    Expert Comment

    by:Mark Geerlings
    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

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
    Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
    This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    733 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now