rem ********************************************************************
rem * Author            : Rick Kupcunas
rem * Original          : 10-MAY-95
rem * Description       : Shows the data for all database links
rem * Usage             : @C:\rkupcuna05_ora\Oracle\SQL\show_lnk.sql <date>  e.g. 03-MAR-95
rem *                                        <Program Name>
rem *                                        <Max run time (min.)>
rem *
rem ********************************************************************

spool show_lnk.rslt;

set pagesize 100;
set linesize 132;
set long 40;
break on "OWNER" on "DB LINK" on "USERNAME";

select substr(owner,1,6)          "OWNER",
       substr(db_link,1,40)        "DB LINK",
       substr(username,1,6)       "USERNAME",
       substr(host,1,15)           "HOST",
       to_char(created, 'YYYY-MON-DD HH:MI:SS am')                     "CREATED"
       from     sys.dba_db_links
where db_link like '%PROD%';

spool off;

