I faced with a odd situation.I `d like to copy some databases link from source DBs to target DBs. In order to create database link in target database, I decided to run "create database link" sql statement.However, for creating database link in target database, I need to know username and password which is currently used by the existing database link in source database.
sys.link$ has unencrypted password value for each database link.
The following is sample query.
select 'create database link ' || name ||' connect to '|| userid ||' identified by ' || password || ' using '||''''||host ||''''||';' from sys.link$