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 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.ignorecase) [1]; FS. Close (); } }
private void Button2_Click (object sender, EventArgs e) & nbsp; { 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 ("The version format is incorrect. "); }
Http://files.cnblogs.com/alxc/AlxcTools.rar