Transport Database from Linux to Windows
Hello, friends in this article we are going to discuss How to Transport Database from Linux to windows. Transportable Database (TDB) requires 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 the source system or target system. When we are performing source system conversion the TDB creates a duplicate copy of all data files on the source system with the format of the target system. That converted datafiles must be a move to the 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.
Prerequisites Check
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 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;
/
CONVERT DATABASE
Run RMAN CONVERT DATABASE command and Create folder to store converted datafiles.
$mkdir /u01/dbtransport/
The Convert Database command will creates below files.
- Transport script which contains SQL statements, and its use for creating a new database on the target platform.
- Pfile contains settings which are we need on the target database, there are few entries on top of pfile, it should be edit during transport database on the target platform.
- The duplicate copy of All Datafiles with the format of the 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 the 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.
Read - How to Convert the NON-CDB database to CDB
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
One thought on “How to Transport Database from Linux to windows?”