10g跨平臺傳輸表空間

byfree發表於2009-08-14
測試平臺:window->linux
windows:
驗證表空間是否是自包含:
SQL> exec dbms_tts.transport_set_check('mary',true);
PL/SQL 過程已成功完成。
SQL> SELECT * FROM TRANSPORT_SET_VIOLATIONS;
no rows selected
SQL> col platform_name for a40
SQL> select * from V$TRANSPORTABLE_PLATFORM. ;
PLATFORM_ID PLATFORM_NAME                            ENDIAN_FORMAT
----------- ---------------------------------------- --------------
          1 Solaris[tm] OE (32-bit)                  Big
          2 Solaris[tm] OE (64-bit)                  Big
          7 Microsoft Windows IA (32-bit)            Little
         10 Linux IA (32-bit)                        Little
          6 AIX-Based Systems (64-bit)               Big
          3 HP-UX (64-bit)                           Big
          5 HP Tru64 UNIX                            Little
          4 HP-UX IA (64-bit)                        Big
         11 Linux IA (64-bit)                        Little
         15 HP Open VMS                              Little
          8 Microsoft Windows IA (64-bit)            Little
          9 IBM zSeries Based Linux                  Big
         13 Linux 64-bit for AMD                     Little
         16 Apple Mac OS                             Big
         12 Microsoft Windows 64-bit for AMD         Little
         17 Solaris Operating System (x86)           Little
         18 IBM Power Based Linux                    Big
17 rows selected.
表空間置為只讀:
SQL> alter tablespace mary read only;
表空間已更改。
C:\>expdp system/sysby dumpfile=mary.dmp directory=expdir transport_tablespaces=mary
Export: Release 10.2.0.1.0 - Production on 星期五, 14 8月, 2009 17:12:27
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
連線到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
啟動 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01":  system/******** dumpfile=mary.dmp
directory=expdir transport_tablespaces=mary
處理物件型別 TRANSPORTABLE_EXPORT/PLUGTS_BLK
處理物件型別 TRANSPORTABLE_EXPORT/TABLE
處理物件型別 TRANSPORTABLE_EXPORT/TABLE_STATISTICS
處理物件型別 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
已成功載入/解除安裝了主表 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01"
******************************************************************************
SYSTEM.SYS_EXPORT_TRANSPORTABLE_01 的轉儲檔案集為:
  D:\ORACLE\PRODUCT\DIRECTORIES\MARY.DMP
作業 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" 已於 17:12:38 成功完成
RMAN> convert tablespace mary to platform. 'Linux IA (32-bit)' format 'c:\%U.bak';
啟動 backup 於 14-8月 -09
使用通道 ORA_DISK_1
通道 ORA_DISK_1: 啟動資料檔案轉換
輸入資料檔案 fno=00006 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\MARY.DBF
已轉換的資料檔案 = C:\DATA_D-ORCL_I-1216038192_TS-MARY_FNO-6_1KKMMC8T.BAK
通道 ORA_DISK_1: 資料檔案轉換完畢, 經過時間: 00:00:01
完成 backup 於 14-8月 -09
ftp傳輸DATA_D-ORCL_I-1216038192_TS-MARY_FNO-6_1KKMMC8T.BAK和mary.dmp檔案到LINUX相應目錄
 
Linux:
RMAN> convert datafile '/utils/DATA_D-ORCL_I-1216038192_TS-MARY_FNO-6_1KKMMC8T.BAK' db_file_name_convert '/utils/DATA_D-ORCL_I-1216038192_TS-MARY_FNO-6_1KKMMC8T.BAK','/u01/app/oracle/oradata/orcl/mary.dbf';
Starting backup at 14-AUG-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile conversion
input filename=/utils/DATA_D-ORCL_I-1216038192_TS-MARY_FNO-6_1KKMMC8T.BAK
converted datafile=/u01/app/oracle/oradata/orcl/mary.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:03
Finished backup at 14-AUG-09
$ impdp system/sys dumpfile=MARY.DMP directory=dpdata transport_datafiles='/u01/app/oracle/oradata/orcl/mary.dbf'
Import: Release 10.2.0.1.0 - Production on Friday, 14 August, 2009 11:20:04
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_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01":  system/******** dumpfile=MARY.DMP directory=dpdata transport_datafiles=/u01/app/oracle/oradata/orcl/mary.dbf
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 11:20:55

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

相關文章