ORACLE11G cannot export empty table

Source: Internet
Author: User

oracle11g database migration, habitual use of exp/imp, and then found in the new database, empty table at all did not exp out, and then check the information, found the following information:


An empty table cannot be exported when ORACLE 11G is exported with export.

A new feature in 11G 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
The parameter value is true by default, and segment is assigned when false, whether it is an empty table or a non-empty table.

  alter system set DEFERRED_SEGMENT_CREATION=FALSE;

Select ' ALTER TABLE ' | | table_name| | ' allocate extent; ' from User_tables where num_rows=0

It is important to note that this value, when set, does not work for empty tables that previously existed, and still cannot be exported, but can only work on the new tables that are added later. If you want to export an empty table before, you can only use the first method

For a DBA to create a new database, I personally recommend that you set up an empty database and immediately execute
Alter system set Deferred_segment_creation=flase Sscope=spfile;
SHUTDOWM Immediate
Startup

ORACLE11G cannot export empty table

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.