rem ********************************************************************
rem * Author            : Rick Kupcunas
rem * Original          : 10-MAY-95
rem * Description       : Shows the data for a given synonym
rem * Usage             : start show_syn.sql <date>  e.g. 03-MAR-95
rem *                                        <Program Name>
rem *                                        <Max run time (min.)>
rem *
rem ********************************************************************

spool show_syn.rslt;

set pagesize 100;
set linesize 132;
set long 300;

select substr(owner,1,12)          		"OWNER",
       substr(synonym_name,1,20)   		"SYNONYM",
       substr(table_owner,1,12)                 "TBL OWN",
       substr(table_name,1,20)                  "TABLE",
       substr(DB_LINK,1,20)        		"LINK NAME"
       from     sys.dba_synonyms
       where    synonym_name = upper('&&SYNONYM_NAME')
       or table_name = upper('&&SYNONYM_NAME');

spool off;
undefine SYNONYM_NAME;

