天天看點

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/[email protected] 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/[email protected] 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/[email protected] 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/