Oracle 11gR2 cannot export empty table solution with exp

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.