How to generate DDL for db_links

Is there anyway to extract ddl for all database links in Oracle 18c/12c/11g and perhaps find the password of the connect string? YES you can! COLUMN Text FORMAT a2480 WORD_WRAPPED SET LONG 20000 LONGCHUNKSIZE 20000 PAGESIZE 0 LINESIZE 1000 FEEDBACK OFF VERIFY OFF TRIMSPOOL ON head off exec DBMS_METADATA.set_transform_param (DBMS_METADATA.session_transform, ‘SQLTERMINATOR’, true); exec DBMS_METADATA.set_transform_param (DBMS_METADATA.session_transform, ‘PRETTY’, […]

Generate and format trigger DDL

How to format DBMS_METADATA.GET_DDL? To get a formatted definition of your DDLs, with all the semicolons and avoid lines break (Wrapped lines). Here is an example to retrieve the DDL of a triggers using the DBMS_METADATA package. For Oracle 18c / 12c / 11g / 10g: COLUMN Text FORMAT a2480 WORD_WRAPPED SET LONG 20000 LONGCHUNKSIZE […]