全库传输要求Character Set、National Character Set必须完全相同a.在源端转换1.准备传输数据库,源数据库必须以只读方式打开.shutdown immediate;startup open read only;2.使用DBMS_TDB.CHECK_DB检查数据库状态.declareb_support boolean;beginb_support := dbms_tdb.check_db('Linux x86 64-bit', 0);dbms_output.put_line(case b_support when true then 'support' else 'nonsupport' end);end;/返回的是 support,其中 Linux x86 64-bit 是从如下查询获得select platform_name,ENDIAN_FORMAT from v$transportable_platform order by platform_name;我们试一下 IBM Power Based Linuxdeclareb_support boolean;beginb_support := dbms_tdb.check_db('IBM Power Based Linux', 0);dbms_output.put_line(case b_support when true then 'support' else 'nonsupport' end);end;/返回了 nosupport ,看来 little 与 big 之间是不可以传输的,据说11r2 以上版本支持,先留下个悬念吧.3.使用DBMS_TDB.CHECK_EXTERNAL标识外部对象.declareb_external boolean;beginb_external := dbms_tdb.check_external;end;/The following directories exist in the database:SYS.ORACLE_OCM_CONFIG_DIR, SYS.DATA_PUMP_DIR, SYS.XMLDIR4.开始转换数据库(源库)convert database new database mmtest transport script 'e:\out\trans.sql' to platform 'Linux x86 64-bit' db_file_name_convert 'E:\APP\ADMINISTRATOR\ORADATA\LLTEST\','E:\out\';rman target / 执行上面命令检查 e:\out\ 下的文件5.处理脚本/pfile/密码文件5.1 查看trans.sql内容,将windows的文件结构,比如 e:\xxx ,均修改为 linux 文件目录结构 /u01/xxx5.2 修改pfile 文件,并传输到 linux 主机,并将 pfile 中的windows的文件结构,比如 e:\xxx ,均修改为 linux 文件目录结构 /u01/xxx6.运行trans.sql 脚本(目标库)6.1 STARTUP NOMOUNT PFILE='/u01/mmtest/pfile.ora'6.2 @trans.sqlb. 在目标端转换在源端转换即可,无须在目标端设置