DDL - Generate portable database link with passwords
-- Recreate DB_links with Password values
-- @ddl_db_links.sql
--
set pages 100
set lines 200
select 'CREATE'||decode(owner_name,'PUBLIC',' PUBLIC',' ')||' DATABASE LINK ' ||name|| chr(10) ||' CONNECT TO '||userid||
        ' IDENTIFIED BY VALUES '''||passwordx||''''||chr(10)||' USING '''||host||''';' as db_link_ddl
       from ku$_dblink_view
order by 1       
;