Skip to Main Content

SQLcl

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Inablity to get DDL for public synonyms with ddl command

Patrick JolliffeMay 21 2025

dbms_metadata works, so I feel the ddl command should work as well, but it doesn't. I tried a few different options, but nothing worked.

SQL> select dbms_metadata.get_ddl('SYNONYM', 'PS', 'PUBLIC') FROM DUAL;
DBMS_METADATA.GET_DDL('SYNONYM','PS','PUBLIC')                             
__________________________________________________________________________
 CREATE OR REPLACE NONEDITIONABLE PUBLIC SYNONYM "PS" FOR "SYS"."DUAL"    

SQL> DDL PUBLIC.PS
Object PUBLIC.PS not found
SQL> DDL PUBLIC.PS SYNONYM
Object SYNONYM PUBLIC.PS not found
Comments
Post Details
Added on May 21 2025
0 comments
43 views