imp倒入的数据是追加,因此我每次倒入的时候都时把原来的先删除,感觉比较麻烦,而且也有风险,加什么参数可以直接倒入啊,而且是替换,而不追加?
测试步骤如下:C:\>sqlplus /nolog
SQL*Plus: Release 9.2.0.1.0 - Production on 星期三 12月 22 13:43:14 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect xys/manager@racdb
已连接。
SQL> desc test;
名称 是否为空? 类型
----------------------------------------- -------- ---------------------------
AA VARCHAR2(10)
SQL> select * from test;
AA
--------------------
test
SQL> host exp xys/manager@racdb file=c:\test.dmp tables=test;
Export: Release 9.2.0.1.0 - Production on 星期三 12月 22 13:44:23 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining o
tions
JServer Release 9.2.0.4.0 - Production
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
服务器使用 WE8ISO8859P1 字符集 (可能的字符集转换)
即将导出指定的表通过常规路径 ...
. . 正在导出表 TEST 1 行被导出
在没有警告的情况下成功终止导出。
SQL> host imp xys/manager@racdb file=c:\test.dmp full=y;
Import: Release 9.2.0.1.0 - Production on 星期三 12月 22 13:44:58 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining o
tions
JServer Release 9.2.0.4.0 - Production
经由常规路径导出由EXPORT:V09.02.00创建的文件
已经完成ZHS16GBK字符集和AL16UTF16 NCHAR 字符集中的导入
导入服务器使用WE8ISO8859P1字符集 (可能的字符集转换)
. 正在将XYS的对象导入到 XYS
IMP-00015: 由于对象已存在,下列语句失败:
"CREATE TABLE "TEST" ("AA" VARCHAR2(10)) PCTFREE 10 PCTUSED 40 INITRANS 1 M"
"AXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) "
" LOGGING NOCOMPRESS"
成功终止导入,但出现警告。
SQL> host imp xys/manager@racdb file=c:\test.dmp full=y ignore=y ;
Import: Release 9.2.0.1.0 - Production on 星期三 12月 22 13:45:13 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining o
tions
JServer Release 9.2.0.4.0 - Production
经由常规路径导出由EXPORT:V09.02.00创建的文件
已经完成ZHS16GBK字符集和AL16UTF16 NCHAR 字符集中的导入
导入服务器使用WE8ISO8859P1字符集 (可能的字符集转换)
. 正在将XYS的对象导入到 XYS
. . 正在导入表 "TEST" 1行被导入
成功终止导入,但出现警告。
SQL> select * from xys.test;
AA
--------------------
test
test
SQL> host imp xys/manager@racdb file=c:\test.dmp full=y ignore=y ;
Import: Release 9.2.0.1.0 - Production on 星期三 12月 22 13:47:27 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining o
tions
JServer Release 9.2.0.4.0 - Production
经由常规路径导出由EXPORT:V09.02.00创建的文件
已经完成ZHS16GBK字符集和AL16UTF16 NCHAR 字符集中的导入
导入服务器使用WE8ISO8859P1字符集 (可能的字符集转换)
. 正在将XYS的对象导入到 XYS
. . 正在导入表 "TEST" 1行被导入
成功终止导入,但出现警告。
SQL> select * from xys.test;
AA
--------------------
test
test
test
SQL>