A new way for Oracle to export empty tables (completely resolved)

Source: Internet
Author: User

Background

Using the EXP command after Oracle 11g does not export empty table (rowcount=0), is recently encountered in the work of a very pit problem, and even has been a pit more than once, so this lesson from the bitter experience, ready to solve this problem completely. The reason is called the new method, that must have the old method, this method is a Bo friend very early proposed, the following is the original text, actually also explained the cause of the problem

oracle11g Exporting empty tables using exp (those of programmers)

Problem root cause: "oracle11g default to Empty table is not assigned segment, so when using exp export oracle11g database, empty table does not export"

Problem secondary reason: in the development of maintenance period often need to do the database import and export operations, the use of old methods can really solve the problem, but one time forget the total tragedy

Problem extension: I found that sometimes some type, pipe type can not be exported, resulting in process, function compilation does not pass

Solution Solutions

The solution is very simple, is to use the EXPDP,IMPDP command instead of the EXP,IMP command to completely solve the problem, the experiment is as follows:

1. Create Empty table

--Create table
CREATE TABLE Testempty
(
ID number,
Name Number
)
Tablespace xxxtemp
Storage
(
Initial 1M
Next 1M
Minextents 1
Pctincrease 0
);

2. EXP Export Statement

Exp System/[email protected] file=x.dmp Owner=someuser

3, by the pit

4, the solution, using EXPDP to export

EXPDP Scott/[email protected] Schemas=scott dumpfile=expdp.dmp directory=dpdata1;

(for the use of EXPDP,IMPDP, please self-Baidu or refer to the article below the external chain)

Happy process such as

The problem has been completely resolved.

Accidental harvesting

1, improve the export import speed, in the use of EXPDP and IMPDP Oracle database Import and export, will also bring you some unexpected gains, such as the export speed has a significant increase, and the output of the log is more accurate and beautiful, In fact, with ordinary exp do 50w row record export table is simply a weak violence tool (from the speed and SQL Server is not known a few streets)

2, can be the table space Export (exp can actually also)

The price of a comeback

Looks very good, but EXPDP,IMPDP actually also has the restriction, is must be on the server to carry on the IO operation (specifically is the directory this parameter is related, here does not explain in detail, oneself sees the tutorial to go)

Valuable links

EXPDP and IMPDP parameter usage

Exp and EXPDP contrast (speed)

Transport table space completes data migration using the EXPDP/IMPDP tool's transport table space

Exp/imp and EXPDP/IMPDP Differences (grammar)

Written in the last

Write bad, do not like can be rewarded continue to encourage, like can point recommended to give support and casually, open a joke, share out just hope my little experience is useful, avoid you into the pit.

A new way for Oracle to export empty tables (completely resolved)

A new way for Oracle to export empty tables (completely resolved)

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.