Output Cuts in the Middle of Words when Using Dbms_metadata.Get_ddl (Doc ID 391337.1)

Last updated on JULY 19, 2017

Applies to:

SQL*Plus - Version 9.2.0.7 to 12.1.0.2 [Release 9.2 to 12.1]
Information in this document applies to any platform.

Symptoms

When using the dbms_medadata.get_ddl to obtain the data definition language used to create the object, the output returns lines randomly truncated in the middle of words at the end of the line regardless of the linesize set (i.e. ENAB LE, etc).

For Example:

SQL> set linesize 500
SQL> set long 40000
SQL> show linesize
linesize 500
SQL> show long
long 40000

SQL> select dbms_metadata.get_ddl('TABLE','INVENTORIES') from dual;

DBMS_METADATA.GET_DDL('TABLE','INVENTORIES')
--------------------------------------------------------------------------------

CREATE TABLE "OE"."INVENTORIES"
( "PRODUCT_ID" NUMBER(6,0),
"WAREHOUSE_ID" NUMBER(3,0) CONSTRAINT "INVENTORY_WAREHOUSE_ID_NN" NOT NULL ENAB
LE,
"QUANTITY_ON_HAND" NUMBER(8,0) CONSTRAINT "INVENTORY_QOH_NN" NOT NULL ENABLE,
...

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms