DBMS_METADATA.GET_DDL for 'DB_LINK' Always Returns BY VALUES ':1' (Doc ID 1912244.1)

Last updated on DECEMBER 01, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Information in this document applies to any platform.
***Checked for relevance on 01-Dec-2016***

Symptoms

In versions earlier than 11.2.0.4, DBMS_METADATA.get_ddl for 'DB_LINK'  would return encrypted password for values in identified by clause. So the returning command could be run successfully to recreate the db link in some other database.

Starting 11.2.0.4, DBMS_METADATA.get_ddl for 'DB_LINK'  would return ':1' for values in identified by clause.

eg.

On 11.2.0.1:
=========

SQL> create database link db11201 connect to vp identified by vp using 'ORCL';
SQL> set long 1000000 linesize 1000 pagesize 0 feedback off trimspool on verify off serveroutput on
SQL> select dbms_metadata.get_ddl('DB_LINK','DB11201.VP.COM') from dual;

 CREATE DATABASE LINK "DB11201.VP.COM"
  CONNECT TO "VP" IDENTIFIED BY VALUES '05755352C6B78A96D8B47A8557DE0E2A08'
  USING 'ORCL'

On 11.2.0.4:
=========

SQL> create database link db11204 connect to vp identified by vp using 'ORCL';
SQL> set long 1000000 linesize 1000 pagesize 0 feedback off trimspool on verify off serveroutput on
SQL> select dbms_metadata.get_ddl('DB_LINK','DB11204') from dual;

 CREATE DATABASE LINK "DB11204"
  CONNECT TO "VP" IDENTIFIED BY VALUES ':1'
  USING 'ORCL'

Changes

 None

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms