日期:2014-05-16  浏览次数:20733 次

用户之间imp的问题
今天同事说申请了一个从生产导出的dump文件,需要导入测试库进行测试。
之前做的基本都是本库导出,本库导入的操作,例如:imp test/***@test tables=tbl_fuel file=H:\dev\data\tbl_fuel.dmp ignore=y这样的指令操作。
今天的情况是从一个库的用户导出dump,然后导入到另外一个库的用户中。

导出:
exp p_x/**  FILE=tables.dmp TABLES=e.pre_ldp,e.tbl_flight log=tables.log rows=y

几种错误的导入:
imp test/***@test tables=(tbl_a,tbl_b) file=tables.dmp log=test.log full=y
提示:
IMP-00024: Only one mode (TABLES, FROMUSER, or FULL) can be specified
TABLES、FROMUSER和FULL参数只能使用一个

imp test/***@test file=tables.dmp log=test.log ignore=n
提示:
Warning: the objects were exported by P_X, not by you
import done in ZHS16CGB231280 character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
export client uses ZHS16GBK character set (possible charset conversion)
export server uses UTF8 NCHAR character set (possible ncharset conversion)
IMP-00031: Must specify FULL=Y or provide FROMUSER/TOUSER or TABLES arguments
IMP-00000: Import terminated unsuccessfully
FULL=Y、FROMUSER/TOUSER和TABLES参数必须指定其中之一

imp test/***@test file=tables.dmp log=test.log ignore=n fromuser=user ouser=test
提示:
Warning: the objects were exported by P_X, not by you
import done in ZHS16CGB231280 character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
export client uses ZHS16GBK character set (possible charset conversion)
export server uses UTF8 NCHAR character set (possible ncharset conversion)
IMP-00034: Warning: FromUser "USER" not found in export file
Import terminated successfully with warnings.
说明From User "USER"不包含在dump文件中。但通过这种方式可以找到是哪个用户使用exp导出的这份dump文件

imp test/***@test file=tables.dmp log=test.log ignore=n tables=tbl_a
提示: