Transport Tablespace from Linux to Windows

Transport Tablespace from Linux to Windows

In this tutorial, I’m going to show you how Transport tablespace from Linux to windows platform, in oracle Database we can transport tablespace and Database from one platform to another platform. In this topic, I’m using Redhat Linux 6 (64 bit) and Microsoft Windows 7 (64 bit) with ORACLE 11G (64 bit), following commands.

Transport tablespace from Linux to windows platform step by step

Create a new tablespace then create some tables which are store in this tablespace see commands.

NOTE:- SYS user contents we can not move through this tablespace.

create tablespace komal
          datafile '/u01/app/oracle/oradata/db11g/komal01.dbf'
          size 10m;

 Tablespace created.

Now Create a sample table and store in komal tablespace.

create table scott.komal tablespace komal
          as select * from scott.emp;

 Table created.

Make your tablespace read only because read write tablespace we cannot move.

 alter tablespace komal read only;

 Tablespace altered.

transport_set_check parameter value must make TRUE.

exec dbms_tts.transport_set_check('komal',true);

 PL/SQL procedure successfully completed.

Now check violations to your tablespace if it’s returned no rows selected it means every thing is ok and you can move this tablespace successfully, if it’ll be return some rows then check you done all step or not.

select * from transport_set_violations;
 
no rows selected

These all are transportable platform where you can transport your tablespace, keep in mind ENDIAN FORMAT must be same.

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 x86 64-bit           Little
 16          Apple Mac OS               Big
 12       Microsoft Windows x86 64-bit  Little
 17      Solaris Operating System (x86) Little
 18          IBM Power Based Linux      Big
 19          HP IA Open VMS             Little
 20   Solaris Operating System (x86-64) Little
 21          Apple Mac OS (x86-64)      Little

21 rows selected.

Now going on HOST using ‘host’ command.

SQL> host

Then going on RMAN prompt using below command, then convert datafile by using RMAN.

 rman target/

RMAN> convert tablespace komal
      to platform='Microsoft Windows x86 64-bit' db_file_name_convert='/u01/app/oracle/oradata/db11g/komal01.dbf','/u01/komal01_convert.dbf';


RMAN> exit

Export tablespace by using expdp command, it’ll be asking username and password enter username system and system user password.

$export DATA_PUMP_DIR=DATA_PUMP_DIR


$expdp transport_tablespaces=komal dumpfile=komal.dmp

 Export: Release 11.2.0.3.0 - Production on Sat Aug 1 11:16:33 2015
 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
 Username: system
 Password:********

On Windows Server

Now copy both files (RMAN converted file and expdp.dump file) in your pen drive than going on your WINDOWS system and past both file to the appropriate location. And Login in windows Database and check datafile location and dump file location using the following commands.

select name from v$datafile;

 NAME
 -----------------------------------------------------
 D:\APP\KIRANSRAN\ORADATA\DB11G\SYSTEM01.DBF
 D:\APP\KIRANSRAN\ORADATA\DB11G\SYSAUX01.DBF
 D:\APP\KIRANSRAN\ORADATA\DB11G\UNDOTBS01.DBF
 D:\APP\KIRANSRAN\ORADATA\DB11G\USERS01.DBF
 D:\APP\KIRANSRAN\ORADATA\DB11G\EXAMPLE01.DBF

check Directory path

select * from dba_directories;

Going on host using host command and follow steps.

SQL>host
D:\>set DATA_PUMP_DIR=DATA_PUMP_DIR
D:\>impdp transport_datafiles='D:\app\kiransran\oradata\db11g\komal01.dbf'  dumpfile=komal.dmp

Import: Release 11.2.0.1.0 - Production on Sat Aug 1 11:28:42 2015
 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
 Username: system
 Password:

Now login into your Database and check tablespace and table are exist on widows platform.

Read - How to add Multiple Temporary Tablespace

Connect with me on:

Instagram: https://www.instagram.com/shripaldba
Linkedin: 
https://www.linkedin.com/in/shripal-singh
Twitter: 
https://twitter.com/ocptechnology
Facebook: 
https://www.facebook.com/ocptechnology
YouTube:
https://www.youtube.com/ocptechnology

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top