An empty table cannot be exported using exp. solution/cause of table loss when using exp to export data

Source: Internet
Author: User


An empty table cannot be exported using exp. solution/the earliest reason for table loss when using exp to export data using oracle 11g is that some tables are lost, which is inexplicable, then I finally found the cause. Find the problem and check the solution. There is a new feature in www.2cto.com 11GR2. When the table has no data, no segment is allocated to save space. However, when using EXPORT for EXPORT, empty tables cannot be exported, as a result, some tables are lost during migration and the storage process becomes invalid. I thought there was a corresponding control switch for EXP. I could switch whether to export an empty table or not. I checked the help and it didn't change much. Some strange, do 11GR2 do not update EXP function, also see some posts said 11GR1 as the client to uninstall 11GR2, will appear ora-1455d error, have to change to 11GR2 exp is okay, I feel deeply that compatibility between versions is so fragile! 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: www.2cto.com alter system set deferred_segment_creation = false scope = both; note that the value cannot be exported because it does not work for empty tables previously imported, 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 and allocate space: select 'alter table' | table_name | 'allocate extent; 'from user_tables where num_rows = 0; export the SQL query results, execute the exported statement, and change the segment value in the space allocated by the strong behavior table. Then, export the results to export the empty table.

Related Article

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.