Solve the problem that the Oracle11g empty table cannot be exported.

Source: Internet
Author: User

Solve the problem that the Oracle11g empty table cannot be exported.

The deferred_segment_creation parameter is added to Oracle11g. The default value is true when the database is created, which means delayed loading. When no data exists in the table, no space is created for the table, when you export data, you will find that many tables do not exist.


Run the show parameter deferred deferred_segment_creation command to view the value of deferred_segment_creation.

Method 1: insert values in the image library table

Method 2: 1. Run the SQL statement to modify the value of deferred_segment_creation: alter system set deferred_segment_creation = false;

2. Run the SQL statement: select 'alter table' | table_name | 'allocate extent; 'from user_tables where num_rows = 0;

Use pl/SQL to right-click the result and copy it to Excel... copy the result to the SQL window and run it. Then you can export the result.

 


Why do empty tables still not be exported after oracle11g executes the steps mentioned on the Internet? Ball Solution

We recommend that you use expdp to export data. Do not use oracle 11G. By default, segments are not allocated for empty tables. Therefore, exp is not exported during export. For usage instructions, refer to help.

To use expdp, you must first create a directory in the database and grant the read and write permissions to the corresponding users.
SQL> create directory dmpdir as '/u01/dmdir ';
SQL> grant read, write on directory to system;
Expdp system/pw schemas = test directory = dmpdir dumpfile = test_1.dmp, test-2t.dmp logfile = exp-2012-11-testt.log exclude = STATISTICS parallel = 2
Can be exported in parallel

How can I export an empty table when exporting a database at oracle11g?

1. Export the database TEST completely, and the username system Password manager is exported to D: \ daochu. dmp.
Exp system/manager @ TEST file = d: \ daochu. dmp full = y
2. Export the tables of system users and sys users in the database
Exp system/manager @ TEST file = d: \ daochu. dmp owner = (system, sys)
 

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.