Last week I’ve done a migration from 32 bit to 64 bit on Linux server. Just would like to share the experience and steps that should be performed during the migration
First of all, I would advise you to check Oracle Support for existence document. I’ve found the following document very useful:
How To Migrate a Database From Linux x86 ( 32-bit ) To Linux Itanium 64-bit (IA64) [ID 553868.1]
Before starting the migration (or any critical operation) take backup of the database and make sure you’ve tested the migration on the test environment (It’s very easy. Just create a new database on the 32bit OS, move it to 64 bit OS and practice the migration)
The first step is to get the list of all datafiles (dba_data_files), redo log files (v$logfile) and control files (v$controlfile).
Then, take backup of parameter file and extract creation script of the control file:
[php]
SQL> create pfile=’/tmp/pfile_mydb.ora’ from spfile;
SQL> alter database backup controlfile to trace as ‘/tmp/controlfile_script.dat’;
[/php]
The shutdown the database, copy all datafiles, redo log files, new parameter file and control file creation script to the new server. Make necessary changes to the parameter file (show the new destination for the controlfiles) and to the control file creation script (change the file names to the new folder)
If everything ok, start the database in NOMOUNT mode, and create the controlfiles by running the script:
[php]
SQL> startup nomount pfile=’/tmp/pfile_mydb.ora’;
SQL> create spfile from pfile=’/tmp/pfile_mydb.ora’;
SQL> startup nomount force;
[/php]
After the controlfile created successfully open the database. If you’ll try to open the database in normal mode, you’ll get some internal errors which is very scare to get at midnight on the production database
I got the following internal error after trying to open the database in normal mode as metalink note suggested (however, I was wondering and thinking to NOT open it in normal mode)
[php]
ORA-00604: error occurred at recursive SQL level 1
ORA-06553: PLS-801: internal error [56319]
Error 0 in kwqmnpartition(), aborting txn
Error 0 in kwqmnpartition(), aborting txn
Error 0 in kwqmnpartition(), aborting txn
Error 0 in kwqmnpartition(), aborting txn
Shutting down instance: further logons disabled
Wed Jul 4 02:42:30 2012
Stopping background process QMNC
Wed Jul 4 02:42:30 2012
Stopping background process CJQ0
Wed Jul 4 02:42:32 2012
Stopping background process MMNL
Wed Jul 4 02:42:33 2012
Stopping background process MMON
Wed Jul 4 02:42:34 2012
Errors in file /home/oracle/admin/MYDB/udump/mydb_ora_3133.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-06553: PLS-801: internal error [56319]
[/php]
And instance closed automatically …
I didn’t payed attention the that error (however panicked a little )
I’ve tried to open it again with UPGRADE option which succeeded
[php]
SQL> startup upgrade;
[/php]
There’s a metalink note on the above mentioned error:
ORA-00600 [17093] and ORA-00600 [kkmendsel-pin] Errors Continuously [ID 756592.1]
Actually I didn’t checked it when I got the error, just bypassed it and tried to open the database
So I suggest you to open with with RESETLOGS and UPGRADE option at once using the following command :
[php]
SQL> alter database open resetlogs upgrade;
[/php]
After the database opened successfully, you need to run the following sql files:
[php]
SQL> @$ORACLE_HOME/rdbms/admin/utlirp.sql;
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql ;
[/php]
Both scripts are different. The first one will INVALIDATE all objects at the database, and the second one VALIDATEs.
After both scripts completed, shutdown the instance and start it in normal mode. Then check if you have any INVALIDE objects
If you’re using OLAP components, (or not using but just installed), you’ll get some internal errors and get some objects INVALIDE. In this case either remove the OLAP objects (if you don’t use them) and install it again, or check the following metalink note :
Migrating OLAP From 32 To 64 Bits [ID 352306.1]
After finishing all, make sure you’ve moved listener.ora and tnsnames.ora file from the old server to the new one and start the listener