Oracle 11g R2 cannot export empty tables with exp Solution

Source: Internet
Author: User


The solution for Oracle 11g R2 to export empty tables with exp is a new feature in 11G R2. When there is no data in the table, no segment is allocated to save space. Of course, when Oracle executes export, empty tables cannot be exported, but there is still a solution: 1. insert a row and then roll back to generate a segment. This method inserts data into an empty table and then deletes it, resulting in a segment. An empty table can be exported. 2. Set the deferred_segment_creation parameter. The default value of this parameter is TRUE. When it is set to FALSE, segment is allocated to both empty tables and non-empty tables. Modify the SQL statement: alter system set deferred_segment_creation = false scope = both; www.2cto.com note that the value cannot be exported because it does not affect the empty table imported previously, only the newly added tables can be used. To export an empty table, you can only use the first method. 3. Use the following statement to find an empty table: select 'alter table' | table_name | 'allocate extent; 'fromuser_tables where num_rows = 0; export the query result and execute the Export Statement, forcibly modify the segment value and then export it to export the empty table. Note: before inserting data into the database, modify the 11g_R2 parameter to export the empty table to search for the empty table: select 'alter table' | table_name | 'allocate extent; 'from user_tables where num_rows = 0 author Wu weilong

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.