Alright, so when we need to recreate a database link for some reason and we do not happen to have the password handy, we’re usually stuck. However, sometimes there is a way to recover passwords for database links.
The method described below only works for the “old” password versions (<= 188.8.131.52)!
Starting with Oracle 184.108.40.206, Oracle salts the password hashes, therefore you will need to crack the password and cannot just query it. However, if the database link was created pre-220.127.116.11, the password is saved in an “old” format without the salt. To check if there are any database links with this old format, query
SYS.LINK$ like so: