源win_x64 oracle10.2.0.4平台,目标端linux_X64 11.2.0.4平台
需要注意的理,两端的字符集务必一致
检查方法:
select * from nls_database_parameters;
否则会报:
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); END;"
IMP-00003: ORACLE error 29345 encountered
ORA-29345: cannot plug a tablespace into a database using an incompatible character set
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_FORMAT
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);@H_403_38@
3导出元数据信息(exp,expdp随意)
exp 'sys/oracle as sysdba' file=d:\tts_Meta.dmp log=1.log tr ansport_tablespace=y tablespaces=tts
copy所有要传输的表空间数据文件到目标端
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';@H_403_38@
2.2 导入元数据信息imp userid=\'sys\/oracle as sysdba\' file=tts_Meta.dmp transport_tablespace=y datafiles='/data/tts_1.dbf';@H_403_38@
2.3 检查结果,设置表空间为可写模式alter tablespace tts read write;@H_403_38@