Transport Database from Linux to Windows
Hello friends in this article we are going to discussed how to Migrate Database from Linux to windows. Transportable Database (TDB) require all the datafiles format must be converted to the targeted platform format.
How Migrate Database from Linux to windows?
During TDB, the datafiles conversion can take place one from both source system or target system. When we are performing source system conversion the TDB create duplicate copy of all datafiles on source system with the format of target system. That converted datafiles must be move on target system.
So During Migrate Database from Linux to windows, the Endian Format must be same.
Steps to Migrate Database from Linux to Window
- Prerequisites (Check platform name, Endian Format for both systems).
- Database must be open in Read Only mode.
- Check database is ready for migration.
- Run RMAN CONVERT DATABASE command.
- Send required files on target system.
- Finished migration.
Check platform name and Endian Format for both systems using following queries.
SQL> select platform_name from v$database; (Run this command on both machines)
Run following command for Source DB to check endian format.
SQL> select platform_id, platform_name,endian_format from v$transportable_platform Where upper(platform_name) like '%LINUX IA%';
And run following command for Target DB to check endian format .
SQL> select platform_id, platform_name,endian_format from v$transportable_platform Where upper(platform_name) like ‘%MICROSOFT%’;
Actions on Source DB
Start source database in Read Only mode.
SQL> shu immediate SQL> startup mount SQL> alter database open read only;
Check Database is ready for transportation or not using below pl/sql code
To identify directories, tables or Binary files with the help of executing DBMS_TDB.CHECK_EXTERNAL function. If something is identified then you must be copy these manually and recreate the database directories.
SQL> SET SERVEROUTPUT ON; SQL> DECLARE b BOOLEAN; BEGIN b:=DBMS_TDB.CHECK_DB('Microsoft Windows x86 64-bit',DBMS_TDB.SKIP_READONLY); if b then dbms_output.put_line('YES your database can be transported to Windows platform'); else dbms_output.put_line('NO your database cannot be transported to WIndows Platform'); end if; end; /
Run RMAN CONVERT DATABASE command and Create folder to store converted datafiles.
The Convert Database command will creates below files.
- Transport script which contains SQL statements, and its use for creating new database on the target platform.
- Pfile which is contains settings which is we need on target database, there is few entries in top of pfile, it should be edit during transport database on target platform.
- Duplicate copy of All Datafiles with the format of target platform.
$rman target/ RMAN> convert database new database ‘new_db_name’ Transport script ‘/u01/dbtransport/transport.sql’ To platform ‘Microsoft Windows IA (32-bit)’ Format ‘/u01/dbtransport/new_db_name’ Db_file_name_convert ‘/u01/app/oracle/oradata/source_db_name’ ‘/u01/dbtransport/’;
After completing above command, open pfile and change the location as per target DB, Also open transport.sql and check, edit if needed.
Create following folders on target system.
Mkdir c:\app\administrator\oradata\new_db_name Mkdir c:\app\administrator\admin\new_db_name\adump
Send All required files on target system.
Yes, move all files from source system ‘/u01/dbtransport’ to target ‘c:\app\administrator\oradata\new_db_name’.
Like: DATAFILE, PFILE, and TRANSPORT SCRIPT
Actions on Target DB
Now Finish migration with following steps on target DB.
Create db service on windows using “ORADIM”
C:\oradim –new –sid new_db_name
Now Execute transport script on sql prompt.
C:\se oracle_sid=new_db_name C:> sqlplus / as sysdba SQL>@C:\app\administrator\oradata\new_db_name\transport.sql
After completing above script, Now your Database migration has been completed, login in database and check all details.
You Can subscribe my YouTube channel