[20181014]12Cr2 impdp使用NETWORK_LINK支援LONG欄位型別.txt

lfree發表於2018-10-14

[20181014]12Cr2 impdp使用NETWORK_LINK支援LONG欄位型別.txt

--//12CR2 impdp使用NETWORK_LINK支援LONG欄位型別,沒有網路環境,使用loopback測試.
--//我們一套老系統,有1個表就使用long型別,以前使用impdp+NETWORK_LINK就遇到問題.
--//在12c環境測試看看:

1.環境:
SCOTT@test01p> @ ver1
PORT_STRING                    VERSION        BANNER                                                                               CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0           12.2.0.1.0     Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production              0

2.建立測試表與db_link:

create table tx (id number,text long);
insert into tx values(1,'aaaa');
commit;

--//建立db_link,使用環路模擬網路環境:

CREATE  PUBLIC DATABASE LINK LOOPBACK CONNECT TO SCOTT IDENTIFIED BY btbtms USING 'localhost:1521/test01p:DEDICATED';

SCOTT@test01p> select id from tx@loopback ;
        ID
----------
         1

SCOTT@test01p> CREATE USER ztest IDENTIFIED BY ztest;
User created.

SCOTT@test01p> GRANT DBA TO ztest;
Grant succeeded.        

3.測試:

$ impdp system/btbtms@test01p directory=DATA_PUMP_DIR network_link=loopback REMAP_SCHEMA=scott:ztest REMAP_TABLESPACE=users:users tables=scott.tx

Import: Release 12.2.0.1.0 - Production on Sun Oct 14 20:55:29 2018

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Starting "SYSTEM"."SYS_IMPORT_TABLE_01":  system/a***@test01p directory=DATA_PUMP_DIR network_link=loopback REMAP_SCHEMA=scott:ztest REMAP_TABLESPACE=users:users tables=scott.tx
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . imported "ZTEST"."TX"                                     1 rows
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Job "SYSTEM"."SYS_IMPORT_TABLE_01" successfully completed at Sun Oct 14 20:57:19 2018 elapsed 0 00:01:35

--//OK,就是有點慢,用時1:35.不知道為什麼,不過可以看出12c impdp+NETWORK_LINK已經支援long欄位型別.
--//以ztest登入
ZTEST@test01p> select id,text c10 from tx;

        ID C10
---------- ----------
         1 aaaa

--//OK,沒有任何問題.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2216327/,如需轉載,請註明出處,否則將追究法律責任。

相關文章