HOME > > Project: Cross Platform Migration by using RMAN

Project: Cross Platform Migration by using RMAN

Anup - Friday, August 5, 2011

(From Windows-32 bit to Solaris x86)

Source System Details:

Platform: Windows – 32 bit
DB Version: 10.2.0.2
DB NAME: INDIAN
DB Location: D: /INDIAN/

Target System Details:

Platform: Solaris x86
DB Version: 10.2.0.2
DB NAME: INDIAN
DB Location: /oracle/INDIAN/
Temporary Location: /oracle/win ------ Location will be use for Temporary Work

Limitation/ Restriction:

  • Source and destination platform must share the same endian format.

  • Redo log files and control files from the source database are not transported. New control files and redo log files are created for the new database during the transport process, and an  Open Resetogs is performed once the new database is created. Similarly, tempfiles belonging to locally managed temporary tablespaces are not transported. The temporary tablespace will be re-created on the target platform when the transport script is run.

  • BFiles, External tables and directories, Password files are not transported.

  • The Source and the target database version must be equal / greater than 10.2.0. version 


Step 1: Check endian format.

SQL>select PLATFORM_NAME, ENDIAN_FORMAT from V$TRANSPORTABLE_PLATFORM;

Step 2: Open Source Database in Read Only mode.

SQL> alter database open read only;

Step 3: Use DBMS_TDB.CHECK_DB to check whether the database can be transported to a desired destination platform, and whether the current state of the database (such as incorrect compatibility settings, in-doubt or active transactions) permits transport.

SQL> set serveroutput on
SQL>
Declare
db_ready boolean;
begin
db_ready := dbms_tdb.check_db(' Solaris Operating System (x86)');
end;
/

If you call DBMS_TDB.CHECK_DB and no messages are displayed indicating conditions preventing transport BEFORE the "PL/SQL procedure successfully completed message", then your database is ready for transport.

Step 4: RMAN can not automate the transport of external tables, directories or BFILEs. So we use DBMS_TDB.CHECK_EXTERNAL package to identify such files as mention above.

SQL> set serveroutput on
SQL>
declare
external boolean;
begin
external := dbms_tdb.check_external;
end;
/

The following directories exist in the database:
SYS.DATA_PUMP_DIR

PL/SQL procedure successfully completed.

If there are no external objects, then this procedure completes with no output. If there are external objects, however, the output will be somewhat similar to above.

-------à Now database is ready to Transport

Step 5: Run the RMAN CONVERT DATABASE command on the source platform.

RMAN>

CONVERT DATABASE ON TARGET PLATFORM
CONVERT SCRIPT 'C:\convertscript.rman'
TRANSPORT SCRIPT 'C:\transportscript.sql'
new database 'INDIAN'
FORMAT 'C:\%U';

Step 6: Now copy the following files to the destination machine manually (Temporary Location: /oracle/win):

+ Datafiles
+ Transport.sql
+ Convertscript.rman

Step 7: Copy Parameter File to Target System from Source System and edit the environment specific parameters.

Important: Control_files parameter set to Temporary Location

Step 8: Create a dummy Control file in Temporary Location: /oracle/win

SQL> startup nomount;
ORACLE instance started.

SQL>
CREATE CONTROLFILE REUSE SET DATABASE "INDIAN" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 4 '/oracle/win/redo01.log' SIZE 10M,
GROUP 5 '/oracle/win/redo02.log' SIZE 10M,
GROUP 6 '/oracle/win/redo03.log' SIZE 10M
DATAFILE
'/oracle/win/SYSTEM.DBF',
'/oracle/win/SYSAUX.DBF',
'/oracle/win/UNDOTBS1.DBF',
'/oracle/win/USERS.DBF'
CHARACTER SET WE8MSWIN1252
;

Control file created.

Step 9: Now edit the file Convertscript.rman and make necessary changes with respect to the filesystem and the file names. Now once the changes are done run the script from rman prompt

Important:
--CONVERT DATAFILE '---Should Be Temp Location---'
--FORMAT '----Should be database location--------'

$ RAMN target / @CONVERTSCRIPT.RMAN

Step 10: Now shutdown the database and delete the dummy controlfile.

Step 11: Now edit the TRANSPORT sql script to reflect the new path for datafiles and redolog files in the CREATE CONTROLFILE section of the script. Also change all references to the INIT.ORA in the script to the new path and name of the INIT.ORA modified above.

Step 12: Once the PFILE and TRANSPORT sql scripts are suitably modified invoke SQLPLUS on the destination host after setting the Oracle environment parameters and then run TRANSPORT.sql as

-When the transport script finishes, the creation of the new database is complete.-

Contact me

Get in Touch

Need to get touch with me? Please fill out the form with your enquiry.

Name
Anup Srivastav
Address
Lucknow - Utter Pradesh
Email
myindiandba@gmail.com
Message me