exp中参数consistent测试

consistent=N表的一致性读取

consistent=Y被导出的所有表的一致性读取

[@more@]

SQL> select * from t_emp;

ID NAME CODE
---------- ---------- ----------
1 a 01
2 b 02

SQL> select *from t_depart;

CODE NAME
---------- ----------
01 a
02 b
03 c

SQL> insert into t_emp select * from t_emp;

已创建2行。

SQL> insert into t_emp select * from t_emp;

已创建4行。

SQL> insert into t_emp select * from t_emp;

已创建8行。

SQL> insert into t_emp select * from t_emp;

已创建16行。

SQL> insert into t_emp select * from t_emp;

已创建32行。

SQL> insert into t_emp select * from t_emp;

已创建64行。

SQL> insert into t_emp select * from t_emp;

已创建128行。

SQL> insert into t_emp select * from t_emp;

已创建256行。

SQL> commit;

提交完成。

SQL> insert into t_emp select * from t_emp;

已创建512行。

SQL> insert into t_emp select * from t_emp;

已创建1024行。

SQL> insert into t_emp select * from t_emp;

已创建2048行。

SQL> insert into t_emp select * from t_emp;

已创建4096行。

SQL> insert into t_emp select * from t_emp;

已创建8192行。

SQL> insert into t_emp select * from t_emp;

已创建16384行。

SQL> commit;

提交完成。
SQL> insert into t_emp select * from t_emp;

已创建32768行。

SQL> insert into t_emp select * from t_emp;

已创建65536行。

SQL> insert into t_emp select * from t_emp;

已创建131072行。

SQL> commit;

提交完成。

SQL> insert into t_emp select * from t_emp;

已创建262144行。

SQL> insert into t_emp select * from t_emp;

已创建524288行。

SQL> commit;

提交完成。

SQL> insert into t_emp values(3,'c','03');

已创建 1 行。

SQL> commit;

提交完成。

SQL> insert into t_emp select * from t_emp;

已创建1048577行。

SQL> commit;

提交完成。

SQL> select count(*)from t_emp;

COUNT(*)
----------
2097154
--========================================
--开始导出数据
C:>exp test1/test1@test file='c:t.dmp' tables=(t_emp,t_depart)

Export: Release 11.1.0.6.0 - Production on Wed Oct 7 13:17:46 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Produc
tion
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)

About to export specified tables via Conventional Path ...
. . exporting table T_EMP 2097154 rows exported
. . exporting table T_DEPART 2 rows exported
Export terminated successfully without warnings.

C:>
--=====================================================
--在上面的操作未开始导T_DEPART表之前以最快的速度删除t_depart表里的一条数据并且commit
SQL> delete from t_depart where code='03';

已删除 1 行。

SQL> commit;

提交完成。

SQL> select count(*) from t_emp;

COUNT(*)
----------
2097152

SQL>
--=======================================
C:>imp test/test@test file='c:t.dmp' fromuser=test1 touser=test

Import: Release 11.1.0.6.0 - Production on 星期三 10月 7 13:42:00 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.


连接到: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

经由常规路径由 EXPORT:V11.01.00 创建的导出文件

警告: 这些对象由 TEST1 导出, 而不是当前用户

已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
导出客户机使用 US7ASCII 字符集 (可能的字符集转换)
. 正在将 TEST1 的对象导入到 TEST
. . 正在导入表 "T_EMP"导入了 2097154 行
. . 正在导入表 "T_DEPART"导入了 2 行
即将启用约束条件...
IMP-00017: 由于 ORACLE 错误 2298, 以下语句失败:
"ALTER TABLE "T_EMP" ENABLE CONSTRAINT "FK_T_EMP""
IMP-00003: 遇到 ORACLE 错误 2298
ORA-02298: 无法验证 (TEST.FK_T_EMP) - 未找到父项关键字
成功终止导入, 但出现警告。

C:>
--==========================================
SQL> create index idx_t_emp on t_emp(code);

索引已创建。
SQL> insert into t_depart values('03','c');

已创建 1 行。

SQL> insert into t_emp values(3,'c','03');

已创建 1 行。

SQL> commit;

提交完成。
--=======================================
C:>exp test1/test1@test consistent=Y file='c:t.dmp' tables=(t_emp,t_depart)

Export: Release 11.1.0.6.0 - Production on Wed Oct 7 13:49:08 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Produc
tion
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)

About to export specified tables via Conventional Path ...
. . exporting table T_EMP 2097153 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table T_DEPART 3 rows exported
Export terminated successfully with warnings.

C:>
--==============================
SQL> delete from t_depart where code='03';

已删除 1 行。

SQL> commit;

提交完成。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/19602/viewspace-1027621/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/19602/viewspace-1027621/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值