Thinking Out Loud

April 23, 2014

Missing Password for Database Link Bug

Filed under: 11g,oracle — mdinh @ 3:50 am

So there I was, working on another database duplication project, the requirement is to save the existing database links.

Sounds pretty easy, right?

SELECT OWNER, DB_LINK, DBMS_METADATA.GET_DDL('DB_LINK',DB_LINK,OWNER) as DDL FROM DBA_DB_LINKS;

Wrong and I know why I am getting bald. Pulling my hair out.

After searching for hours, I found DBMS_METADATA.GET_DDL database link password missing

Another 11.2.0.4 Bug.

I believe the bug was introduced when I modified user’s password as shown below since ¬†everything was working fine just hours ago.

alter user SCOTT identified by values 'S:EDCCC6A91707D978B7D49476BCA228BC7D702C135557F41154ACBF744645;F894844C34402B67';

Got desperate and restored the database which did not help.

Now what and how is one suppose to save database links info?

Find out more here

About these ads

3 Comments »

  1. Hi,
    what about using values from passwordx column sys.link$ passwordx .
    And provide them in :
    CREATE DATABASE LINK “LINK CONNECT TO USER IDENTIFIED BY VALUES ’05F57DA167252CDAD388952CAE91A1ED33′ USING ‘testdb’;

    G

    Comment by goryszewskigGG — April 23, 2014 @ 10:12 am | Reply

    • Did not work for me, please see updated test case.

      Comment by mdinh — April 23, 2014 @ 12:57 pm | Reply

  2. Hi,
    What has changed in 11.2.0.4 and 12.1.0.1 is just the /rdbms/xml/xsl/kudblink.xsl so can use the old version I guess… Or get the encrypted password with:
    select extract(xmltype(dbms_metadata.get_xml(‘DB_LINK’,…)),’//PASSWORDX/text()’).getStringVal() from dual;
    Note that the ‘identifed by value’ is not documented and not supported as stated in https://support.oracle.com/epmos/faces/DocContentDisplay?id=1309705.1 about bug 12866600
    Regards,
    Franck.

    Comment by @FranckPachot — April 23, 2014 @ 4:14 pm | Reply


RSS feed for comments on this post. TrackBack URI

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

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 294 other followers

%d bloggers like this: