ORACLE 11G features a new feature that does not allocate segment when the table has no data to save space
Workaround:
1, insert a row, and then rollback will produce segment.
The method is to insert data into the empty table and then delete it, resulting in segment. When exporting, you can export empty tables.
2. Set Deferred_segment_creation parameters
SQL code
- Sql>show parameter Deferred_segment_creation
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- Deferred_segment_creation boolean TRUE
- Sql> alter system set deferred_segment_creation=false;
- The system has changed.
- Sql> Show Parameter Deferred_segment_creation
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- Deferred_segment_creation boolean FALSE
The parameter value is true by default, and segment is assigned when false, whether it is an empty table or a non-empty table.
It is important to note that this value is set to no effect on previously imported empty tables, and still cannot be exported, but can only work on the new tables that are created later. You can only use the first method if you want to export an empty table before.
After a long time, I finally found this method.
Check all empty tables under the current user first
Select table_name from user_tables where num_rows=0;
Find the empty table using the following sentence
Select ' ALTER TABLE ' | | table_name| | ' allocate extent; ' from User_tables where num_rows=0
Export the query results and execute the exported statement
And then execute
http://inshect.iteye.com/blog/1567504
Oracle Import Empty Table method