Showing posts with label Migration. Show all posts
Showing posts with label Migration. Show all posts

Friday, February 6, 2015

Restore database to new server using RMAN Backup


Restore RMAN to New Host

Steps On Source Database

 **Most Of work will be done on target database

 1- Get DBID By Using The below :

SQL > Select Db_id from v$database ;

 Or RMAN target /

2- Get the last SCN On Database since we will not have active redolog using the below document :

SQL > select max(next_change#) from v$archived_log where archived = 'YES' group by thread#;

 Or Using RMAN:

 RMAN> list backup of archivelog all;

3- Take Backup Using RMAN :

 run
{ allocate channel d1 type disk format 'YOUR-PATH/Database_%U;
allocate channel c1 type disk; allocate channel c2 type disk;
 allocate channel c3 type disk;
BACKUP DATABASE PLUS ARCHIVELOG;
backup current controlfile format 'YOUR_PATH/controlfile_%U';
release channel c1;
release channel c2;
 release channel c3;
 }

Now move all generated backup file to the new host with the same directory for example if you backup on folder /u01/app then on new host should be the same.

Steps On New Server 

After copy file do the below steps:

 1- export ORACLE_SID=SID_SAME_AS_PROD

RMAN TARGET / RMAN > set dbid ; 

RMAN > Startup nomount; 

RMAN > restore spfile to pfile '/u01/app/oracle/oradata/orcl/initorcl.ora' from autobackup; 

RMAN> shutdown abort; 

Now you have to edit SPFile ; 

*.audit_file_dest=’LOCATION’ 
*.control_files=’LOCATION’ 
*.db_recovery_file_dest_size=Size 
*.db_recovery_file_dest=’LOCATION’ 
*.diagnostic_dest=’LOCATION’ 
*.log_archive_dest_1='LOCATION=LOCATION’ 
*.local_listener='LISTENER_ORCL'

RMAN> startup nomount pfile='/u01/app/oracle/oradata/orcl/initorcl.ora'; 

RMAN> restore controlfile from autobackup; 

RMAN> alter database mount; 

Note: now you have 2 options

1 - move the backup to same location on target server 
2- Copy Backup to any location but you need to use CATALOG Command check below : 

RMAN> catalog start with 'Where You copy Backup'; 
You are almost Done,

You have But before restore database you can move datafile to any location using (all the below steps on RMAN ) But Remember don't run the below yet: 

SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/orcl/system01.dbf'; 
SET NEWNAME FOR DATAFILE 2 TO '/u01/app/oracle/oradata/orcl/sysaux01.dbf'; 
SET NEWNAME FOR DATAFILE 3 TO '/u01/app/oracle/oradata/orcl/undotbs01.dbf'; 
SET NEWNAME FOR DATAFILE 4 TO '/u01/app/oracle/oradata/orcl/users01.dbf';
 SET NEWNAME FOR DATAFILE 5 TO '/u01/app/oracle/oradata/orcl/example01.dbf'; 
SET NEWNAME FOR DATAFILE 6 TO '/u01/app/oracle/oradata/orcl/test.dbf'; 
SET NEWNAME FOR DATAFILE 7 TO '/u01/app/oracle/oradata/orcl/dbfs01.dbf'; 

**Note: After TO: New Location.


SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo01.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo01.log'' "; 
SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo02.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo02.log'' ";
 SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo03.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo03.log'' "; 

Are you still having SCN that we see it above :) 
Ok Now you RMAN Script will looks like below 

RUN 
{ 
SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/orcl/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '/u01/app/oracle/oradata/orcl/sysaux01.dbf'; 
SET NEWNAME FOR DATAFILE 3 TO '/u01/app/oracle/oradata/orcl/undotbs01.dbf'; 
SET NEWNAME FOR DATAFILE 4 TO '/u01/app/oracle/oradata/orcl/users01.dbf'; 
SET NEWNAME FOR DATAFILE 5 TO '/u01/app/oracle/oradata/orcl/example01.dbf';
SET NEWNAME FOR DATAFILE 6 TO '/u01/app/oracle/oradata/orcl/test.dbf'; 
SET NEWNAME FOR DATAFILE 7 TO '/u01/app/oracle/oradata/orcl/dbfs01.dbf'; 
SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo01.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo01.log'' "; 
SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo02.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo02.log'' "; 
SQL "ALTER DATABASE RENAME FILE ''/u03/app/oracle/oradata/orcl/redo/redo03.log'' TO ''/u01/app/oracle/oradata/orcl/redo/redo03.log'' ";
SET UNTIL SCN ; 

RESTORE DATABASE; 

SWITCH DATAFILE ALL;

 RECOVER DATABASE;
 } 

Sqlplus / as sysdba 

SQL > Alter database open Resetlogs ;

Restore RMAN backup to another server for testing disaster recovery procedures as well as for cloning

Restore RMAN backup to another server for testing disaster recovery procedures as well as for cloning

This note explains the procedure used to restore an Oracle Suggested Strategy incremental backup on another server.
This is useful when we have to do periodic  testing of disaster recovery procedures where we simulate a scenario when the complete database server has crashed and a new server has been provisioned.
But let us assume that the directory structure on the new or target server is different to that of the source server.
So in this case the backup has been restored to the staging location /home/oracle/stage on the new server  and all the database files are being restored in a different location to that on the source – /home/oracle/sqlfun

Restore the SPFILE
RMAN> startup nomount force;

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_2/dbs/initsqlfun.ora'

starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started

Total System Global Area     158662656 bytes

Fixed Size                     2226456 bytes
Variable Size                104859368 bytes
Database Buffers              46137344 bytes
Redo Buffers                   5439488 bytes

RMAN> restore spfile from '/home/oracle/stage/o1_mf_s_819826669_8x7w7g70_.bkp';

Starting restore at 04-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=162 device type=DISK

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /home/oracle/stage/o1_mf_s_819826669_8x7w7g70_.bkp
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 04-JUL-13
Create the PFILE from SPFILE and make parameter changes as required
$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 4 09:43:48 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter password:
Connected to an idle instance.

SQL> create pfile from spfile;

File created.
Note- make required changes here in the init.ora file to take care of new directories for control files, audit dump, fast recovery area etc
SQL> create spfile from pfile;

File created.

Restore the Control Files
RMAN> restore controlfile from '/home/oracle/stage/o1_mf_s_819826669_8x7w7g70_.bkp';

Starting restore at 04-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/home/oracle/sqlfun/control01.ctl
output file name=/home/oracle/sqlfun/control02.ctl
Finished restore at 04-JUL-13

Mount the database and catalog the backup pieces which have been restored in the new location
RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> catalog start with '/home/oracle/stage';

Starting implicit crosscheck backup at 04-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK
Crosschecked 25 objects
Finished implicit crosscheck backup at 04-JUL-13

Starting implicit crosscheck copy at 04-JUL-13
using channel ORA_DISK_1
Crosschecked 10 objects
Finished implicit crosscheck copy at 04-JUL-13

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/autobackup/2013_07_04/o1_mf_n_819884144_8x9ncjfl_.bkp
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_33_8x84ld7x_.arc
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_35_8x8db3hp_.arc
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_36_8x8dbgcm_.arc
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_34_8x8d9y2h_.arc
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_32_8x6mflv0_.arc

searching for all files that match the pattern /home/oracle/stage

List of Files Unknown to the Database
=====================================
File Name: /home/oracle/stage/o1_mf_sysaux_7zpgb1hd_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w6zcb_.bkp
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w76jv_.bkp
File Name: /home/oracle/stage/o1_mf_undotbs1_7zpgck9f_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w65l9_.bkp
File Name: /home/oracle/stage/o1_mf_example_7zgkdp6p_.dbf
File Name: /home/oracle/stage/o1_mf_threaten_7zpgbyck_.dbf
File Name: /home/oracle/stage/o1_mf_users_7zpgcnno_.dbf
File Name: /home/oracle/stage/o1_mf_s_819826669_8x7w7g70_.bkp
File Name: /home/oracle/stage/o1_mf_index_da_7zgkcz04_.dbf
File Name: /home/oracle/stage/o1_mf_example__7zpgcg0x_.dbf
File Name: /home/oracle/stage/o1_mf_system_7zpgbh79_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w7b0f_.bkp

Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /home/oracle/stage/o1_mf_sysaux_7zpgb1hd_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w6zcb_.bkp
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w76jv_.bkp
File Name: /home/oracle/stage/o1_mf_undotbs1_7zpgck9f_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w65l9_.bkp
File Name: /home/oracle/stage/o1_mf_example_7zgkdp6p_.dbf
File Name: /home/oracle/stage/o1_mf_threaten_7zpgbyck_.dbf
File Name: /home/oracle/stage/o1_mf_users_7zpgcnno_.dbf
File Name: /home/oracle/stage/o1_mf_s_819826669_8x7w7g70_.bkp
File Name: /home/oracle/stage/o1_mf_index_da_7zgkcz04_.dbf
File Name: /home/oracle/stage/o1_mf_example__7zpgcg0x_.dbf
File Name: /home/oracle/stage/o1_mf_system_7zpgbh79_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w7b0f_.bkp

Generate the SET NEWNAME FOR DATAFILE command
Note:
Since the OSS backup image copy is based on Oracle Managed File format (OMF), I find this error even though we have set the DB_FILE_NAME_CONVERT parameter to account for the directory path change between source and target.
RMAN is not restoring the data files in the new location but is looking for the directory path which existed on the source database, but which is not present on the new or target server where we are doing the restore.

RMAN> restore database;
Starting restore at 04-JUL-13
using channel ORA_DISK_1
channel ORA_DISK_1: restoring datafile 00001
input datafile copy RECID=3060 STAMP=819884997 file name=/home/oracle/stage/o1_mf_system_7zpgbh79_.dbf
destination for restore of datafile 00001: /u01/app/oracle/oradata/sqlfun/system01.dbf
ORA-19504: failed to create file “/u01/app/oracle/oradata/sqlfun/system01.dbf”
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 1
ORA-19600: input file is datafile-copy 3060 (/home/oracle/stage/o1_mf_system_7zpgbh79_.dbf)
ORA-19601: output file is datafile 1 (/u01/app/oracle/oradata/sqlfun/system01.dbf)

So to work around this we will generate a text file via SQL*PLUS which will contain the SET NEWNAME commands and call this file from RMAN.
These are the contents of the text file rename_files.sql
set head off pages 0 feed off echo off verify off
set lines 200
spool rename_datafiles.lst
select ‘SET NEWNAME FOR DATAFILE ‘ || FILE# || ‘ TO ”’ || ‘/home/oracle/sqlfun/’ || substr(name,instr(name,’/’,-1)+1) || ”’;’ from v$datafile;
spool off
exit;
$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 4 09:52:44 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @rename_files.sql
SET NEWNAME FOR DATAFILE 1 TO '/home/oracle/sqlfun/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '/home/oracle/sqlfun/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 3 TO '/home/oracle/sqlfun/undotbs01.dbf';
SET NEWNAME FOR DATAFILE 4 TO '/home/oracle/sqlfun/users01.dbf';
SET NEWNAME FOR DATAFILE 5 TO '/home/oracle/sqlfun/threatened_fauna_data.dbf';
SET NEWNAME FOR DATAFILE 6 TO '/home/oracle/sqlfun/example_temp01.dbf';
SET NEWNAME FOR DATAFILE 7 TO '/home/oracle/sqlfun/EXAMPLE_5';
SET NEWNAME FOR DATAFILE 8 TO '/home/oracle/sqlfun/INDEX_DATA_6';

Restore and Recover the database
Now pass this file name to the RMAN run block
RMAN> run {
2> @rename_datafiles.lst
3> SET NEWNAME FOR DATAFILE 1 TO '/home/oracle/sqlfun/system01.dbf';
4> SET NEWNAME FOR DATAFILE 2 TO '/home/oracle/sqlfun/sysaux01.dbf';
5> SET NEWNAME FOR DATAFILE 3 TO '/home/oracle/sqlfun/undotbs01.dbf';
6> SET NEWNAME FOR DATAFILE 4 TO '/home/oracle/sqlfun/users01.dbf';
7> SET NEWNAME FOR DATAFILE 5 TO '/home/oracle/sqlfun/threatened_fauna_data.dbf';
8> SET NEWNAME FOR DATAFILE 6 TO '/home/oracle/sqlfun/example_temp01.dbf';
9> SET NEWNAME FOR DATAFILE 7 TO '/home/oracle/sqlfun/EXAMPLE_5';
10> SET NEWNAME FOR DATAFILE 8 TO '/home/oracle/sqlfun/INDEX_DATA_6';
11> **end-of-file**
12> restore database;
13> switch datafile all;
14> recover database;
15> }

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 04-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=125 device type=DISK

