The DMP exported from Oracle 11g is imported to the 10g Database (imp-00010: the exported file is not valid and the header verification fails)

Source: Internet
Author: User

Because I like new things, my computer development tools are basically the latest. Oracle also has 11g R2, but my colleagues are either 11g R1 or 10g, the DMP files exported from me are exported to them, all of which are shown as follows:

Imp-00010: the exported file is not valid and the header verification fails.

To solve this problem, I almost wanted to unload 11 GB and install 10 Gb. Later I thought about the head verification, and I checked the DMP file with notepad ++, I found that the header really showed something:

11g R2: v11.02.00

11g r1: v11.01.00

10g: v10.02.01

If you change the version to the sub-database version of the target machine, no error will be reported when you execute imp.

Consider that if the file is too large, it may fail to be opened, resulting in a crash, make a small program. (C # winform)

  

Two button events:

Private void button#click (Object sender, eventargs E)
{
Openfiledialog file = new openfiledialog ();
File. initialdirectory = application. executablepath;
If (file. showdialog () = dialogresult. OK)
{
String Path = label11.text = file. filename;
Filestream FS = file. openread (PATH );
FS. Seek (0, seekorigin. Begin );
Byte [] bydata = new byte [100];
FS. Read (bydata, 0, 50 );
String chardata = new utf8encoding (true). getstring (bydata, 0, bydata. Length );
String [] da = system. Text. regularexpressions. RegEx. Split (chardata, @ ": V", regexoptions. ignorecase );
RegEx r = new RegEx (@ ": V \ D {2} \. \ D {2} \. \ D {2 }");
Match m = R. Match (chardata );
Label9.text = M. Index. tostring ();
Label10.text = M. length. tostring ();
Textbox1.text = system. Text. regularexpressions. RegEx. Split (M. Value, @ ": V", regexoptions. ignorecase) [1];
FS. Close ();
}
}

Private void button2_click (Object sender, eventargs E)
{
RegEx r = new RegEx (@ "\ D {2} \. \ D {2} \. \ D {2 }");
Match m = R. Match (textbox1.text );
If (M. Success)
{
Filestream FS = file. openwrite (label11.text );
FS. Seek (Int. parse (label9.text. tostring () + 2, seekorigin. Begin );
Byte [] info = new utf8encoding (true). getbytes (textbox1.text );
FS. Write (Info, 0, info. Length );

FS. Close ();
MessageBox. Show ("version modified successfully. ");
}
Else
MessageBox. Show ("version format error. ");
}

 

 

Http://files.cnblogs.com/alxc/AlxcTools.rar

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.