Forum Stats

  • 3,874,182 Users
  • 2,266,679 Discussions
  • 7,911,761 Comments

Discussions

SELECT DBMS_METADATA.GET_DDL without storage and constraints

user545194
user545194 Member Posts: 637 Bronze Badge

Hi,

Oracle Database 19c SE2

We need to generate the table ddl from a remote database, but without the storage and constraints section.

I found these built-in packages,

exec DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'STORAGE',false);
exec DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM, 'CONSTRAINTS',false);
exec DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM, 'REF_CONSTRAINTS',false);

but they have to be executed on the remote server prior to running the ddl package if I am not mistaken.

SELECT DBMS_METADATA.GET_DDL ...
Tagged:

Answers