不同DB間進行數據遷移,不假思索,最好的方法:EXPDP/IMPDP.
然而,當兩DB間字符集不同時,則會遷移失敗.
[oracle@fktest01 dump]$ impdp system/password directory=dump dumpfile=user.dmp logfile=1.log
Import: Release 10.2.0.1.0 - Production on Monday, 14 April, 2008 16:53:47
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "SYSTEM"."SYS_IMPORT_FULL_02" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_02": system/******** directory=dump dumpfile=user.dmp logfile=1.log
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
ORA-02374: conversion error loading table "ECARD"."USERS"
ORA-12899: value too large for column CHNAME (actual: 18, maximum: 12)
ORA-02372: data for row: CHNAME : 0X'B4FAB8D5B4FAB8D5B4FAB8D5'
. . imported "ECARD"."USERS" 6.156 KB 7 out of 8 rows
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYSTEM"."SYS_IMPORT_FULL_02" successfully completed at 16:54:04
今天測試了一種方法:借助DBLink進行搬遷,正好彌補以上缺陷.
create table ecard.users
as select * from ecard.users@dbl_ecard;
以上OK,記錄備查...