Professional Documents
Culture Documents
Description of the test ......................................................................................................................................................................... 2 The test environment .......................................................................................................................................................................... 2 List of Steps ........................................................................................................................................................................................ 2 Implementation step by step ............................................................................................................................................................... 3 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Check endianess on source and target servers....................................................................................................................... 3 Create reference data on the tablespace to be transported .................................................................................................... 5 Check that the tablespace is self contained............................................................................................................................. 8 Set the tablespaces to be transported read-only ..................................................................................................................... 8 Create a directory for data pump exporting the tablespace set metadata ............................................................................... 9 Export the tablespace set metadata ........................................................................................................................................ 9 Transfer the metadata export and tablespace set datafiles to the target server .................................................................... 10 Convert the transportable tablespace set on the target server .............................................................................................. 10 Create a data pump directory on the target server ................................................................................................................ 11 Import the metadata on the target database .......................................................................................................................... 12 Check the control data on the plugged tablespace ................................................................................................................ 13 Restrictions on convert tablespace and convert datafile........................................................................................................ 14
List of Steps
1. Check endianess on source and target servers 2. Create reference data on the Tablespaces to be transported 3. Check that the tablespace is self-contained 4. Set the Tablespaces to be transported read-only 5. Create a directory for data pump exporting the tablespace set metadata 6. Export the tablespace set metadata
7. Transfer the metadata export and tablespace set datafiles to the target server 8. Convert the transportable tablespace set on the target server 9. Create a data pump directory on the target server 10. Import the metadata on the target database 11. Check the control data on the plugged tablespace 12. Restrictions on convert tablespace and convert datafile
PLATFORM_NAME ENDIAN_FORMAT ---------------------------------------- -------------Solaris[tm] OE (64-bit) Big On the Target Server > uname -a Linux pollux.com 2.6.18-8.el5xen #1 SMP Wed Jun 6 00:05:22 EDT 2007 i686 i686 i386 GNU/Linux SQL> select d.platform_name, endian_format from v$transportable_platform tp, v$database d where tp.platform_name = d.platform_name / PLATFORM_NAME ENDIAN_FORMAT ---------------------------------------- -------------Linux IA (32-bit) Little
SQL> select platform_id, platform_name, endian_format from v$transportable_platform order by endian_format, platform_id;
PLATFORM_ID ----------1 2
3 4 6 9 16 18 5 7 8 10 11 12 13 15 17 19 20
HP-UX (64-bit) HP-UX IA (64-bit) AIX-Based Systems (64-bit) IBM zSeries Based Linux Apple Mac OS IBM Power Based Linux HP Tru64 UNIX Microsoft Windows IA (32-bit) Microsoft Windows IA (64-bit) Linux IA (32-bit) Linux IA (64-bit) Microsoft Windows 64-bit for AMD Linux 64-bit for AMD HP Open VMS Solaris Operating System (x86) HP IA Open VMS Solaris Operating System (AMD64)
Big Big Big Big Big Big Little Little Little Little Little Little Little Little Little Little Little
<<<< Target
19 rows selected.
Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 1610612736 bytes Fixed Size 2030456 bytes Variable Size 385877128 bytes Database Buffers 1207959552 bytes Redo Buffers 14745600 bytes Database mounted. Database opened. SQL> create user avargas identified by oracle default tablespace users temporary tablespace temp; User created. SQL> grant dba to avargas; Grant succeeded. SQL> conn avargas/oracle Connected. SQL> create table myusers as select * from dba_users;
Table created. SQL> insert into myusers select * from myusers; 8 rows created. SQL> / 16 rows created. SQL> / 32 rows created. SQL> / 64 rows created. SQL> / 128 rows created. SQL> commit; Commit complete. SQL> select count(*) from myusers; COUNT(*)
---------256
Tablespace altered.
5. Create a directory for data pump exporting the tablespace set metadata
SQL> create or replace directory expmetadata as '/srvdb/app01/oracle/oradata/AVTST/dpexp'; Directory created.
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK Master table "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYSTEM.SYS_EXPORT_TRANSPORTABLE_01 is: /srvdb/app01/oracle/oradata/AVTST/dpexp/tts_users.dmp Job "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 16:33:23
7. Transfer the metadata export and tablespace set datafiles to the target server
Use ftp, scp, dbms_file_transfer or other mean to move your data to the target serve. An ASM diskgroup cannot be used to move data from one platform to other.
RMAN> convert datafile '/oradisk/app01/oracle/readwrite/o1_mf_users_3pw634w4_.dbf' 2> from platform 'Solaris[tm] OE (64-bit)' 3> db_file_name_convert '/oradisk/app01/oracle/readwrite','+DB1DATADG/redx/datafile' 4> ; Starting backup at 30/12/2007 01:03:03 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=154 devtype=DISK channel ORA_DISK_1: starting datafile conversion input filename=/oradisk/app01/oracle/readwrite/o1_mf_users_3pw634w4_.dbf converted datafile=+DB1DATADG/redx/datafile/o1_mf_users_3pw634w4_.dbf channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:09 Finished backup at 30/12/2007 01:03:18 Note that there are some restrictions related to convert tablespace and convert datafile
Grant succeeded.
References
Oracle Database Backup and Recovery Advanced User's Guide 10g Release 2 (10.2) Chapter 15 RMAN Cross-Platform Transportable Databases and Tablespaces Other Documents OTN Oracle Database Cross Platform Transportable Tablespace Minimizing Data Migration Time, Using Cross-Platform Transportable Tablespace