Did u ever wanna export your oracle schema on 11g version R2, but the empty tables are not exported ?
This is happened because of new features on oracle 11g R2 deferred segment creation.
On oracle documentation explicitly stated when creating a non-partitioned heap-organized table in a locally managed tablespace, table segment creation is deferred until the first row is inserted. This is set via setting the initialization parameter DEFERRED_SEGMENT_CREATION TRUE, which is default when you create DB. Having said that unless you insert first record object is not visible to our traditional exp tool.
This new features has advantages such as :
- Reduce amount of disk space
- Reduce time on installation state
If u insist of using old method export, the work around is :
1. Alter all table and allocate extents using :
ALTER TABLE tablename ALLOCATE EXTENT;
2. Alter system and set Deferred Segmentation = False
ALTER SYSTEM SET DEFERRED_SEGMENT_CREATION=FALSE; Below is simple script to allocate extent to all tables, DECLARE CURSOR C1 IS SELECT table_name FROM user_tables; v_stmt VARCHAR2(32767) := NULL; BEGIN FOR I IN C1 LOOP v_Stmt := 'ALTER TABLE '||I.table_name||' ALLOCATE EXTENT'; EXECUTE IMMEDIATE v_stmt; v_stmt := NULL; END LOOP; END; /
Jakarta, 12 January 2012
A. Ahmad Kusumah
Menara Kadin
