In order to migrate oracle database from 32 bit to 64 bit, we used the following RMAN restore method.
3. Take the full backup of the database via RMAN on the 32 bit by running the following command:
5. Start the database on 64 bit in nomount state:
SQL> startup nomount;
6. Connect to RMAN and set the dbid:
$ rman target /
7. Restore the controlfile and database:
1. Ensure the new 64 bit OS has the 64 bit Oracle binary installed and configured.
2. Create the pfile of the database on the 64 bit. This can simply be copied from 32 bit. Make sure it is updated with correct files locations if it is different on the new server.
RMAN> run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
backup database plus archivelog;
backup current controlfile;
}
{
allocate channel c1 type disk;
allocate channel c2 type disk;
backup database plus archivelog;
backup current controlfile;
}
4. Copy backup files to the 64 bit server.
SQL> startup nomount;
6. Connect to RMAN and set the dbid:
$ rman target /
RMAN> set dbid=<dbid from 32 server>;
7. Restore the controlfile and database:
RMAN> restore controlfile from '<location of the backup>';
RMAN> alter database mount;
RMAN> restore database;
RMAN> alter database mount;
RMAN> restore database;
8. Recover database to the point you want. If all the backups are available, then recover the database to the latest archivelog:
RMAN> run
{
set until sequence xxxx;
recover database;
}
RMAN> exit
{
set until sequence xxxx;
recover database;
}
RMAN> exit
9. Once the recovery is done, perform the following tasks in order to start the database on 64 bit platform:
SQL> recover database until cancel using backup controlfile;
cancel
SQL> alter database open resetlogs migrate;
SQL> @ ?/rdbms/admin/utlirp.sql
cancel
SQL> alter database open resetlogs migrate;
SQL> @ ?/rdbms/admin/utlirp.sql
SQL> shutdown immediate;
SQL> startup;
SQL> @ ?/rdbms/admin/utlrp.sql
SQL> shutdown immediate;
SQL> startup
SQL> startup;
SQL> @ ?/rdbms/admin/utlrp.sql
SQL> shutdown immediate;
SQL> startup
10. The database is now ready to be used.
NOTE: If the database that is migrated has a standby database as well, then the standby database should be recreated since the primary database was started in resetlogs mode.
No comments:
Post a Comment