Oracle 11g-derived DMP imported to 10g database (IMP-00010: Not a valid export file, header validation failed)

Source: Internet
Author: User

Original address: http://www.cnblogs.com/alxc/archive/2011/03/25/1995279.html

Because like new things, so basically computer development tools are the latest, Oracle also installed 11g R2, but colleague classmate is not 11g R1 is 10G, from here I exported the DMP file in their direction in, all show:

IMP-00010: Not a valid export file, header validation failed

For this problem has been distressed, almost want to unload 11g and then installed 10g, then think, head verification, then the head is what, with notepad++ view the DMP file, found that the head really shows something:

11g r2:v11.02.00

11g r1:v11.01.00

10g:v10.02.01

Change the version to the other version of the machine database, the implementation of IMP will no longer error.

Consider that if the file is too large, may not open to cause the crash, do a small program. (C # WINFORM)

  

Events for 2 buttons:

  

Private voidButton1_Click (Objectsender, EventArgs e) {OpenFileDialog file=NewOpenFileDialog (); 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[ -]; Fs. Read (Bydata,0, -); stringChardata =NewUTF8Encoding (true). GetString (Bydata,0, bydata.length); string[] da = System.Text.RegularExpressions.Regex.Split (Chardata,@": V", regexoptions.ignorecase); Regex R=NewRegex (@": 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 voidButton2_Click (Objectsender, EventArgs e) {Regex R=NewRegex (@"\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=NewUTF8Encoding (true).                GetBytes (TextBox1.Text); Fs. Write (Info,0, Info.       Length); Fs.                Close (); MessageBox.Show ("version modified successfully. "); }            ElseMessageBox.Show ("incorrect version format. "); } 

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

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.