I just wanted to make a post for this:
I had a task to migrate an oracle database (11.2.0.1) from Windows to Linux. On linux I have 11.2.0.3 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;
PLATFORM_ID PLATFORM_NAME ENDIAN_FORMAT
----------- ------------------------------ --------------
12 Microsoft Windows x86 64-bit Little
SQL>
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
PLATFORM_ID PLATFORM_NAME ENDIAN_FORMAT
------------ ------------------------------ --------------
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 @$ORACLE_HOME/rdbms/admin/utlrp.sql