Friday, October 14, 2016

Backup the Database Links


set lines 130
set pages 200
select  'DB link for '||b.username||chr(10)||'  create  database  link '||c.name||' connect to '||c.userid|| ' identified  by '||c.password||'   using '''||c.host||''';'
from dba_users b ,link$ c
where c.owner#=b.user_id
union
select  'DB link for Public' ||chr(10)|| '  create public  database  link '||c.name||' connect to
'||c.userid|| ' identified  by '||c.password||'   using '''||c.host||''';'
from link$ c
where owner#=1;

No comments:

Post a Comment