Getting password from database link

This post is more a reminder to myself. How to get the password from a databaselink definition? Simple:

select name    as db_link
,      userid  as username
,      utl_raw.cast_to_varchar2
         ( dbms_crypto.decrypt(substr(passwordx,19)
                              , 4353
                              , substr(passwordx,3,16)
                              )
         ) as pwd
from sys.link$ 

Thanks to Paul M. Wright

Of course you need special privileges to select from link$…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s