HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

DBMS_METADATA.GET_DDL not displaying complete DDL for big tables

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
tablesdbms_metadatadisplayingddlcompletebigget_ddlfornot

Problem

While generating the DDL for a schema, big tables' DDL are getting truncated. After displaying close to 110 rows I am getting an ellipsis (...).

I am using SQL developer to run:

SELECT dbms_metadata.get_ddl('TABLE',TABLE_NAME,OWNER)
FROM DBA_TABLES
WHERE OWNER = 'XYZ'

Solution

Just set the "long" in the sql sheet window big enough to hold the desired ddl.

Example:

set long 1000
select dbms_metadata.get_ddl('TABLE', 'XP','OPS$RM74384') from dual;


-- Then just hit Run Script button or press f5.

Code Snippets

set long 1000
select dbms_metadata.get_ddl('TABLE', 'XP','OPS$RM74384') from dual;

Context

StackExchange Database Administrators Q#112659, answer score: 4

Revisions (0)

No revisions yet.