Oracle 11gR2 cannot export empty table solution with exp
in the 11gR2There is a new feature that does not allocate when the table has no datasegmentto save space,Oracleof course, in execution .Exportwhen exporting, empty tables cannot be exported, but there are workarounds:
Workaround:
First,Insertline, and thenrollbackwill producesegmentup.
the method is to insert data into the empty table and then delete it, resulting insegment. When exporting, you can export empty tables.
Second,Setdeferred_segment_creationParameters
This parameter value defaults to Span style= "Word-wrap:break-word; Color:rgb (102,102,102); Font-family: Song body, Arial; Line-height:26px ">true false segment SQL statement:
Sql> alter system set DEFERRED_SEGMENT_CREATION=FALSE Scope=both;
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.
Third,with the followingSQLstatement to find an empty table
Sql>select \ ' ALTER TABLE \ ' | | table_name| | \ ' Allocate extent;\ ' from User_tables where num_rows=0;
Export the query results, execute the exported statements, and forcibly modifysegmentvalue, and then export the empty table,
Note: Before inserting data into the database, modify 11G_R2parameter can export empty table
Find an empty table and generate an Update table statement:
Sql> select \ ' ALTER TABLE \ ' | | table_name| | \ ' Allocate extent;\ ' from User_tables where num_rows=0
Oracle 11gR2 cannot export empty table solution with exp