Sports

https://www.espncricinfo.com/ci/engine/match/scores/desktop.html

Migrate Oracle Database Windows to Linux

oracle database migration from windows to linux using


Convert Oracle Database Windows to Linux


Open oracle database  SQL prompt from the command line for checking the current OS Version

Finding Supported platforms (Need to connect to SQLPLUS)


sqlplus “/ as sysdba”


SQL> select * from v$transportable_platform order by 2;

Checking the Number of Objects in our database

Query is
Select count(*) from dba_objects;


As we can see our source database has 79885 objects
Note: We will compare it After the Migration process completion

Verifying the SOURCE database is ready for migration

Database Name: testdb
Platform Name: Microsoft Windows IA (32-bit)


Note: We will shutdown the database first and open it in read-only mode

Shutdown immediate;
Startup mount;
Alter database open read only;



Now below command will make it ready for migration

Set serveroutput on;
Declare
V_return Boolean;
Begin
V_return:=dbms_tdb.check_db('Linux x86 64-bit');
End;
/
PL/SQL procedure successfully completed. (See below Window);


Check and See if External objects are present 
Declare
V_return Boolean;
Begin
V_return:=dbms_tdb.check_external;
End;
/
PL/SQL procedure successfully completed. 

The following directories exist in the database we will use for this activity: 
SYS.DATA_PUMP_DIR 

We are not using it here in this exercise (We will Skip this Step)

Open RMAN prompt for Starting Conversion

Commands to Run (Windows CMD)

rman target /

Converting Database or Preparing for our Destination OS

Command
convert database new database 'testdb' transport script 'C:\Users\kamran\testdb\trasnport.sql' db_file_name_convert 'D:\app\oradata\testdb\testdb' 'C:\Users\kamran\testdb';


Now over transport.sql script is ready, so we will move forward to the Target instance and complete the migration process

Now create Pfile from SPfile on Source database Windows Server using below

Command

 create pfile='C:\Users\kamran\testdb\init_testdb.ora' from spfile;


Copy Source datafile from c:\users\kamran\testdb to Destination Linux using Winscp



Destination Server Settings (Linux Server 64 Bit)

Name     pmstestug
Version   el6uek.x86_64  

Create following directories 

mkdir -p /d02/app/oracle/flash_recovery_area/testdb
mkdir -p /d02/app/oracle/oradata/testdb
mkdir -p /d02/admin/TESTDB/pfile
mkdir -p /d02/admin/TESTDB/adump
mkdir -p /d02/admin/TESTDB/dbdump

Edit init_testdb.ora

Change destination path as per the below image



Executing TRANSPORT.SQL Script on destination




Conclusion

We have successfully migrated our Windows 32 Bit Oracle 11g Database to Linux 64Bit


Thanks for your time and patience.




Popular