最后看一个FROMUSER/TOUSER的导入:
C:\dmdbms\bin>impdb userid=test/testtest file=e:\dmdbms\backup\test.dmp log=e:\dmdbms\backup\abc.log fromuser=test touser=abc
impdb version: 0X1000101
login success
Error Code -1970: 授权者没有此授权权限
GRANT "DBA" TO "test";
Error Code -1970: 授权者没有此授权权限
GRANT "PUBLIC" TO "test";
.. 正在导入表 test.ABC.t_num 0行被导入
.. 正在导入表 test.ABC.T_PART_COL 0行被导入
.. 正在导入表 test.ABC.T_PART_RANGE 0行被导入
Error Code -1461: 表 'T_PART_RANGE' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555518" ON
"T_PART_RANGE" ("CREATE_DATE" ASC);
Error Code -1461: 表 'T_PART_RANGE' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555519" ON
"T_PART_RANGE" ("CREATE_DATE" ASC);
Error Code -1461: 表 'T_PART_RANGE' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555520" ON
"T_PART_RANGE" ("CREATE_DATE" ASC);
Error Code -1461: 表 'T_PART_RANGE' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555521" ON
"T_PART_RANGE" ("CREATE_DATE" ASC);
Error Code -1461: 表 'T_PART_RANGE' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555522" ON
"T_PART_RANGE" ("CREATE_DATE" ASC);
.. 正在导入表 test.ABC.T_PART_HASH 0行被导入
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555523" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555524" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555525" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555526" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555527" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555528" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555529" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555530" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555531" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555532" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555533" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555534" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555535" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555536" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555537" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555538" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555539" ON
"T_PART_HASH" ("ID" ASC);
. . 正在导入表 test.ABC.T_RECORD
1000000行被导入
. . 正在导入表 test.ABC.t
4行被导入
Error Code -2352: 无效的同义词名 'S_T'
CREATE SYNONYM "S_T" FOR "test"."T"
Error Code -2352: 无效的同义词名 'S_TEST'
CREATE SYNONYM "S_TEST" FOR "test"."F_TAX"
****************** total ***********************
0 databases input...
1 schemas input...
6 tables input...
0 indexes input...
0 triggers input...
0 views input...
4 stored procedures input...
1 sequences input...
0 roles input...
0 dblinks input...
0 synonyms input...
********************* end **********************
成功终止导入, 但出现警告
impdb version: 0X1000101
login success
Error Code -1970: 授权者没有此授权权限
GRANT "DBA" TO "test";
Error Code -1970: 授权者没有此授权权限
GRANT "PUBLIC" TO "test";
.. 正在导入表 test.ABC.t_num 0行被导入
.. 正在导入表 test.ABC.T_PART_COL 0行被导入
.. 正在导入表 test.ABC.T_PART_RANGE 0行被导入
Error Code -1461: 表 'T_PART_RANGE' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555518" ON
"T_PART_RANGE" ("CREATE_DATE" ASC);
Error Code -1461: 表 'T_PART_RANGE' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555519" ON
"T_PART_RANGE" ("CREATE_DATE" ASC);
Error Code -1461: 表 'T_PART_RANGE' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555520" ON
"T_PART_RANGE" ("CREATE_DATE" ASC);
Error Code -1461: 表 'T_PART_RANGE' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555521" ON
"T_PART_RANGE" ("CREATE_DATE" ASC);
Error Code -1461: 表 'T_PART_RANGE' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555522" ON
"T_PART_RANGE" ("CREATE_DATE" ASC);
.. 正在导入表 test.ABC.T_PART_HASH 0行被导入
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555523" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555524" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555525" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555526" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555527" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555528" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555529" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555530" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555531" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555532" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555533" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555534" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555535" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555536" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555537" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555538" ON
"T_PART_HASH" ("ID" ASC);
Error Code -1461: 表 'T_PART_HASH' 上已存在CLUSTER索引
CREATE SCHEMA "ABC" AUTHORIZATION "ABC" CREATE CLUSTER INDEX "INDEX33555539" ON
"T_PART_HASH" ("ID" ASC);
. . 正在导入表 test.ABC.T_RECORD
1000000行被导入
. . 正在导入表 test.ABC.t
4行被导入
Error Code -2352: 无效的同义词名 'S_T'
CREATE SYNONYM "S_T" FOR "test"."T"
Error Code -2352: 无效的同义词名 'S_TEST'
CREATE SYNONYM "S_TEST" FOR "test"."F_TAX"
****************** total ***********************
0 databases input...
1 schemas input...
6 tables input...
0 indexes input...
0 triggers input...
0 views input...
4 stored procedures input...
1 sequences input...
0 roles input...
0 dblinks input...
0 synonyms input...
********************* end **********************
成功终止导入, 但出现警告
可以看到,大部分对象处理都没有问题,但是对于分区表而言,虽然表导入了,但是建立索引的时候出现了很多错误,这说明导入工具处理分区表还存在bug。
不过总的来说,expdb和impdb对于exp/imp工具的兼容性还是非常不错的,对于一个没有多少达梦数据库经验的人,只要对Oracle的exp/imp熟悉,就可以很快上手进行操作了。