Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Friday, 3 October 2014

Migrate from 32 bit to 64 bit using RMAN

Tested: Oracle 9i R2
OS: Windows 2003 server
This article describes the very simple procedure to migrate a database from Windows 32 bit system to 64 bit using RMAN. Follow the steps below when the need arises to build a new Oracle Applications database instance (for a test migration or when re-organizing an existing production instance, for example). Before starting, plan carefully for such issues as the location of new DATAFILES and space considerations. The steps below specifically address the need to refresh a User-Test / Development instance with current production data.
Migrating through RMAN is much faster than Import/export but using the export/import utilities to rebuild your instance instead of cloning because an export/import rebuild provides the opportunity for clean-up and correction.
Step 1: Take a Backup on Source 32 Bit Server:
Connect the rman target to create a full backup of the database including all archivelogs:
CMD>RMAN TARGET SYS/*****@orcl3 CATALOG catalog/catalog@shaan
run {
allocate channel d1 type disk FORMAT "D:\BACKUP\RMAN_BACKUP\HOTBACKUP\Monthly_%T_FULL_%d-%s_%p.db";
allocate channel d2 type disk FORMAT "D:\BACKUP\RMAN_BACKUP\HOTBACKUP\Monthly_%T_FULL_%d-%s_%p.db";
allocate channel d3 type disk FORMAT "D:\BACKUP\RMAN_BACKUP\HOTBACKUP\Monthly_%T_FULL_%d-%s_%p.db";
            incremental level 0 tag Orcl3_FullDB_backup
            filesperset 10
            format "D:\BACKUP\RMAN_BACKUP\HOTBACKUP\Monthly_%T_FULL_%d-%s_%p.db"

            archivelog all delete all input     tag Orcl3_FullArch_Backup
            filesperset 10
            format "D:\BACKUP\RMAN_BACKUP\HOTBACKUP\Monthly_%T_FULL_%d-%s_%p.arc";
release channel d1;
release channel d2;
release channel d3;
Step 2: Preparing target 64 bit server:
When installing Oracle then select software only to create ORACLE_HOME and associated file to run the software only. For details please check this link: The link indicates creation of database as well as Applying patches.
When you install the Oracle9i Database product, you are prompted to select a database configuration suited to your needs. Select here “Software Only
Step 3: Copy backup from Source Server to destination server:
Use simple copy command to copy the Rman backup files from source server to target server.
Step 4: Create the pfile or copy the pfile from source server to destination:
SQL> Create pfile=’D:\Backup\orcl3pfile.sql’ from spfile;
Step 5: Bring up the database with this pfile
Startup the new instance in nomount phase.
C:\> SQLPLUS /nolog
SQL> STARTUP NOMOUNT PFILE=’D:\Backup\orcl3pfile.sql';
SQL> create spfile from pfile = D:\Backup\orcl3pfile.sql’;
Now connect the target database through RMAN and restore controlfile. For more details how to restore check my other post Disaster Recovery from the scratch and Recovery from Complete loss of database
C:\ rman target / nocatalog
RMAN> set dbid=4130713932;
Restore the controlfile:
RMAN> restore controlfile from ‘D:\backup_32bit\control01.ctl’;
RMAN> alter database mount;
RMAN> restore database;
Identify the archivelog till you want to do the recovery and check if you have all the backups you need to do it and run:
RMAN> run {
set until sequence xxxx;
recover database;
RMAN> exit
Step 6: Migrate to 64 Bit:
SQL> recover database until cancel using backup controlfile;
SQL> alter database open resetlogs migrate;
SQL> @$ORACLE_HOME/rdbms/admin/utlirp.sql
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
SQL> shutdown immediate;
SQL> startup;
Note: Do not forget to check tns connection.


Post a Comment