OracleDMP file exception Solution

Source: Internet
Author: User
DMP files are currently the most common methods for Oracle Data logical backup, transmission, and restoration. Whether it's the developer's preferred ExpImp tool or the DBA's increasingly accepted DataPump

DMP files are currently the most common methods for Oracle Data logical backup, transmission, and restoration. Whether it's developer's preferred Exp/Imp tool or DBA's increasingly accepted Data Pump

Taking it for granted is a mindset and an inertia of thinking. When we often deal with a type of problem and think that we have full confidence, we will form a mindset and inertia. The mindset and inertia can help us quickly locate and solve problems, but they will also form a "blind eye ".

With the same technology, problems may vary widely in different scenarios. Especially with the participation of uncertain third-party personnel, such problems become more complicated and changeable. What we can do is to constantly accumulate experience, improve our experience, and always face our own technical career with a "heart.

DMP files are currently the most common methods for Oracle Data logical backup, transmission, and restoration. Both developer-preferred Exp/Imp tools and Data Pump increasingly accepted by DBAs use. dmp as the file carrier. Various problems occurred during the process of importing and exporting dmp files, which have already been mined. Therefore, DBAs can talk about several common errors.

A colleague of the author encountered a problem when handling the Dmp file sent from a third-party company. Contact the author to help solve the problem. After a period of struggle, the problem was unexpectedly located and solved. Record the problem, right as a friend's need.

1. Problem Description

Colleagues are working on a project to collect data Dmp files from subordinate companies for subsequent processing and integration. Due to some problems in the preliminary communication, it is not specified whether to submit the file using Exp/Imp or DataPump, let alone version information. Therefore, colleagues can only perform step-by-step experiments for testing and importing. Each file means an experiment.

During the processing, two dmp files submitted by a company are displayed. Both Imp and Impdp cannot be processed smoothly. The author asks for the problem file for preliminary check and handling.

The file itself is not very big, only a few K, which is strange for Oracle DMP files. In any case, Oracle saves certain information files when saving the metadata of the data table. Small dmp files are rare. Afterwards, this is an important clue.

Transfer to the Windows platform and call the imp and impdp commands to process files.

C: \ Users \ Administrator> impdp \ "/as sysdba \" dumpfile = I _aaa_statistical.dmp

Import: Release 11.2.0.4.0-Production on Thu Aug 13 17:03:24 2015

Copyright (c) 1982,201 1, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit

Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

ORA-39001: invalid argument value

ORA-39000: bad dump file specification

ORA-31619: invalid dump file "C: \ app \ Administrator/admin/sicsdb/dpdump/I _aaa_statistical.dmp"

C: \ app \ Administrator \ admin \ sicsdb \ dpdump> imp \ "/as sysdba \" file = I _aaa_statistical.dmp

Import: Release 11.2.0.4.0-Production on Thu Aug 13 17:07:46 2015

Copyright (c) 1982,201 1, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit

Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

IMP-00037: Character set marker unknown

IMP-00000: Import terminated unsuccessfully

When the Impdp command is called, the error message is that the file format is incorrect. In the Oracle Official Experience set, the file is damaged due to incorrect settings of text/binary format data during transmission (especially FTP transmission. I have encountered this kind of error before, except for the original system administrator re-transmission, there is no other way.

The error message is also confusing when calling the Imp command. Oracle considers that the character set flag is incorrect and cannot be parsed. In the previous Blog, we learned that the dmp file header contains character set information.

The error messages of the two tools are also confusing. The Impdp information indicates that the file is damaged and there is no possibility of restoration. Imp has at least one starting point. I plan to take a look at the contents of the file header.

[Oracle @ localhost dpdump] $ cat I _aaa_statistical.dmp | od-x | head-1 | awk '{print $2 $3}' | cut-c 3-6

Ef70

SQL> select nls_charset_name (to_number ('ef70', 'xxxx') from dual;

NLS_CHARSET_NAME (TO_NUMBER ('ef

----------------------------------------

It is indeed a file header error. Then, I think of the file command in Linux to view some basic information about the file. I want to see at least what the type of corrupted file looks like.

[Oracle @ localhost dpdump] $ file I _aaa_statistical.dmp

I _aaa_statistical.dmp: UTF-8 Unicode (with BOM) Java program text, with CRLF line terminators

UTF-8 format file. Based on my previous experience, as a dmp file, it should be at least a binary file. From the results of the file command, this is obviously a text file related to the Java program, and also contains line breaks.

To determine what a Dmp file looks like, I parse the dmp files generated by Exp and Expdp respectively.

-- Expdp File

[Oracle @ localhost dpdump] $ file INT_TEST_150317.dmp

INT_TEST_150317.dmp: DBase 3 data file (1728057941 records)

-- Exp File

[Oracle @ localhost dpdump] $ file scott. dmp

Scott. dmp: DBase 3 data file (1380929624 records)

The results show that at least the file type related to the Database is used. However, the dmp file is not a binary file in any way.

As a result, the author boldly opened the file in a text editor. All the results are clear.

Prompt PL/SQL Developer import file

Prompt Created on July 01, 2015 by xxxxxx

Set feedback off

Set define off

Prompt Creating I _aaa_stat...

Create table I _aaa_stat

(

(The reason for the length is omitted .....)

)

Tablespace My_TBS

Pctfree 10

Initrans 1

Maxtrans 255

Storage

(

Initial 64 K

Next 1 M

Minextents 1

Maxextents unlimited

)

Nologging;

Prompt Disabling triggers for I _aaa_stat...

Alter table I _aaa_stat disable all triggers;

Insert into I _aaa_stat (companyname, plancode, polyr, count)

From the file, we can see that the subordinate company uses a feature of PL/SQL Developer to export data, and saves the text file as the dmp file extension name.

3. Conclusion

The subsequent processing does not seem to require much explanation. This case is not easy, but it is still simple. The biggest feeling for me is: how do we look at experience? Experience is a valuable asset accumulated in our daily work and study, and it is also a waterline that we are gradually exploring professionally.

At the same time, experience also forms a definite formula. Let us do, say, and think with inertia. When our experience cannot cope with new problems, it is essential to seek knowledge and change.

This article permanently updates the link address:

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.