Skip to Main Content

SQLcl: MCP Server & SQL Prompt

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!

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
126 views