col owner for a20
col db_link for a20
col username for a20
select OWNER,DB_LINK,USERNAME from dba_db_links;
set long 1000000
SET PAGESIZE 3000
set lines 200
SET HEADING OFF
SET VERIFY OFF
SET FEEDBACK OFF
set echo on
set timing off
set wrap On
SET LONGCHUNKSIZE 400
SELECT dbms_metadata .get_ddl('DB_LINK',DB_LINK,OWNER) from dba_db_links;