ORACLE11G Database Export Report "EXP-00003: Storage definition for segment (0,0)" Error solution

Source: Internet
Author: User

When exporting data for a oracle11.2.0.2 server, the "EXP-00003: storage definition for segment (0,0)" error was reported. The initial analysis is due to the fact that the data table is empty and the table causes the problem.

An empty table cannot be exported when Oracle 11G is exported with export
There is a new feature in 11GR2 that does not allocate segment when the table has no data to save space
Workaround:
First, 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.
Second, set the Deferred_segment_creation parameter
The parameter value is true by default, and segment is assigned when false, whether it is an empty table or a non-empty table. To modify an SQL statement:
alter system Setdeferred_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, use the following sentence to find the empty table
Select ' ALTER TABLE ' | | table_name| | ' allocate extent; ' from User_tables wherenum_rows=0;
Export the query results, execute the exported statements, forcibly modify the segment value, and then export the empty table

You can generate SQL statements for database updates in the following ways:
executed in the PL/SQL command window
Set heading off;
Set echo off;
Set feedback off;
Set termout on;
Spool C:\alterTableSql.sql;
Select ' ALTER TABLE ' | | table_name| | ' allocate extent; ' from User_tables where num_rows=0;
Spool off;
The empty table update SQL is automatically generated into the Altertablesql.sql file of the C packing directory. Then execute the SQL file to update the database.

Select ' ALTER TABLE ' | | table_name| | ' allocate extent; ' from User_tables where num_rows=0;
can also be replaced by:
Select ' ALTER TABLE ' | | table_name| | ' allocate extent; ' from User_tables where segment_created= ' NO ';

This article is from "It Xiao Xiang Pig" blog, please be sure to keep this source http://edmzkj.blog.51cto.com/9115753/1433814

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.