对比expdp、impdp和exp、imp发现前者没有了resumable功能,测试发现expdp和impdp自动使用了resumable特性



C:>expdp test/test@orcl directory=dir_temp dumpfile=t.dmp tables=t2


Export: Release 10.2.0.1.0 - Production on 星期四, 03 9月, 2009 18:41:41


Copyright (c) 2003, 2005, Oracle. All rights reserved.


连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

启动 "TEST"."SYS_EXPORT_TABLE_01": test/********@orcl directory=dir_temp dumpfi

le=t.dmp tables=t2

正在使用 BLOCKS 方法进行估计...

处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA

使用 BLOCKS 方法的总估计: 23 MB

处理对象类型 TABLE_EXPORT/TABLE/TABLE

处理对象类型 TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

. . 导出了 "TEST"."T2" 18.84 MB 759316 行

已成功加载/卸载了主表 "TEST"."SYS_EXPORT_TABLE_01"

******************************************************************************

TEST.SYS_EXPORT_TABLE_01 的转储文件集为:

C:BAKT.DMP

作业 "TEST"."SYS_EXPORT_TABLE_01" 已于 18:42:11 成功完成



C:>

--==================================

SQL> select file_id,file_name,tablespace_name,bytes/1024/1024 m ,autoextensible

from dba_data_files;


FILE_ID FILE_NAME TABLESPACE M AUT

---------- ------------------------------ ---------- ---------- ---

1 C:TEMPSYSTEM01.DBF SYSTEM 300 YES

9 C:TEMPUSERS.DBF USERS 5 NO

6 C:TEMPUNDOTBS02.DBF UNDOTBS2 10 NO

5 C:TEMPTEST.DBF TEST 55 YES

3 C:TEMPSYSAUX01.DBF SYSAUX 120 YES

--==================================

C:>impdp test/test@orcl directory=dir_temp dumpfile=t.dmp remap_schema=(test:sc

ott) remap_tablespace=(test:users)


Import: Release 10.2.0.1.0 - Production on 星期四, 03 9月, 2009 18:48:42


Copyright (c) 2003, 2005, Oracle. All rights reserved.


连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

已成功加载/卸载了主表 "TEST"."SYS_IMPORT_FULL_01"

启动 "TEST"."SYS_IMPORT_FULL_01": test/********@orcl directory=dir_temp dumpfil

e=t.dmp remap_schema=(test:scott) remap_tablespace=(test:users)

处理对象类型 TABLE_EXPORT/TABLE/TABLE

处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA

........这里hang住了

--================================

查看dba_resumable发现上面的impdp确实SUSPENDED:

SQL> select status,timeout,name,error_parameter1,error_parameter2,error_paramete

r3,error_parameter4 from dba_resumable;


STATUS TIMEOUT NAME ERROR ERROR ERROR ERROR

--------- ---------- ------------------------------ ----- ----- ----- -----

NORMAL 7200 TEST.SYS_IMPORT_FULL_01

SUSPENDED 7200 TEST.SYS_IMPORT_FULL_01.1 SCOTT T2 128 USERS


SQL> alter database datafile 9 autoextend on;


数据库已更改。


SQL>

--==========================

datafile 9可以自动扩展之后impdp得以继续:

C:>impdp test/test@orcl directory=dir_temp dumpfile=t.dmp remap_schema=(test:sc

ott) remap_tablespace=(test:users)


Import: Release 10.2.0.1.0 - Production on 星期四, 03 9月, 2009 18:48:42


Copyright (c) 2003, 2005, Oracle. All rights reserved.


连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

已成功加载/卸载了主表 "TEST"."SYS_IMPORT_FULL_01"

启动 "TEST"."SYS_IMPORT_FULL_01": test/********@orcl directory=dir_temp dumpfil

e=t.dmp remap_schema=(test:scott) remap_tablespace=(test:users)

处理对象类型 TABLE_EXPORT/TABLE/TABLE

处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA

ORA-39171: 作业出现可恢复的等待。

ORA-01653: 表 SCOTT.T2 无法通过 128 (在表空间 USERS 中) 扩展

. . 导入了 "SCOTT"."T2" 18.84 MB 759316 行

处理对象类型 TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

作业 "TEST"."SYS_IMPORT_FULL_01" 已经完成, 但是有 1 个错误 (于 18:55:00 完成)



C:>

C:>

--===========================

最后dba_resumable中的记录自动被清除

SQL> select count(*) from dba_resumable;


COUNT(*)

----------

0


SQL>


oracle视频教程请关注:http://u.youku.com/user_video/id_UMzAzMjkxMjE2.html