My Oracle Support Banner

"DBMS_METADATA.GET_DDL" Does Not Show Newly Created Interval Partitions for Interval partitioned Tables & Indexes (Doc ID 1491820.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 to 12.2.0.1 [Release 11.1 to 12.2]
Information in this document applies to any platform.

Symptoms

"DBMS_METADATA.GET_DDL" Does Not Show Interval Partitions created by the system for interval partitioned tables and indexes.

In the case of Interval Partitioning, New Partitions are created automatically when corresponding row is inserted.  This newly created partition information will be displayed in "DBA_TAB_PARTITIONS" dictionary view. However when the DDL is queried using function "DBMS_METADATA.GET_DDL", then this information is not shown. 

Output:

CREATE TABLE "SCOTT"."TEST_INTERVAL"
   (    "FECHA" DATE,
        "NUMERO" NUMBER
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
  STORAGE(
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS"
  PARTITION BY RANGE ("FECHA") INTERVAL (NUMTOYMINTERVAL(1,'MONTH'))
 (PARTITION "P_20060201"  VALUES LESS THAN (TO_DATE(' 2006-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) SEGMENT CREATION IMMEDIATE
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 8388608 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" )

"DBMS_METADATA.GET_DDL" package behaves same way for local indexes of Interval Partitioned tables as it did above for table partitions.

Cause

To view full details, 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 a vibrant support community of peers and Oracle experts.