channel ORA_DISK_1: restoring datafile 00001
input datafile copy RECID=3060 STAMP=819884997 file name=/home/oracle/stage/o1_mf_system_7zpgbh79_.dbf
destination for restore of datafile 00001: /home/oracle/sqlfun/system01.dbf
channel ORA_DISK_1: copied datafile copy of datafile 00001
output file name=/home/oracle/sqlfun/system01.dbf RECID=3061 STAMP=819885296
channel ORA_DISK_1: restoring datafile 00002
input datafile copy RECID=3053 STAMP=819884997 file name=/home/oracle/stage/o1_mf_sysaux_7zpgb1hd_.dbf
destination for restore of datafile 00002: /home/oracle/sqlfun/sysaux01.dbf
channel ORA_DISK_1: copied datafile copy of datafile 00002
output file name=/home/oracle/sqlfun/sysaux01.dbf RECID=3062 STAMP=819885313
channel ORA_DISK_1: restoring datafile 00003
input datafile copy RECID=3054 STAMP=819884997 file name=/home/oracle/stage/o1_mf_undotbs1_7zpgck9f_.dbf
destination for restore of datafile 00003: /home/oracle/sqlfun/undotbs01.dbf
channel ORA_DISK_1: copied datafile copy of datafile 00003
output file name=/home/oracle/sqlfun/undotbs01.dbf RECID=3063 STAMP=819885321
channel ORA_DISK_1: restoring datafile 00004
input datafile copy RECID=3057 STAMP=819884997 file name=/home/oracle/stage/o1_mf_users_7zpgcnno_.dbf
destination for restore of datafile 00004: /home/oracle/sqlfun/users01.dbf
channel ORA_DISK_1: copied datafile copy of datafile 00004
output file name=/home/oracle/sqlfun/users01.dbf RECID=3064 STAMP=819885322
channel ORA_DISK_1: restoring datafile 00005
input datafile copy RECID=3056 STAMP=819884997 file name=/home/oracle/stage/o1_mf_threaten_7zpgbyck_.dbf
destination for restore of datafile 00005: /home/oracle/sqlfun/threatened_fauna_data.dbf
channel ORA_DISK_1: copied datafile copy of datafile 00005
output file name=/home/oracle/sqlfun/threatened_fauna_data.dbf RECID=3065 STAMP=819885327
channel ORA_DISK_1: restoring datafile 00006
input datafile copy RECID=3059 STAMP=819884997 file name=/home/oracle/stage/o1_mf_example__7zpgcg0x_.dbf
destination for restore of datafile 00006: /home/oracle/sqlfun/example_temp01.dbf
channel ORA_DISK_1: copied datafile copy of datafile 00006
output file name=/home/oracle/sqlfun/example_temp01.dbf RECID=3066 STAMP=819885331
channel ORA_DISK_1: restoring datafile 00007
input datafile copy RECID=3055 STAMP=819884997 file name=/home/oracle/stage/o1_mf_example_7zgkdp6p_.dbf
destination for restore of datafile 00007: /home/oracle/sqlfun/EXAMPLE_5
channel ORA_DISK_1: copied datafile copy of datafile 00007
output file name=/home/oracle/sqlfun/EXAMPLE_5 RECID=3067 STAMP=819885334
channel ORA_DISK_1: restoring datafile 00008
input datafile copy RECID=3058 STAMP=819884997 file name=/home/oracle/stage/o1_mf_index_da_7zgkcz04_.dbf
destination for restore of datafile 00008: /home/oracle/sqlfun/INDEX_DATA_6
channel ORA_DISK_1: copied datafile copy of datafile 00008
output file name=/home/oracle/sqlfun/INDEX_DATA_6 RECID=3068 STAMP=819885339
Finished restore at 04-JUL-13

datafile 1 switched to datafile copy
input datafile copy RECID=3069 STAMP=819885343 file name=/home/oracle/sqlfun/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=3070 STAMP=819885343 file name=/home/oracle/sqlfun/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=3071 STAMP=819885343 file name=/home/oracle/sqlfun/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3072 STAMP=819885343 file name=/home/oracle/sqlfun/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=3073 STAMP=819885343 file name=/home/oracle/sqlfun/threatened_fauna_data.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=3074 STAMP=819885343 file name=/home/oracle/sqlfun/example_temp01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=3075 STAMP=819885343 file name=/home/oracle/sqlfun/EXAMPLE_5
datafile 8 switched to datafile copy
input datafile copy RECID=3076 STAMP=819885343 file name=/home/oracle/sqlfun/INDEX_DATA_6

Starting recover at 04-JUL-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /home/oracle/sqlfun/system01.dbf
destination for restore of datafile 00002: /home/oracle/sqlfun/sysaux01.dbf
destination for restore of datafile 00007: /home/oracle/sqlfun/EXAMPLE_5
destination for restore of datafile 00008: /home/oracle/sqlfun/INDEX_DATA_6
channel ORA_DISK_1: reading from backup piece /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w65l9_.bkp
channel ORA_DISK_1: piece handle=/home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w65l9_.bkp tag=ORA_OEM_LEVEL_0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00003: /home/oracle/sqlfun/undotbs01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w6zcb_.bkp
channel ORA_DISK_1: piece handle=/home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w6zcb_.bkp tag=ORA_OEM_LEVEL_0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00004: /home/oracle/sqlfun/users01.dbf
destination for restore of datafile 00005: /home/oracle/sqlfun/threatened_fauna_data.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w76jv_.bkp
channel ORA_DISK_1: piece handle=/home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w76jv_.bkp tag=ORA_OEM_LEVEL_0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00006: /home/oracle/sqlfun/example_temp01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w7b0f_.bkp
channel ORA_DISK_1: piece handle=/home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w7b0f_.bkp tag=ORA_OEM_LEVEL_0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

