日常测试的时候,经常要使用imp/exp或者impdp/expdp进行数据的导入导出,碰到的零零散散的问题也很多。
一些和导入导出相关的文章,
《imp错误IMP-00098: INTERNAL ERROR: impgst2Segmentation fault》
今天再列举一个错误号,当执行导入imp时,如果提示这个,很可能是源库和目标库的数据版本不同,
IMP-00010: not a valid export file, header failed verification
IMP-00000: Import terminated unsuccessfully
此时可以打开这个数据文件,第一行就标记了源数据库的版本号,这里显示19.00.00,说明是从19c导出的,
^C^CiEXPORT:V19.00.00
DBISAL
RTABLES
而我们需要导入的数据库是11g,
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
可以直接改dump文件,19.00.00改为11.02.00,
^C^CiEXPORT:V11.02.00
DBISAL
RTABLES
再次导入即可,
[oracle@app ~]$ imp bisal/bisal file=/home/oracle/test.dmp tables=test
. importing BISAL's objects into BISAL
. importing BISAL's objects into BISAL
. . importing table "TEST" 73024 rows imported
IMP-00015: following statement failed because the object already exists:
"CREATE INDEX "IDX_TEST_01" ON "TEST" ("OBJECT_ID" ) PCTFREE 10 INITRANS 2 "
"MAXTRANS255STORAGE(INITIAL2097152NEXT1048576MINEXTENTS1FREELISTS1"
"FREELISTGROUPS1BUFFER_POOLDEFAULT) LOGGING"
Import terminated successfully with warnings.
近期更新的文章:
文章分类和索引: