Posted in Database, Migrations, Oracle

Oracle database migration from Windows to Linux

I just wanted to make a post for this:

I had a task to migrate an oracle database ( from Windows to Linux. On linux I have software version.

First I did some checks:

First I checked the endian:

On Windows I get this:

SQL> SELECT A.platform_id, A.platform_name, B.endian_format
  2   FROM   v$database A, v$transportable_platform B
  3  WHERE  B.platform_id (+) = A.platform_id;

----------- ------------------------------ --------------
         12 Microsoft Windows x86 64-bit   Little


And on Linux I get this:

SQL > SELECT A.platform_id, A.platform_name, B.endian_format
 FROM   v$database A, v$transportable_platform B
WHERE  B.platform_id (+) = A.platform_id;  2    3  

------------ ------------------------------ --------------
          13 Linux x86 64-bit               Little

Elapsed: 00:00:00.01
SQL > 

As you can see, I’m lucky today as on both platforms the endian is the same (“Little”) which means no conversion needed. What I’m going to do is just a full export and import using data pump.

On Windows:

expdp  \'/ as sysdba\' full=Y directory=DATA_PUMP_DIR dumpfile=DB_full_exp.dmp logfile=DB_full_exp.log

I’m going to copy the export file over to Linux box.

On Linux:

First I’m going to create an empty database and then I’m going to run the import:

impdp   \'/ as sysdba\' directory=DATA_PUMP_DIR dumpfile=DB_FULL_EXP.DMP exclude=statistics 

I’m getting a lot of ORA-39111 which means that the object exists. This is about the objects which are created already within default schemas like SYS,SYSTEM…. I just ignored them and in the end I compiled everything and all looks good.

sqlplus / as sysdba


I am an Oracle DBA with experience in Maximum Availability technology such as RAC, Data Guard, Grid Control and ASM. I worked with version 9i through 12c on a number of operating systems. Next to that I have an extensive experience with PL/SQL, Oracle eBusiness Suite and shell scripting. Specialties: Oracle RAC & ASM (Configuration/Monitoring/Tuning) Oracle Data Guard (Configuration/Monitoring/Tuning) EM12c (Installation / troubleshooting) SQL & PLSQL *nix Shell scripting

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.