starting media recovery

archived log for thread 1 with sequence 33 is already on disk as file /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_33_8x84ld7x_.arc
archived log for thread 1 with sequence 34 is already on disk as file /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_34_8x8d9y2h_.arc
archived log for thread 1 with sequence 35 is already on disk as file /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_35_8x8db3hp_.arc
archived log for thread 1 with sequence 36 is already on disk as file /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_36_8x8dbgcm_.arc
archived log file name=/u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_33_8x84ld7x_.arc thread=1 sequence=33
archived log file name=/u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_34_8x8d9y2h_.arc thread=1 sequence=34
archived log file name=/u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_35_8x8db3hp_.arc thread=1 sequence=35
archived log file name=/u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_36_8x8dbgcm_.arc thread=1 sequence=36
unable to find archived log
archived log thread=1 sequence=37
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/04/2013 09:55:58
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 37 and starting SCN of 33985482

RMAN>
the error can be ignored as RMAN has applied all the available archive log files and is now trying to apply a non-existent archive log file.
Open the database with RESETLOGS
The RESETLOGS command will fail because we do not have the same directory path which existed on the source for the Online Redo Log files.
So we create a script which will generate the new online redo log file names.
These are the contents of the rename_logfiles.sql file
set head off pages 0 feed off echo off verify off
set lines 200
spool rename_logfiles.lst
select ‘alter database rename file ”’|| member ||”’ ‘||chr(10)|| ‘ TO ”’ || ‘/home/oracle/sqlfun/’ || substr(member,instr(member,’/’,-1)+1) || ”’;’ from v$logfile;
spool off
exit;
$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 4 10:05:17 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @rename_logfiles.sql
alter database rename file  '/u01/app/oracle/oradata/sqlfun/redo03.log'
TO '/home/oracle/sqlfun/redo03.log';

alter database rename file  '/u01/app/oracle/oradata/sqlfun/redo02.log'
TO '/home/oracle/sqlfun/redo02.log';

alter database rename file  '/u01/app/oracle/oradata/sqlfun/redo01.log'
TO '/home/oracle/sqlfun/redo01.log';
Note – we can do all this from the RMAN prompt as well using the RMAN SQL command. But for this example we do it from SQL*PLUS
$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 4 10:50:44 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @rename_logfiles.lst

Database altered.

Database altered.

Database altered.

SQL> alter database open resetlogs;

Database altered.

Minimize database downtime when moving an Oracle DB to a new server

Minimize database downtime when moving an Oracle DB to a new server

My Oracle 10gR2 database is currently on a Windows 2003 32-bit server.  I am planning to migrate to Oracle10g R2 on another Windows 2008 64-bit server for better performance.   What is the best method to do so? My main concern is database downtime.  The total database size is around 200GB.

The first thing to do is to install Oracle 10gR2 64-bit on your new server. Then use the Database Configuration Assistant (DBCA) to precreate a new database on that server. If you want this to go the fastest way possible, use the same exact directory structure for your database files on your new Win 2008 server as you are using on your Win 2003 server. Also, make sure the new database name is the same name as the old database. To minimize downtime, the fastest way is to copy the database datafiles from the old server to the new server. You can use this method because your original platform is Windows and your new platform is Windows. Follow these steps after you have precreated the database on the new server.

1. SHUTDOWN IMMEDIATE the database on the Win 2003 server.
2. SHUTDOWN IMMEDIATE the database on the Win 2008 server.
3. On the Win 2008 server, delete the database datafiles, online redo log files, and the control files.
4. Map a drive from the Win 2008 server to the Win 2003 server.
5. Copy the datafiles, online redo logs, and control files from the Win 2003 server to the Win 2008 server, keeping the file directory placement the same.
6. STARTUP your database on the Win 2008 server.

The step that will take the longest is step 5. But doing a file copy is much faster than other methods.

This procedure works because you are not changing platforms. From Oracle's file's perspective, 32-bit Win 2003 is the same platform as 64-bit Win 2008. We first create a dummy db on the Win 2008 server to get the server set up and configured for the database. We then copy the files over to the new server and since the directory structure and database name are the same, it just starts right up!

How do I copy an Oracle DB from one server to another?

How do I copy an Oracle DB from one server to another?

I want to copy an Oracle database from one server to another. I'm going to save the entire database into a CD and copy the exact database to another server. 


For the same server and operating system do the following. The DB will have the same name as the original.
  1. Shut source database down with the NORMAL or IMMEDIATE option.
  2. Copy all datafiles. Select the name from v$datafile; to get their names.
  3. Copy all online redo logs. Select the member from v$logfile; to get their names.
  4. Copy all control files. Select the name from v$controlfile; to get their names.
  5. Copy the parameter file. Find it in $ORACLE_HOME/dbs in Unix and$ORACLE_HOME/database in Windows. The name is initDBNAME.ora where DBNAMEis database name.
  6. All of the files must be placed in directories that have same name as the source server directories. The names returned from the queries above are fully qualified with directory names.
  7. Create all of the directories specified in the parameter file you just copied. It will be BDUMP, CDUMP, UDUMP. Just recreate all of the directories you find specified in your parameter file.
  8. Edit the parameter file you copied. Set REMOTE_LOGIN_PASSWORDFILE to NONE if it is set SHARED or EXCLUSIVE.
  9. Start the database up.
  10. If you use a true temporary tablespace for sorting, you will have to recreate it. The database will still start, but the first sort that writes to it will bomb. Simple syntax is in the manuals.
  11. To use remote authentication again, run ORAPWD. Here's the syntax:
     
    orapwd
    Usage: orapwd file= password= entries=
    
    where:
    file = name of password file (mand)
    password = password for SYS (mand)
    entries = maximum number of distinct DBAs and OPERs (opt).
    There are no spaces around the equal-to (=) character
  12. Edit the parameter file to set REMOTE_LOGIN_PASSWORDFILE to SHARED or EXCLUSIVE (depending on what it was set to before).
  13. Restart the DB for it to take affect.

If you want to change the DB name or directories, you must run the CREATE CONTROLFILE statement. You'll have to read the manual on that one; it is about 30 steps. Or you can do the following.
  1. Create a database with a new name on the target server. Make it any database name you want with any directories you want.
    Since we will be using Export/Import, you will need to know this information:
    • You must precreate the tablespaces if you are going to change directory names for your data files. Oracle looks for directory names during the IMPORT when it tries to create the TABLESPACES.
    • If it can't find the directories, they will blow up.
    • If you precreate them (anywhere you want), Oracle will know that the tablespaces are there and load them up with data. It won't blow up because it won't attempt to create them.
  2. Export the data from the source database. Set ORACLE_SID to source database name.
    exp system/manager file=full_export_dump.dmp log=full_export_log.out full=y
    
    (We'll take defaults with everything else.)
  3. Copy full_export_dump.dmp to the target server.
  4. Import the data into the target database. Set ORACLE_SID to the target database name.
    imp system/manager file=full_dump.dmp log=full_import_log.out full=y ignore=y
    
    You only need to use ignore=y if your tablespaces are precreated. That means the database will ignore the "already exists" error that will be returned when it finds the tablespace is already there.

Wednesday, February 4, 2015

How to restore an RMAN cold backup on a new server

RMAN

HOW TO RESTORE AN RMAN COLD BACKUP ON A NEW SERVER. ( SAME OS, SAME ORACLE VERSION )


How to restore an RMAN cold backup on a new server. ( same OS, same Oracle version )


You have to restore your database from scratch to a new server with a new Oracle Home, your old database is not available anymore.

I had a similar situation today. A server with hostname X was going to be replaced by another server with the same hostname X.
At the moment I had to restore the database on the new server the old server was not available anymore so the duplicate target database technology was not possible. I had planned downtime of a few hours.


Prior to the shutdown of the old database server I made a cold backup and I installed the same Oracle version on the same OS on the new database server ( requirement ). I had the good luck to have the same filesystem for both datafiles and rman backup pieces ( which were made on disk )



STEP 1 : THE SERVER PARAMETER FILE

I copy passwordfile and server parameter file into the new $ORACLE_HOME/dbs

oracle@myhost ~$ cp spfilePLATINUM.ora $ORACLE_HOME/dbs
oracle@myhost ~$ cp orapwPLATINUM $ORACLE_HOME/dbs


I create an ascii file from the server parameter file and have some adjustements made and validations done ( like user_dump_dest ... )
oracle@myhost dbs$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Wed Jul 1 12:31:15 2009

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> create pfile from spfile;

File created.

SQL> exit
Disconnected

oracle@myhost dbs$ ls -ltr
total 40
-rw-r-----  1 oracle oinstall  8385 Sep 11  1998 init.ora
-rw-r--r--  1 oracle oinstall 12920 May  3  2001 initdw.ora
-rw-r-----  1 oracle oinstall  3584 Jul  1 12:30 spfilePLATINUM.ora
-rw-r-----  1 oracle oinstall  1536 Jul  1 12:30 orapwPLATINUM
-rw-r--r--  1 oracle oinstall  1097 Jul  1 12:31 initPLATINUM.ora

oracle@myhost dbs$ vi initPLATINUM.ora -- ( and I adjust the parameters )


STEP 2 : STARTUP NOMOUNT


Startup nomount since I haven' t a control file yet. 

oracle@myhost dbs $ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Jul 1 12:33:57 2009

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> create spfile from pfile;

File created.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 1895825408 bytes
Fixed Size                  2073632 bytes
Variable Size             436210656 bytes
Database Buffers         1442840576 bytes
Redo Buffers               14700544 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

STEP 3 : RESTORE CONTROL FILES


I connect with RMAN, set the right dbid and restore the controlfiles. 

oracle@myhost dbs$ rman target /

Recovery Manager: Release 10.2.0.3.0 - Production on Wed Jul 1 12:34:56 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: PLATINUM (not mounted)


RMAN> set dbid 706111982;

executing command: SET DBID

RMAN> restore controlfile from '/u01/backup/CT_4bkisua9_1_1';

Starting restore at 01-JUL-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=321 devtype=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=/u01/oradata/PLATINUM/control01.ctl
output filename=/u01/oradata/PLATINUM/control02.ctl
output filename=/u01/oradata/PLATINUM/control03.ctl
Finished restore at 01-JUL-09

STEP 4 : MOUNT THE DATABASE


Once the control files are restored I can mount the database.

RMAN> sql "alter database mount";

sql statement: alter database mount
released channel: ORA_DISK_1

STEP 5 : VERIFICATION AVAILABILITY OF BACKUP


Now I validate whether the backups known in the controlfile are there. remember that I restored the lastest backups to exactly the same location.
I use the rman below RMAN command' s

RMAN > list backup summary; --- which backups should have been made and are logically known in the control file ? 
RMAN > list backup TAG='xyz' --- Is this the backup i would like to restore ?
RMAN > crosscheck backup TAG='xyz' --- is this backup available ?


RMAN > list backup summary;
output not posted
RMAN > list backup TAG='TAG20090630T154910'; 
List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

137     Full    115.50M    DISK        00:00:48     30-JUN-09
        BP Key: 137   Status: AVAILABLE  Compressed: YES  Tag: TAG20090630T154910
        Piece Name: /u01/backup/db_49kisu3m_1_1
  List of Datafiles in backup set 137
  File LV Type Ckp SCN    Ckp Time  Name
  ---- — ---- ---------- --------- ----
  1       Full 2108954    30-JUN-09 /u01/oradata/PLATINUM/system01.dbf
  2       Full 2108954    30-JUN-09 /u01/oradata/PLATINUM/undotbs01.dbf
  3       Full 2108954    30-JUN-09 /u01/oradata/PLATINUM/sysaux01.dbf
  4       Full 2108954    30-JUN-09 /u01/oradata/PLATINUM/users01.dbf
  5       Full 2108954    30-JUN-09 /u01/oradata/PLATINUM/silver.dbf
  6       Full 2108954    30-JUN-09 /u01/oradata/PLATINUM/gold.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

138     Full    1.06M      DISK        00:00:01     30-JUN-09        
BP Key: 138   Status: AVAILABLE  Compressed: YES 
Tag: TAG20090630T154910         Piece Name: /u01/backup/db_4akisu5e_1_1  
Control File Included: Ckp SCN: 2108954      Ckp time: 30-JUN-09  
SPFILE Included: Modification time: 30-JUN-09
RMAN > crosscheck backup TAG='TAG20090630T154910';
output not posted

STEP 6 : RESTORE THE BACKUP


I restore the lastest backup. Since it concerns a cold backup I do not have to recover it, it is consistent.

RMAN> restore database from TAG='TAG20090630T154910' 
Starting restore at 01-JUL-09 
using channel ORA_DISK_1 channel ORA_DISK_1:
starting datafile backupset restore channel ORA_DISK_1:
specifying datafile(s) to restore from backup set 
restoring datafile 00001 to /u01/oradata/PLATINUM/system01.dbf 
restoring datafile 00002 to /u01/oradata/PLATINUM/undotbs01.dbf 
restoring datafile 00003 to /u01/oradata/PLATINUM/sysaux01.dbf 
restoring datafile 00004 to /u01/oradata/PLATINUM/users01.dbf 
restoring datafile 00005 to /u01/oradata/PLATINUM/silver.dbf 
restoring datafile 00006 to /u01/oradata/PLATINUM/gold.dbf 
channel ORA_DISK_1: reading from backup piece /u01/backup/db_49kisu3m_1_1 channel
ORA_DISK_1: restored backup piece 1 piece handle=/u01/backup/db_49kisu3m_1_1 tag=TAG20090630T154910 
channel ORA_DISK_1: restore complete, elapsed time: 00:00:56 
Finished restore at 01-JUL-09

STEP 7 : OPEN THE DATABSE WITH RESETLOGS


RMAN> sql "alter database open resetlogs";
sql statement: alter database open resetlogs

STEP 8 :  MANAGE LISTENER.ORA, TNSNAMES.ORA AND PASSWORDFILE


I moved the tnsnames.ora and listener into the new $ORACLE_HOME/network/admin


oracle@myhost ~ $ cp tnsnames.ora $ORACLE_HOME/network/admin
oracle@myhost ~ $ cp listener.ora $ORACLE_HOME/network/admin
oracle@myhost ~ $ cp orapwPLATINUM $ORACLE_HOME/dbs

Sunday, June 8, 2014

Script to find redo generated by current sessions

#################################################

Redo generated by current sessions
#################################################

select v$session.sid, username, value redo_size
from v$sesstat, v$statname, v$session
where v$sesstat.STATISTIC# = v$statname.STATISTIC#
and v$session.sid = v$sesstat.sid
and name = ‘redo size’
and value > 0
and username is not null
order by value
/

To check INACTIVE sessions with HIGH DISK IO

To check INACTIVE sessions with HIGH DISK IO
=============================================
select p.spid,s.username, s.sid,s.status,t.disk_reads, s.last_call_et/3600 last_call_et_Hrs,
s.action,s.program,s.machine cli_mach,s.process cli_process,lpad(t.sql_text,30) “Last SQL”
from gv$session s, gv$sqlarea t,v$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
t.disk_reads > 5000
and s.status=’INACTIVE’
and s.process=’1234′
order by S.PROGRAM;
=================================================================

Friday, September 6, 2013

Oracle Database Migration Check list

For the most current information, please refer to: 
(Doc ID 1152016.1) Master Note For Oracle Database Upgrades and Migrations


Applies to:

Oracle Server - Enterprise Edition - Version 8.0.6.0 and later 
Oracle Server - Standard Edition - Version 8.0.6.0 and later 
Information in this document applies to any platform. 

Purpose

This Master Note is intended to provide an index and references to the most frequently used My Oracle Support Notes with respect to Oracle Database Upgrade and Migration. This Master Note is subdivided into categories to allow for easy access and reference to notes that are applicable to your area of interest within Upgrade and Migration. This includes the following categories:
General 
How to 
Diagnostic Tools 
Known Issues 
    Preupgrade Tool Issues 
    During Upgrade Issues 
    Post Upgrade Issues 
    DBUA Specific Issues

Scope

This note serves as a guide through the various stages of upgrading/migrating a database.
It is applicable to upgrade/migration done via DBUA or the manual method.
It assumes you have already Installed Oracle software.
The intended audience is from junior DBA's to senior DBA's
This will cover the following versions of these products:
Oracle Server - Version: 8.0.6.x though 11.2.0.x

Details

Ask Questions, Get Help, And Share Your Experiences With This Article

Would you like to explore this topic further with other Oracle Customers, Oracle Employees, and Industry Experts? 
Click here to join the discussion where you can ask questions, get help from others, and share your experiences with this specific article. 

Discover discussions about other articles and helpful subjects by clicking here to access the main My Oracle Support Community page for Database Install/Upgrade.

General

Note 419550.1 Different Upgrade Methods For Upgrading Your Database 
Note 551141.1 Database Server Upgrade/Downgrade Compatibility Matrix 
Note 730365.1 Oracle Database Upgrade Path Reference List 
Note 455744.1 Best Practices to Minimize Downtime During Upgrade 
Note 739485.1 How to estimate the time required to upgrade a database ? 
Note 757245.1 Can you Upgrade RDBMS and Convert From 32-bit to 64-bit Binaries Directly on Linux or Windows based Intel Platforms Using the Database Upgrade Assistant (DBUA) 
Note 1320966.1 Things to Consider Before Upgrading to 11.2.0.2 to Avoid Poor Performance or Wrong Results 
Note 1392633.1 Things to Consider Before Upgrading to 11.2.0.3 to Avoid Poor Performance or Wrong Results 
Note 785351.1 Oracle 11gR2 Upgrade Companion 
Note 601807.1 Oracle 11gR1 Upgrade Companion 
Note 466181.1 10g Upgrade Companion

How To

Note 251.1 Database Upgrade Planner from 10.2 to 11.2 
Note 264.1 Database Upgrade Planner from 9.2 to 11.2 
Note 732897.1 How to Log Good Service Requests for Database Upgrade/Migration Issues 
Note 837570.1 Complete Checklist for Manual Upgrades to 11gR2 
Note 870814.1 Complete checklist to upgrade the database to 11gR2 using DBUA 
Note.1276368.1 Complete checklist for out-of-place manual upgrade from 11.2.0.1 to 11.2.0.2 
Note 429825.1 Complete Checklist for Manual Upgrades to 11gR1 
Note 556477.1 Complete Checklist for Upgrades to 11gR1 using DBUA 
Note 316889.1 Complete Checklist for Manual Upgrades to 10gR2 
Note 263809.1 Complete checklist for manual upgrades to 10gR1 (10.1.0.x) 
Note 159657.1 Complete Upgrade Checklist for Manual Upgrades from 8.X / 9.0.1 to Oracle9iR2 (9.2.0) 
Note 117048.1 How to Upgrade from Standard to Enterprise Edition 
Note 139642.1 Converting An Enterprise Edition Database To Standard Edition 
Note 1437019.1 How To Prevent Apex From Being Installed During DB Upgrade

Diagnostic Tools

Note 884522.1 How to Download and Run Oracle's Database Pre-Upgrade Utility 
Note 556610.1 Script to Collect DB Upgrade/Migrate Diagnostic Information (dbupgdiag.sql) 
Note 212588.1 How To Investigate/Diagnose Hanging Issues When Upgrading or Migrating (includes DBMA & DBUA) 
Note 577775.1 Dbua or Migration Is Hanging What to do? 
Note 428118.1 How to enable Java code tracing for DBUA, DBCA and NETCA?

Known Issues

Preupgrade Tool Issues

Note 437371.1 ERROR:" WARNING: --> Database contains stale optimizer statistics.Refer to the 10g Upgrade Guide for instructions to update" 
Note 407031.1 ORA-01403 no data found while running utlu102i.sql/utlu102x.sql on 8174 database 
Note 271733.1 ORA-600 [17069] During Upgrade Using Database Upgrade Assistant, Utlu101i.sql or Utlu102i.sql 
Note 549276.1 Utlu102i.sql Shows "WARNING: The database has not been patched to release 10.1.0.4.2" Showed 
Note 370825.1 UTLU102I.SQL Reports That Already-Installed Components Need To Be Installed 
Note 797750.1 "WARNING: --> Database contains schemas with objects dependent on network packages" When Running utlu111i.sql 
Note 803774.1 The Utlu111i.Sql Pre-Upgrade Script Reports Stale Sys Statistics 
Note 1473478.1 Pre-upgrade script utlu112i.sql errors with ORA-06550 and ORA-00942 
Note 843899.1 DB Upgrade Throws ORA-25153: Temporary Tablespace Is Empty

During Upgrade Issues

Note 412271.1 ORA-600 [22635] and ORA-600 [KOKEIIX1] Reported While Upgrading Or Patching Databases To 10.2.0.3 
Note 579523.1 ORA-600 [22635], ORA-600 [KOKEIIX1], ORA-7445 [KOPESIZ] and OCI-21500 [KOXSIHREAD1] Reported While Upgrading To 11.1.0.6 Or 11.1.0.7 
Note 1077748.1 Upgrading to 11.1.0.7 Crashes with ORA-600, arguments: [kokeeiix3], [3] 
Note 1081627.1 Upgrade to 11.1.0.7 Cancels with ORA-07445. ORA-600[QCTOSTIIX1] Showed at the Alert file. 
Note 761711.1 Upgrade From 10.2.0.3 To 11.1.0.7 Using DBUA Throws ORA-600 [kksfbc-reparse-infinite-loop] Error During Update to SYS.AQ_SRVNTFN_TABLE 
Note 1067072.1 ORA-600 [kzdugt], [2147483629] While Upgrading From 11gR1 To 11gR2 
Note 1077748.1 Upgrading to 11.1.0.7 or 11.2.0.1 Crashes with ORA-600, arguments: [kokeeiix3], [3] or ORA-07445: exception encountered: core dump [qmxdGetMatchingChildren_int] 
Note 464716.1 ORA-1722 when running Oracle 11g DBUA utility 
Note 730057.1 Upgrading to 11g Fails with ORA-01722 invalid number 
Note 859576.1 Upgrading to 11gR1 Stops With ORA-01722 invalid number 
Note 744693.1 ORA-00001 For SYS.DIANA_VERSION$ During RDBMS Upgrade From 11.1.0.6 To 11.1.0.7 
Note 845768.1 ORA-19905 LOG_ARCHIVE_FORMAT During Upgrade 
Note 293658.1 10.1 or 10.2 Patchset Install Getting ORA-29558 JAccelerator (NCOMP) And ORA-06512 
Note 557242.1 Upgrade Gives Ora-29558 Error Despite of JAccelerator Has Been Installed 
Note 472959.1 "Ora-20000 : Insufficient privileges to analyze an object in Dictionary" During Catupgrd.Sql 
Note 734563.1 Upgrading To 10.2.0.4 Manually Or Using DBUA Fails With ORA-01437 
Note 470667.1 ORA-1422 During Upgrade To 10.2 or 11.1 
Note 554983.1 Error During Migration To 11gR1: Database Is Using An Old Timezone File Version 
Note 788087.1 When Running Catupgrd.Sql, Exits With ORA-00904/ORA-00942 
Note 802694.1 Catupgrd.Sql Hang While Running dbms_metadata_hack.load_xsd('kusmv.xsd') 
Note 1070951.1 11.1.0.6.0->11.2.0.1.0 UPGRADE FAILS WITH ORA-22371 REFERENCING XDB.XDB$PROPERTY_T, VERSION 1 
Note 1104643.1 Upgrading Database to 11.2 Fails with ORA-01422 
Note 1100828.1 11gr2 Upgrade, Re-Running catupgrd.sql Causes Ora-00001 Errors 
Note 1051368.1 Startup Upgrade Gives ORA-202 ORA-17505 ORA-15061 ORA-600 [kccgtt_1] 
Note 1091252.1 ORA-31114 "XDB configuration has been deleted or is corrupted" during upgrade to 11.2 
Note 1148285.1 "ORA-01166: File number 101 is larger than MAXDATAFILES (100)" While Upgrading To 11.1.0.7 Or 11.2 
Note 1326522.1 ORA-7445 [qmxarFindPartition] during database upgrade to 11.2 
Note 1329606.1 10.2 Upgrade to 11.2 Hangs While Running Catupgrd.sql 
Note 1425763.1 During A Database Upgrade To 11.2, Gathering Dictionary Statistics Takes Too Long (catupgrd.sql, cmpupend.sql) 
Note 1465852.1 ORA-00942 reports during upgrade to 11.2.0.3 using manual or DBUA 
Note 1466082.1 ORA-02095: Specified Initialization Parameter Cannot Be Modified 
Note 1486277.1 SELECT TO_NUMBER('MUST_PATCH_TIMEZONE_FILE_VERSION_ON_NEW_ORACLE_HOME')

Post Upgrade Issues

Note 438210.1 Synonyms Become Invalid Since Upgrading To 10g 
Note 456845.1 UTLU102S.SQL May Show Different Results Than Select From DBA_REGISTRY 
Note 753041.1 How To Diagnose Components With NON VALID Status In DBA_REGISTRY After an Upgrade
Note 578841.1 How To Find What Objects Are Keeping Catalog And Catproc In Dba_Registry Invalid 
Note 443706.1 After Migrate From 9.2.0.7 To 10.2.0.3 We Get Ora-04065 On Plitblm 
Note 730136.1 OCI-21500 When Running UTLRP After A Successful Upgrade. 
Note 782735.1 Oracle Database Server Component Invalid After Upgrade To 10.2.0.4, 11.1.0.6 Or 11.1.0.7
Note 978040.1 ORA-04045 ORA-04064 ORA-06508 ORA-06512 ERRORS RUNNING utlu111s.sql DURING UPGRADE TO FROM 9.2.0 TO 11.1.0 
Note 1313429.1 Is it required to re-install the UTL_* packages after an upgrade to 11.2?

DBUA Specific Issues

Note 315184.1 Database Upgrade Assistant Hangs On Collecting Server Information 
Note 567037.1 DBUA hangs at 82% for More than an Hour When Upgrading APPS DB to 10GR2 
Note 339887.1 Failed Upgrade ''Dbua Thinks This Is A Rerun Operation'' ORA-01507 
Note 603015.1 DBUA Fails with ORA-32004 and "Dbua Thinks This Is A Rerun Operation" 
Note 729909.1 Upgrading to 11.1.0 and DBUA reports ORA-4023 On SYS.STANDARD 
Note 789779.1 DBUA Error ORA-04031 unable to allocate 4120 bytes of shared memory, ORA-01034 ORACLE not available, ORA-00600 internal error code, arguments [504] 
Note 271733.1 ORA-600 [17069] During Upgrade Using Database Upgrade Assistant, Utlu101i.sql or Utlu102i.sql 
Note 308377.1 "ORA-01031 Insufficient Privileges" During An Upgrade Using DBUA On Unix/Linux 
Note.386855.1 'startup migrate' failed with ORA-64 while upgrading to 10.2.0.2 with DBUA 
Note 816457.1 DBUA unable to connect to the database for upgrade 
Note 431437.1 10g DBUA Failed To Bring Up 9i Database. ORA-00119 ORA-00132 ORA-01078 
Note 604248.1 DBUA Fails with ORA-0119 ORA-0132 ORA-1078 Upgrading to 10gR2 
Note 391283.1 ORA-27054 NFS error while using DBUA to upgrade to 10gR2 
Note 444148.1 Upgrading to 10gr2 Using Dbua Stops With An Alarm Sign At Step1 
Note 737400.1 Ora-01408 Error Upgrading from 9i to 11g using Dbua 
Note 559075.1 Dbua Won't Find Init<SID>.Ora During Upgrade Although It Is At The Right Location 
Note 1321814.1 Underscore (Hidden) Parameters will not be retained after upgrade using DBUA 
Note 1078388.1 Upgrdade to 11.2 via DBUA fails on ASMCA error on a database with no RAC or ASM 
Note 980693.1 11gR2 DBUA States "The CEP File does not provide the version directive" 
Note 1066828.1 11GR2 DBUA ORA-06550 PLS-00201 IDENTIFIER SYS.DBMS_JAVA MUST BE DECLARED 
Note 1067422.1 DBUA ERROR: DOES NOT PROVIDE VERSION DIRECTIVE 
Note 1066116.1 DBUA RAISES ORA-942 WHILE UPGRADING EXPRESSION FILTER COMPONENT 
Note 1304849.1 DBUA: Database Is Missing From List Of Candidate Databases To Be Upgraded 
Note 1364808.1 DBUA fails with error "Database is not open, restart database in open mode and try again" when upgrading from 10.2 to 11.2 
Note 1466447.1 Database Upgrade Assistant (DBUA) Displays A Dialog Box When There Are Special Characters In The Pfile 
Note 1477555.1 DBUA FAILS WITH "FOR INPUT STRING: 8,192" ERROR 
Note 1453545.1 Database Upgrade using DBUA failed with invalid specification for system parameter LOCAL_LISTENER 
Note 1427179.1 11.2.0.3 DBUA Hangs While Specifying ASM Disk To FRA

Using My Oracle Support Effectively

Note 747242.5 My Oracle Support Configuration Management FAQ 
Note 868955.1 My Oracle Support Health Checks Catalog 
Note 166650.1 Working Effectively With Global Customer Support 
Note 199389.1 Escalating Service Requests with Oracle Support Services

Generic Links

Note 854428.1 Patch Set Updates for Oracle Products 
Note 1061295.1 Patch Set Updates - One-off Patch Conflict Resolution 
Note 268895.1 Oracle Database Server Patchset Information, Versions: 8.1. 7 to 11.2.0 
Note 161549.1 Oracle Database Server and Networking Patches for Microsoft Platforms 
Note 161818.1 Oracle Database (RDBMS) Releases Support Status Summary

References

NOTE:1151427.1 - Master Note For Oracle Database Downgrade 
NOTE:1351051.2 - Information Center: Install and Configure Database Server/Client Installations 
NOTE:1351112.2 - Information Center: Upgrading and Migration Oracle Database