源win_x64 oracle10.2.0.4平臺,目標端linux_X64 11.2.0.4平臺
須要注意的理,兩端的字符集務必一致
檢查方法:
select * from nls_database_parameters;
不然會報:linux
IMP-00017: following statement failed with ORACLE error 29345:
"BEGIN sys.dbms_plugts.beginImport ('10.2.0.4.0',852,'2000',12,'Microsoft "
"Windows x86 64-bit',52027,88851,1,0,0,0); END;"
IMP-00003: ORACLE error 29345 encountered
ORA-29345: cannot plug a tablespace into a database using an incompatible character setoracle
1 源win平臺
1.1 創建測試表空間
2.create tablespac tts datafile '' size 20M;
create table system.tts tablespace tts as select from dba_objects;
select count() from system.tts;
1.2 設置表空間爲只讀
alter tablespace tts read only;
select * from v$transportable_platform
PLATFORM_ID PLATFORM_NAME ENDIAN_FORMATide
9 IBM zSeries Based Linux Big 13 Linux x86 64-bit Little Microsoft Windows x86 64-bit
檢查一下:execute dbms_tts.transport_set_check('TTS',true);
3導出元數據信息(exp,expdp隨意)測試
exp 'sys/oracle as sysdba' file=d:\tts_meta.dmp log=1.log tr ansport_tablespace=y tablespaces=tts
copy全部要傳輸的表空間數據文件到目標端spa
2目標端
2.1實施轉換RMAN>convert datafile '/home/oracle/scripts/TTS/TTS_01.DBF' from platform 'Microsoft Windows x86 64-bit' format '/data/tts_1.dbf';
2.2 導入元數據信息imp userid=\'sys\/oracle as sysdba\' file=tts_meta.dmp transport_tablespace=y datafiles='/data/tts_1.dbf';
2.3 檢查結果,設置表空間爲可寫模式alter tablespace tts read write;
code
總結:支持的平臺較多,有一個文件系統copy的時間,但不虧爲遷移,升級的一個好方法;orm