The disk of the customer's 32-bit Oracle database system is damaged. Fortunately, the Oracle database is intact. The customer requested to migrate the database to the newly purchased device. The memory size of the new device is 64.
The disk of the customer's 32-bit Oracle database system is damaged. Fortunately, the Oracle database is intact. The customer requested to migrate the database to the newly purchased device. The memory size of the new device is 64.
The disk of the customer's 32-bit Oracle database system is damaged. Fortunately, the Oracle database is intact. The customer requested to migrate the database to the newly purchased device. The memory size of the new device is 64 GB, and the system RedHat 6.2 64-bit. It is definitely not feasible to directly copy data files, because the wordsize of Oracle stored procedures is different in 32-bit and 64-bit platforms, although the user's stored procedures can be re-compiled during use, however, Oracle's system storage process requires manual conversion.
Migration from 32-bit to 64-bit for a single Oracle instance
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian
To sum up, the migration process is as follows:
1: Back up the Oracle database
2: Back up the control file to trace (for new control files)
SQL> alter database backup controlfile to trace;
Database altered.
SQL> oradebug setmypid
Statement processed.
SQL> oradebug tracefile_name
/U01/app/admin/easy/udump/easy_ora_18830.trc
SQL> host cat/u01/app/admin/easy/udump/easy_ora_18830.trc
......
--
-- Set #1. NORESETLOGS case
--
-- The following commands will create a new control file and use it
-- To open the database.
-- Data used by Recovery Manager will be lost.
-- Additional logs may be required for media recovery of offline
-- Use this only if the current versions of all online logs are
-- Available.
-- After mounting the created controlfile, the following SQL
-- Statement will place the database in the appropriate
-- Protection mode:
-- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
Create controlfile reuse database "EASY" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
# MAXLOGHISTORY 292
LOGFILE
GROUP 1'/oradata/easy/redo01.log 'SIZE 11200 K,
GROUP 2'/oradata/easy/redo02.log 'size 11200 K
-- STANDBY LOGFILE
DATAFILE
'/Oradata/easy/system01.dbf ',
'/Oradata/easy/undotbs01.dbf ',
'/Oradata/easy/sysaux01.dbf ',
'/Oradata/easy/users01.dbf'
Character set ZHS16GBK
;
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- Disk. Any one log file from each branch can be used
-- Re-create incarnation records.
-- Alter database register logfile '/u01/app/flash_recovery_area/EASY/archivelog/2014_11_05/o1_mf_1_1 _ % u _. arc ';
-- Alter database register logfile '/u01/app/flash_recovery_area/EASY/archivelog/2014_11_05/o1_mf_1_1 _ % u _. arc ';
-- Recovery is required if any of the datafiles are restored backups,
-- Or if the last shutdown was not normal or immediate.
RECOVER DATABASE
-- Database can now be opened normally.
Alter database open;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
Alter tablespace temp add tempfile '/oradata/easy/temp01.dbf'
SIZE 20971520 reuse autoextend on next 655360 MAXSIZE 32767 M;
-- End of tempfile additions.
--
-- Set #2. RESETLOGS case
--
-- The following commands will create a new control file and use it
-- To open the database.
-- Data used by Recovery Manager will be lost.
-- The contents of online logs will be lost and all backups will
-- Be invalidated. Use this only if online logs are damaged.
-- After mounting the created controlfile, the following SQL
-- Statement will place the database in the appropriate
-- Protection mode:
-- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
Create controlfile reuse database "EASY" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
# MAXLOGHISTORY 292
LOGFILE
GROUP 1'/oradata/easy/redo01.log 'SIZE 11200 K,
GROUP 2'/oradata/easy/redo02.log 'size 11200 K
-- STANDBY LOGFILE
DATAFILE
'/Oradata/easy/system01.dbf ',
'/Oradata/easy/undotbs01.dbf ',
'/Oradata/easy/sysaux01.dbf ',
'/Oradata/easy/users01.dbf'
Character set ZHS16GBK
;
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- Disk. Any one log file from each branch can be used
-- Re-create incarnation records.
-- Alter database register logfile '/u01/app/flash_recovery_area/EASY/archivelog/2014_11_05/o1_mf_1_1 _ % u _. arc ';
-- Alter database register logfile '/u01/app/flash_recovery_area/EASY/archivelog/2014_11_05/o1_mf_1_1 _ % u _. arc ';
-- Recovery is required if any of the datafiles are restored backups,
-- Or if the last shutdown was not normal or immediate.
RECOVER DATABASE USING BACKUP CONTROLFILE
-- Database can now be opened zeroing the online logs.
Alter database open resetlogs;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
Alter tablespace temp add tempfile '/oradata/easy/temp01.dbf'
SIZE 20971520 reuse autoextend on next 655360 MAXSIZE 32767 M;
-- End of tempfile additions.
--
For more details, please continue to read the highlights on the next page: