Tag: statement attribute present use Export data query default delay what to do
One: Background introduction
oracle11g when exporting a database table with the EXP command, it is sometimes found that only a subset of the tables are exported and will not be error-free because the empty table has not been exported and has not been found before. So the most stupid way to re-build these empty tables, of course, in our actual table in the number of large when we should do??? There is no such issue in the oracle10g version.
So the data found that oracle11g has a new feature, added a new feature "deferred_segment_creation" meaning is the paragraph delay creation, the default is true.
What does it mean exactly? Let's explain the following:
If this parameter is set to True, you create a new table and do not insert data into it, the table will not immediately allocate extend, that is, no data space, that is, the table does not allocate segment to save space, so the tables are not exported. You can also see in the system table user_tables that the segment_treated field is "NO" or "YES" to indicate whether a table is assigned a segment. It is plainly intended to save a small amount of space.
The workaround I have used:
>>> SQL command to allocate space for empty tables.
1. To query all empty tables under the current user, it is best for a user to have a default tablespace with the following command:
>sql:select table_name from user_tables where num_rows= ' 0 '
2. According to the above query statement, you can build the empty table allocation space for the command statement, as follows;
>sql:select ' ALTER TABLE ' | | table_name| | ' allocate extent; ' from User_tables where num_rows=0 or num_rows is null (Note: Many tutorials do not have here, here is possible bit empty)
The above code can produce a batch of modified table extent SQL statements (how many empty tables to produce how many), we just have to generate all the SQL code to execute all, we can give each existing table to allocate segment, OK.
Then export with the EXP command.
Reference: http://blog.sina.com.cn/s/blog_5f0e9ca50101it7n.html
oracle11g when you export a table, you will see fewer tables and no solution for empty tables.