An error occurred while importing dmp exported from Oracle 11 GB to 10 Gb database. Solution

Source: Internet
Author: User


An error occurred while importing the dmp exported from Oracle 11G to the 10g Database.
(IMP-00010: Failed header verification because it is not a valid exported file) Solution

Because the server has oracle 11 GB and oracle 10 Gb locally, the dmp files exported from the server are displayed as: IMP-00010: it is not a valid file to be exported. After the header verification fails, I found the following information on the Internet. I downloaded the file and tried to modify it. I can import it. To solve this problem, I almost wanted to unload 11 GB and then install 10 Gb. Then I thought about the head verification, and I checked the dmp file with Notepad ++, I found that the header really showed some things: 11g R2: V11.02.00 11g R1: V11.01.00 10g: V10.02.01. I changed the version to the version of the sub-database of the other machine, and no error was reported when I executed 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) events with two buttons: private void button1_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. ignor ECase) [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 (); Mess AgeBox. Show ("version modified successfully. ");} Else MessageBox. Show (" version format error. ");} http://up.2cto.com/2012/0322/20120322023105139.rar Author raik25

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.