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