DBMS_METADATA.GET_DDL for 'DB_LINK' Always Returns BY VALUES ':1'
(Doc ID 1912244.1)
Last updated on JULY 25, 2023
Applies to:
Oracle Database - Enterprise Edition - Version 11.2.0.4 and laterOracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.
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
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |