oracle database migration steps
Wednesday, October 15, 2014
Migrate 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;
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);
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;
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