select  dbms_metadata.get_ddl(‘INDEX’, a.object_name)
from    dba_objects a
where object_name like ‘%ORDERS%’ AND
          OWNER = ‘BOBJ_LOGIN’ AND
          OBJECT_TYPE = ‘INDEX’

SET LONG 2000000
SET PAGESIZE 0
SELECT DBMS_METADATA.GET_XML(‘TABLE’,’EMP’,’SCOTT’) FROM DUAL;

select dbms_metadata.get_ddl(‘TABLESPACE’,a.name) from v$tablespace a;

select dbms_metadata.get_ddl(‘TABLESPACE’,a.name) from v$tablespace a where a.name=’ORDERAUDIT_PAR02′;

DBMS_METADATA.GET_DDL(‘TABLESPACE’,A.NAME)
——————————————————————————–

CREATE TABLESPACE “ORDERAUDIT_PAR02” DATAFILE ‘+ASM_ORADATA41/p01dwh/datafile/orderaudit_par02.386.635681395’ SIZE 30064771072
  AUTOEXTEND ON NEXT 2G MAXSIZE 31744M LOGGING ONLINE PERMANENT BLOCKSIZE 8192
  EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO
  ALTER DATABASE DATAFILE ‘+ASM_ORADATA41/p01dwh/datafile/orderaudit_par02.386.635681395’ RESIZE 42949672960

 

explain plan for select min(ORDER_ID), max(ORDER_ID) from MIDDLEOFFICE.ORDERS PARTITION (NOT_PENDING);
SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());