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 (<= 126.96.36.199)!
Starting with Oracle 188.8.131.52, 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-184.108.40.206, 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: