Upload
huma-zahra
View
35
Download
0
Embed Size (px)
DESCRIPTION
Cloning an oracle Database on different OMF architecture, step by step guide.
Citation preview
STEPS TO CLONE A DATBASE HAVING DIFFERENT DIRECTORY STRUCTURE
STEPS TO CLONE A DATBASE HAVING DIFFERENT DIRECTORY STRUCTUREGoal:
To restore RMAN backup(s) on a different database system with a different backup directory structure(s) and a different database directory structure(s).
Initials:
1. Database should be installed with the same version as that of the target database system.
2. Both database systems have to be on archive log mode.
3. The flash recovery area do not needs to be same necessarily.
4. It is preferable to have same size of recovery area on both target and clone servers.
5. It is not a necessity to have same oracle system id (SID) for both systems.
6. The directory structure can be different i.e.
a. control files storage location.b. datafiles storage locations.c. dumpfiles storage location.7. It is not a necessity to have the same storage options, it can be any:
a. Oracle Clustered File System.
b. Automatic Storage Management.
c. Raw Devices.
d. Network File System.
8. Both database systems must have remote login enabled.9. Both target and clone database machines should be using password files for access control.
10. Both machines should have same Operating system.
Note: Kernel versions can be different but than additional checks and upgrades are to be applied, for a successful duplicate operation.
Assumptions:1. Consistent backups are present at the target database site.
2. The location of backups for the target machine is known and confirmed.
3. The location of database file for the target machine is known and confirmed.
4. The location where the backups will be copied on the clone system is known.
5. The location where database files will be restored on the clone system is known.
Pre Requisites:1. Create a pfile from spfile on clone database system. Specify paths to represent change in directory structure(s) if necessary as under :
a. DB_FILE_NAME_CONVERT
b. LOG_FILE_NAME_CONVERT
c. REMOTE_LOGIN_PASSWORDFILE
d. DB_RECOVERY_FILE_DESTe. DB_RECOVERY_FILE_DEST_SIZE2. After making these changes restart the database and create spfile from pfile to make them effective.
3. Register the clone database with catalog database system preferably in case of a different Oracle System Identification.
4. Copy Database backups from target machine to clone, taking one full backup followed by the incremental(s) as per the latest date.5. Also Copy autobackup folder containing new control file and spfile backup(s) w.r.t the backups copied in step 4.
Steps to achieve the goal:
1. Invoke RMAN on the clone machine after setting the Oracle environment variables and start the database in nomount mode.
2. Restore the control file from the latest backup piece.
3. Mount the database.
4. Now catalog the backup pieces that were shipped from the target database machine.
5. Get to know the last sequence available in the archivelog backup i.e. SCN number. This will help in recovering the clone database till the latest archivelog.6. Rename the Redolog files in clone machine, so that they can be created in new locations; when opened; the database is opened in resetlogs.
7. Turn the datafile(s) and tablespace(s) offline drop if theyre not required to be cloned, or theyre not been backed up at the target disposal.
8. Turn off block change tracking file system option for the clone database, if you have it enabled at the target machine. You dont need to have block change tracking for the clone database system.
9. Create new file names script for all the backed up data files and give them the (OMF) location where they are to reside in the auxiliary system.10. Now restore the datafiles to new locations and recover. Since we are recovering the database till the archivelog latest sequence; the sequence number in the SET UNTIL SEQUENCE clause should be explicitly specified.
Practical:Note : All operations to be perfromed From Auxiliary:
Do systems copy for the backups and the autobackups.
[oracle@sroravm /]$ scp r recoveryarea/ORAPROD/backupset/ srrecovery.secp.gov.pk: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/[oracle@sroravm /]$ scp r recoveryarea/ORAPROD/autobackup/ srrecovery.secp.gov.pk: /u01/app/oracle/flash_recovery_area/ORAPROD/autobackup/
Remove previous backups from backupset folder and also autobackup folder of recover platform.
Also crosscheck backup and archivelog all and delete obsolete from target platform.Crosscheck backup;Crosscheck archivelog all;
Delete obsolete;
RMAN> connect target /
connected to target database: oraprod (not mounted)
RMAN> restore controlfile from '/u01/app/oracle/flash_recovery_area/ORAPROD/autobackup/2010_10_06/o1_mf_s_731642380_6bq4fxfl_.bkp';
Starting restore at 06-OCT-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:17
output filename=/u01/app/oracle/oradata/oraprod/control01.ctl
output filename=/u01/app/oracle/oradata/oraprod/control02.ctl
output filename=/u01/app/oracle/oradata/oraprod/control03.ctl
Finished restore at 06-OCT-10
RMAN> alter database mount
2> ;
database mounted
released channel: ORA_DISK_1
RMAN> catalog backuppiece '/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo22_.bkp';
Starting implicit crosscheck backup at 06-OCT-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=157 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=153 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=152 devtype=DISK
Crosschecked 67 objects
Finished implicit crosscheck backup at 06-OCT-10
Starting implicit crosscheck copy at 06-OCT-10
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
Finished implicit crosscheck copy at 06-OCT-10
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_02/o1_mf_annnn_FRIDAE_BKP_ORAPROD_1_6bdprwpo_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_02/o1_mf_annnn_FRIDAE_BKP_ORAPROD_1_6bdprwr5_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_02/o1_mf_nnnd0_FRIDAE_BKP_ORAPROD_1_6bdlvw3w_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_02/o1_mf_nnnd0_FRIDAE_BKP_ORAPROD_1_6bdlvw2w_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_02/o1_mf_annnn_FRIDAE_BKP_ORAPROD_1_6bdprws3_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_02/o1_mf_nnnd0_FRIDAE_BKP_ORAPROD_1_6bdlvw4d_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_02/o1_mf_nnnd0_FRIDAE_BKP_ORAPROD_1_6bdlvw3d_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_02/o1_mf_annnn_FRIDAE_BKP_ORAPROD_1_6bdprwo6_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_01/o1_mf_nnnd1_THURSDAE_BKP_ORAPR_1_6b9yfl2s_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_01/o1_mf_nnnd1_THURSDAE_BKP_ORAPR_1_6b9yfl33_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_01/o1_mf_nnnd1_THURSDAE_BKP_ORAPR_1_6b9yfl5p_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_01/o1_mf_annnn_THURSDAE_BKP_ORAPR_1_6b9yg31o_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_01/o1_mf_annnn_THURSDAE_BKP_ORAPR_1_6b9yg3dg_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_01/o1_mf_annnn_THURSDAE_BKP_ORAPR_1_6b9yg3bq_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_01/o1_mf_nnnd1_THURSDAE_BKP_ORAPR_1_6b9yfl57_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_01/o1_mf_annnn_THURSDAE_BKP_ORAPR_1_6b9yg33d_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_30/o1_mf_nnnd0_WEDNESDAE_BKP_ORAP_0_6b7b13s1_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_30/o1_mf_annnn_WEDNESDAE_BKP_ORAP_0_6b7fv3c6_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_30/o1_mf_annnn_WEDNESDAE_BKP_ORAP_0_6b7fv38o_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_30/o1_mf_nnnd0_WEDNESDAE_BKP_ORAP_0_6b7b13jh_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_30/o1_mf_nnnd0_WEDNESDAE_BKP_ORAP_0_6b7b120x_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_30/o1_mf_annnn_WEDNESDAE_BKP_ORAP_0_6b7fv39z_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_30/o1_mf_nnnd0_WEDNESDAE_BKP_ORAP_0_6b7b11xk_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_29/o1_mf_annnn_TUESDAE_BKP_ORAPRO_0_6b4or3bn_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_29/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_0_6b4oo9vg_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_29/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_0_6b4oo9v2_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_29/o1_mf_annnn_TUESDAE_BKP_ORAPRO_0_6b4or3jg_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_29/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_0_6b4oo9w7_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_29/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_0_6b4oo9x7_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_29/o1_mf_annnn_TUESDAE_BKP_ORAPRO_0_6b4or398_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrcs_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_nnnd1_MONDAE_BKP_ORAPROD_1_6bnhy3pc_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_nnnd1_MONDAE_BKP_ORAPROD_1_6bnhy3o7_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_nnnd1_MONDAE_BKP_ORAPROD_1_6bnhy3qc_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrqs_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrkx_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_nnnd1_MONDAE_BKP_ORAPROD_1_6bnhy3ot_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrfb_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_04/o1_mf_nnnd0_SUNDAE_BKP_ORAPROD_1_6bkvklw0_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_04/o1_mf_annnn_SUNDAE_BKP_ORAPROD_1_6bkzcdc3_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_04/o1_mf_nnnd0_SUNDAE_BKP_ORAPROD_1_6bkvklxj_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_04/o1_mf_annnn_SUNDAE_BKP_ORAPROD_1_6bkzcdb1_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_04/o1_mf_annnn_SUNDAE_BKP_ORAPROD_1_6bkzcdd6_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_04/o1_mf_nnnd0_SUNDAE_BKP_ORAPROD_1_6bkvkm46_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_04/o1_mf_nnnd0_SUNDAE_BKP_ORAPROD_1_6bkvklm7_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_04/o1_mf_annnn_SUNDAE_BKP_ORAPROD_1_6bkzcd8n_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_28/o1_mf_annnn_TEST_BKP_ORAPROD_092_6b44bddh_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_28/o1_mf_nnnd0_TEST_BKP_ORAPROD_092_6b40kxo7_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_28/o1_mf_nnnd0_TEST_BKP_ORAPROD_092_6b40kxnl_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_28/o1_mf_nnnd0_TEST_BKP_ORAPROD_092_6b40kxn8_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_09_28/o1_mf_nnnd0_TEST_BKP_ORAPROD_092_6b40kxnv_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_03/o1_mf_annnn_SATURDAE_BKP_ORAPR_1_6bh768gv_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_03/o1_mf_annnn_SATURDAE_BKP_ORAPR_1_6bh768s0_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_03/o1_mf_annnn_SATURDAE_BKP_ORAPR_1_6bh768k4_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_03/o1_mf_annnn_SATURDAE_BKP_ORAPR_1_6bh768yl_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_03/o1_mf_nnnd1_SATURDAE_BKP_ORAPR_1_6bh75ss2_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_03/o1_mf_nnnd1_SATURDAE_BKP_ORAPR_1_6bh75st5_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_03/o1_mf_nnnd1_SATURDAE_BKP_ORAPR_1_6bh75sr2_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_03/o1_mf_nnnd1_SATURDAE_BKP_ORAPR_1_6bh75ssq_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo2x_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_annnn_TUESDAE_BKP_ORAPRO_1_6bq4gbf0_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo40_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_annnn_TUESDAE_BKP_ORAPRO_1_6bq4gb8j_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_annnn_TUESDAE_BKP_ORAPRO_1_6bq4gbbj_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_annnn_TUESDAE_BKP_ORAPRO_1_6bq4gbcy_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo3l_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo22_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/autobackup/2010_10_05/o1_mf_s_731555871_6bnhyj4t_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/autobackup/2010_10_05/o1_mf_s_731555910_6bnhzq4h_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/autobackup/2010_10_06/o1_mf_s_731642380_6bq4fxfl_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/autobackup/2010_10_06/o1_mf_s_731642420_6bq4h4wb_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/autobackup/2010_10_04/o1_mf_s_731473357_6bkzcxoy_.bkp
File Name: /u01/app/oracle/flash_recovery_area/ORAPROD/autobackup/2010_10_04/o1_mf_s_731508638_6bm1tgnj_.bkp
cataloged backuppiece
backup piece handle=/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo22_.bkp recid=664 stamp=731675465
RMAN> catalog backuppiece '/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo2x_.bkp';
cataloged backuppiece
backup piece handle=/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo2x_.bkp recid=665 stamp=731675577
RMAN> catalog backuppiece '/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo3l_.bkp';
cataloged backuppiece
backup piece handle=/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo3l_.bkp recid=666 stamp=731675622
RMAN> catalog backuppiece '/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo40_.bkp';
cataloged backuppiece
backup piece handle=/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo40_.bkp recid=667 stamp=731675647
RMAN> list backup of archivelog all;
.........
.........
.........
----------- ------------ --------------- ---------- ---
DISK 00:00:13 04-OCT-10 YES SUNDAE_BKP_ORAPROD_100410020002
List of Backup Pieces for backup set 572 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
572 1 EXPIRED /recoveryarea/ORAPROD/backupset/2010_10_04/o1_mf_annnn_SUNDAE_BKP_ORAPROD_1_6bkzcd8n_.bkp
Backup Set Copy #2 of backup set 572
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:13 06-OCT-10 YES SUNDAE_BKP_ORAPROD_100410020002
List of Backup Pieces for backup set 572 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
636 1 AVAILABLE /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_04/o1_mf_annnn_SUNDAE_BKP_ORAPROD_1_6bkzcd8n_.bkp
BS Key Size
------- ----------
573 29.01M
List of Archived Logs in backup set 573
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1564 5970725595780 03-OCT-10 5970725621687 03-OCT-10
1 1565 5970725621687 03-OCT-10 5970725934504 03-OCT-10
Backup Set Copy #1 of backup set 573
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:13 04-OCT-10 YES SUNDAE_BKP_ORAPROD_100410020002
List of Backup Pieces for backup set 573 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
573 1 EXPIRED /recoveryarea/ORAPROD/backupset/2010_10_04/o1_mf_annnn_SUNDAE_BKP_ORAPROD_1_6bkzcdb1_.bkp
Backup Set Copy #2 of backup set 573
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:13 06-OCT-10 YES SUNDAE_BKP_ORAPROD_100410020002
List of Backup Pieces for backup set 573 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
632 1 AVAILABLE /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_04/o1_mf_annnn_SUNDAE_BKP_ORAPROD_1_6bkzcdb1_.bkp
BS Key Size
------- ----------
574 23.43M
List of Archived Logs in backup set 574
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1566 5970725934504 03-OCT-10 5970725963575 04-OCT-10
1 1567 5970725963575 04-OCT-10 5970725996046 04-OCT-10
Backup Set Copy #1 of backup set 574
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:15 04-OCT-10 YES SUNDAE_BKP_ORAPROD_100410020002
List of Backup Pieces for backup set 574 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
574 1 EXPIRED /recoveryarea/ORAPROD/backupset/2010_10_04/o1_mf_annnn_SUNDAE_BKP_ORAPROD_1_6bkzcdc3_.bkp
Backup Set Copy #2 of backup set 574
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:15 06-OCT-10 YES SUNDAE_BKP_ORAPROD_100410020002
List of Backup Pieces for backup set 574 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
630 1 AVAILABLE /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_04/o1_mf_annnn_SUNDAE_BKP_ORAPROD_1_6bkzcdc3_.bkp
BS Key Size
------- ----------
582 32.13M
List of Archived Logs in backup set 582
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1578 5970749632077 04-OCT-10 5970749649966 04-OCT-10
1 1579 5970749649966 04-OCT-10 5970749686963 05-OCT-10
1 1580 5970749686963 05-OCT-10 5970749699577 05-OCT-10
Backup Set Copy #1 of backup set 582
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:07 05-OCT-10 YES MONDAE_BKP_ORAPROD_100510020004
List of Backup Pieces for backup set 582 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
582 1 EXPIRED /recoveryarea/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrqs_.bkp
Backup Set Copy #2 of backup set 582
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:07 06-OCT-10 YES MONDAE_BKP_ORAPROD_100510020004
List of Backup Pieces for backup set 582 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
625 1 AVAILABLE /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrqs_.bkp
BS Key Size
------- ----------
583 43.18M
List of Archived Logs in backup set 583
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1575 5970745001672 04-OCT-10 5970749568598 04-OCT-10
1 1576 5970749568598 04-OCT-10 5970749602081 04-OCT-10
1 1577 5970749602081 04-OCT-10 5970749632077 04-OCT-10
Backup Set Copy #1 of backup set 583
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:10 05-OCT-10 YES MONDAE_BKP_ORAPROD_100510020004
List of Backup Pieces for backup set 583 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
583 1 EXPIRED /recoveryarea/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrcs_.bkp
Backup Set Copy #2 of backup set 583
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:10 06-OCT-10 YES MONDAE_BKP_ORAPROD_100510020004
List of Backup Pieces for backup set 583 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
621 1 AVAILABLE /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrcs_.bkp
BS Key Size
------- ----------
584 49.67M
List of Archived Logs in backup set 584
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1569 5970725997191 04-OCT-10 5970726025025 04-OCT-10
1 1570 5970726025025 04-OCT-10 5970741300358 04-OCT-10
1 1571 5970741300358 04-OCT-10 5970744956847 04-OCT-10
Backup Set Copy #1 of backup set 584
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:23 05-OCT-10 YES MONDAE_BKP_ORAPROD_100510020004
List of Backup Pieces for backup set 584 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
584 1 EXPIRED /recoveryarea/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrfb_.bkp
Backup Set Copy #2 of backup set 584
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:23 06-OCT-10 YES MONDAE_BKP_ORAPROD_100510020004
List of Backup Pieces for backup set 584 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
628 1 AVAILABLE /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrfb_.bkp
BS Key Size
------- ----------
585 40.94M
List of Archived Logs in backup set 585
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1572 5970744956847 04-OCT-10 5970744966272 04-OCT-10
1 1573 5970744966272 04-OCT-10 5970744988515 04-OCT-10
1 1574 5970744988515 04-OCT-10 5970745001672 04-OCT-10
Backup Set Copy #1 of backup set 585
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:29 05-OCT-10 YES MONDAE_BKP_ORAPROD_100510020004
List of Backup Pieces for backup set 585 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
585 1 EXPIRED /recoveryarea/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrkx_.bkp
Backup Set Copy #2 of backup set 585
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:29 06-OCT-10 YES MONDAE_BKP_ORAPROD_100510020004
List of Backup Pieces for backup set 585 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
626 1 AVAILABLE /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_05/o1_mf_annnn_MONDAE_BKP_ORAPROD_1_6bnhyrkx_.bkp
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
591 9.93M DISK 00:00:00 06-OCT-10
BP Key: 668 Status: AVAILABLE Compressed: YES Tag: TUESDAE_BKP_ORAPRO_100610020005
Piece Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_annnn_TUESDAE_BKP_ORAPRO_1_6bq4gbf0_.bkp
List of Archived Logs in backup set 591
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1590 5970754505788 06-OCT-10 5970754535825 06-OCT-10
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
592 39.71M DISK 00:00:00 06-OCT-10
BP Key: 669 Status: AVAILABLE Compressed: YES Tag: TUESDAE_BKP_ORAPRO_100610020005
Piece Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_annnn_TUESDAE_BKP_ORAPRO_1_6bq4gb8j_.bkp
List of Archived Logs in backup set 592
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1587 5970754389083 05-OCT-10 5970754454832 05-OCT-10
1 1588 5970754454832 05-OCT-10 5970754466057 05-OCT-10
1 1589 5970754466057 05-OCT-10 5970754505788 06-OCT-10
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
593 51.53M DISK 00:00:00 06-OCT-10
BP Key: 670 Status: AVAILABLE Compressed: YES Tag: TUESDAE_BKP_ORAPRO_100610020005
Piece Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_annnn_TUESDAE_BKP_ORAPRO_1_6bq4gbbj_.bkp
List of Archived Logs in backup set 593
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1584 5970754156607 05-OCT-10 5970754202686 05-OCT-10
1 1585 5970754202686 05-OCT-10 5970754244890 05-OCT-10
1 1586 5970754244890 05-OCT-10 5970754389083 05-OCT-10
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
594 45.71M DISK 00:00:00 06-OCT-10
BP Key: 671 Status: AVAILABLE Compressed: YES Tag: TUESDAE_BKP_ORAPRO_100610020005
Piece Name: /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_annnn_TUESDAE_BKP_ORAPRO_1_6bq4gbcy_.bkp
List of Archived Logs in backup set 594
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1581 5970749699577 05-OCT-10 5970749730446 05-OCT-10
1 1582 5970749730446 05-OCT-10 5970754120910 05-OCT-10
1 1583 5970754120910 05-OCT-10 5970754156607 05-OCT-10
Note : Last sequence available in backup is 1590 so you should out set until sequence as
set until sequence 1591
From target database system, obtain online redo log names:
[oracle@sroravm ~]$ sqlplus / as sysdba
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
+DATA/oraprod/onlinelog/group_3.266.725479873
+DATA/oraprod/onlinelog/group_3.267.725479875
+DATA/oraprod/onlinelog/group_2.264.725479873
+DATA/oraprod/onlinelog/group_2.265.725479873
+DATA/oraprod/onlinelog/group_1.262.725479873
+DATA/oraprod/onlinelog/group_1.263.725479873
6 rows selected.
You must run redo log rename command from sql prompt when database is mounted
[oracle@srrecovery ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Wed Oct 6 13:15:12 2010
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter database rename file '+DATA/oraprod/onlinelog/group_3.266.725479873'
2 to '/u01/app/oracle/oradata/oraprod/group_3';
Database altered.
SQL> alter database rename file '+DATA/oraprod/onlinelog/group_3.267.725479875'
2 to '/u01/app/oracle/oradata/oraprod/group_31';
Database altered.
SQL> alter database rename file '+DATA/oraprod/onlinelog/group_2.264.725479873'
2 to '/u01/app/oracle/oradata/oraprod/group_2';
Database altered.
SQL> alter database rename file '+DATA/oraprod/onlinelog/group_2.265.725479873'
2 to '/u01/app/oracle/oradata/oraprod/group_21';
Database altered.
SQL> alter database rename file '+DATA/oraprod/onlinelog/group_1.262.725479873'
2 to '/u01/app/oracle/oradata/oraprod/group_1';
Database altered.
SQL> alter database rename file '+DATA/oraprod/onlinelog/group_1.263.725479873'
2 to '/u01/app/oracle/oradata/oraprod/group_11';
Database altered.
SQL> select file#,name from v$datafile;
NOW BEFORE RUNNING THE SCRIPT REMOVE THE TABLESPACES NOT BACKED UP:
file 9 is excluded from whole database backup
file 10 is excluded from whole database backup
file 16 is excluded from whole database backup
file 21 is excluded from whole database backup
You need to offline drop all the datafiles which are not backed up then start recovery again.
i.e
[oracle@srrecovery oraprod]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Oct 7 10:15:42 2010
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter database datafile 9 offline drop
2 ;
Database altered.
SQL> alter database datafile 10 offline drop
2 ;
Database altered.
SQL> alter database datafile 16 offline drop
2 ;
Database altered.
SQL> alter database datafile 21 offline drop
2 ;
Database altered.
Note: Also disable block change tracking file system.
SQL> alter database disable block change tracking;
Database altered.
[oracle@srrecovery] rman | tee restore_recover_outputv1.log
RMAN> connect target /
RMAN> @/home/oracle/restore_recover.txt
run
{
set until sequence 1591;
set newname for datafile 1 to '/u01/app/oracle/oradata/oraprod/system.256.725479813';
set newname for datafile 2 to '/u01/app/oracle/oradata/oraprod/undotbs1.258.725479815';
set newname for datafile 3 to '/u01/app/oracle/oradata/oraprod/sysaux.257.725479815';
set newname for datafile 4 to '/u01/app/oracle/oradata/oraprod/users.259.725479815';
set newname for datafile 5 to '/u01/app/oracle/oradata/oraprod/bars';
set newname for datafile 6 to '/u01/app/oracle/oradata/oraprod/ccis';
set newname for datafile 7 to '/u01/app/oracle/oradata/oraprod/dis';
set newname for datafile 8 to '/u01/app/oracle/oradata/oraprod/emd';
set newname for datafile 11 to '/u01/app/oracle/oradata/oraprod/iirs';
set newname for datafile 12 to '/u01/app/oracle/oradata/oraprod/lms';
set newname for datafile 13 to '/u01/app/oracle/oradata/oraprod/erp';
set newname for datafile 14 to '/u01/app/oracle/oradata/oraprod/crs';
set newname for datafile 15 to '/u01/app/oracle/oradata/oraprod/crs2';
set newname for datafile 17 to '/u01/app/oracle/oradata/oraprod/nms';
set newname for datafile 18 to '/u01/app/oracle/oradata/oraprod/payslip';
set newname for datafile 19 to '/u01/app/oracle/oradata/oraprod/scrcs';
set newname for datafile 20 to '/u01/app/oracle/oradata/oraprod/tsm';
set newname for datafile 22 to '/u01/app/oracle/oradata/oraprod/dts_images';
set newname for datafile 23 to '/u01/app/oracle/oradata/oraprod/dts2';
set newname for datafile 24 to '/u01/app/oracle/oradata/oraprod/dts_images3';
set newname for datafile 25 to '/u01/app/oracle/oradata/oraprod/dts';
set newname for datafile 26 to '/u01/app/oracle/oradata/acs';
set newname for datafile 27 to '/u01/app/oracle/oradata/oraprod/dts_images.295.727444363';
set newname for datafile 28 to '/u01/app/oracle/oradata/oraprod/dtsimages3';
set newname for datafile 29 to '/u01/app/oracle/oradata/oraprod/testlms';
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
}
Starting recover at 07-OCT-10using channel ORA_DISK_1using channel ORA_DISK_2using channel ORA_DISK_3using channel ORA_DISK_4RMAN-00571: ===========================================================RMAN-00569: === ERROR MESSAGE STACK FOLLOWS ==============RMAN-00571: ===========================================================RMAN-03002: failure of recover command at 10/07/2010 10:31:31RMAN-06094: datafile 9 must be restored
Run below queries to check on the datafiles and status on clone database. Clone database should be in mount state.
SQL> column name format a10SQL> select dbid, name,to_char(created, 'DD-MON-YYYY HH24:MI:SS') created,open_mode, log_mode,to_char(checkpoint_change#, '999999999999999') as checkpoint_change#,controlfile_type,to_char(controlfile_change#, '999999999999999') as controlfile_change#,to_char(controlfile_time, 'DD-MON-YYYY HH24:MI:SS') controlfile_time,to_char(resetlogs_change#, '999999999999999') as resetlogs_change#,to_char(resetlogs_time, 'DD-MON-YYYY HH24:MI:SS') resetlogs_timefrom v$database;
SQL> select * from v$instance;
SQL> archive log list;
SQL> select substr(name, 1, 50), status from v$datafile;SQL> select substr(name,1,50), recover, fuzzy, checkpoint_change# from v$datafile_header;column error format a15select error, fuzzy, status, checkpoint_change#,to_char(checkpoint_time, 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time,count(*)from v$datafile_headergroup by error, fuzzy, status, checkpoint_change#, checkpoint_timeorder by error, fuzzy, status, checkpoint_change#, checkpoint_time;
Try on dropping all the datafiles with datafile names:
SQL> alter database datafile '+DATA/oraprod/datafile/idx_inv' offline drop;
Database altered.
SQL> alter database datafile '+DATA/oraprod/datafile/idx_pur' offline drop;
Database altered.
SQL> alter database datafile '+DATA/oraprod/datafile/idx_crs' offline drop;
Database altered.
SQL> alter database datafile '+DATA/oraprod/datafile/kats_msu' offline drop;
Database altered.
Now try to recover.
If it didn't work then use all the datafiles number except these dropped datafiles number to recover the database as below:
RMAN>recover datafile 1,2,3,4...;RMAN> recover datafile 1;Starting recover at 07-OCT-10using channel ORA_DISK_1using channel ORA_DISK_2using channel ORA_DISK_3using channel ORA_DISK_4channel ORA_DISK_1: starting incremental datafile backupset restorechannel ORA_DISK_1: specifying datafile(s) to restore from backup setdestination for restore of datafile 00001: /u01/app/oracle/oradata/oraprod/system.256.725479813channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo2x_.bkpchannel ORA_DISK_1: restored backup piece 1piece handle=/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_10_06/o1_mf_nnnd1_TUESDAE_BKP_ORAPRO_1_6bq4bo2x_.bkp tag=TUESDAE_BKP_ORAPRO_100610020005channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
RMAN-00571: ===========================================================RMAN-00569: ======= ERROR MESSAGE STACK FOLLOWS ==========RMAN-00571: ===========================================================RMAN-03002: failure of recover command at 10/07/2010 12:36:10RMAN-06067: RECOVER DATABASE required with a backup or created control file
Or perform the below operation:RMAN > recover database skip tablespace IDX_INV,IDX_PUR,IDX_CRS,KATS_MSU;
Media Recovery Failure Occurs.
RMAN-00571: ===============================================RMAN-00569: =========== ERROR MESSAGE STACK FOLLOWS =====RMAN-00571: ===========================================================RMAN-03002: failure of recover command at 10/07/2010 14:26:33RMAN-06054: media recovery requesting unknown log: thread 1 seq 1591 lowscn 5970754535825
Note: You should copy the archivelogs from source database if you want to do more recovery.
If you just want to open the database in current status then you can open it now also.
Assuming you have applied enough archive logs to make the datafile consistent otherwise more archive required.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-19751: could not create the change tracking file
ORA-19750: change tracking file: '/recoveryarea/ORAPROD/bctf01.log'
ORA-27040: file create error, unable to create file
Linux Error: 2: No such file or directory
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Disable tracking and open database without reset logs.SQL> alter database open resetlogs;alter database open resetlogs*ERROR at line 1:ORA-01139: RESETLOGS option only valid after an incomplete database recovery
SQL> alter database open;
[oracle@srrecovery 2010_10_07]$ sqlplus / as sysdba
SQL> select dbid from v$database;
DBID
----------
4204323645
[oracle@sroravm dv]$ sqlplus / as sysdba
SQL> select dbid from v$database;
DBID
----------
4204323645
Both DBIDs are same and the recovery operation has been completed successfully.
NOW SINCE WE SHIFTED FROM 64Bit OS to 32Bit OS we need to run packages:
SQL> shutdown immediate;
SQL> startup upgrade;
SQL> @$ORACLE_HOME/rdbms/admin/utlirp;
SQL> shutdown immediate;
SQL> startup;
SQL> @@$ORACLE_HOME/rdbms/admin/utlrp;metalink Note:414043.1, Note:413484.1, Note: 419137.1Second run :
executing command: SET NEWNAME
RMAN-00571: ===========================================================
RMAN-00569: ERROR MESSAGE STACK FOLLOWS
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 11/04/2010 15:10:57
RMAN-20201: datafile not found in the recovery catalog
RMAN-06010: error while looking up datafile: 29
On production remove the tablespace (since it has only one datafile we simple give the below command to remocve the datafile as well)
SQL> DROP TABLESPACE TESTLMS INCLUDING CONTENTS;RMAN> recover database skip tablespace IDX_INV,IDX_PUR,IDX_CRS,KATS_MSU,TESTLMS;
RMAN> recover database;RMAN-00571: ===========================================================
RMAN-00569: ERROR MESSAGE STACK FOLLOWS
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 11/04/2010 15:32:27
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27023: skgfqsbi: media manager protocol error
ORA-19511: Error received from media manager layer, error text:
sbt__rpc_connect: Internal error - could not connect to obproxyd (Oracle Secure Backup error: 'Connection refused').
Cause
The media management software which is linked with Oracle to provide backup/restore services did not provide its function pointer structure to Oracle.
Add OSB client to the recovery platform.
32 bit OSB for linux available on development machine:
[oracle@srpinky ~]$ scp -r osb-10.3.0.3.0_linux32.zip srrecovery.secp.gov.pk:/home/oracle/[email protected]'s password:
osb-10.3.0.3.0_linux32.zip 100% 39MB 2.2MB/s 00:18unzip the file and from root run setup.
To create the Oracle Secure Backup home:
Log into the host as root.
Run the following command:
# mkdir -p /usr/local/oracle/backup
2. Navigate into your OSB home directory:
#cd /usr/local/oracle/backup3. Ensure that the uncompress utility is available:
#ln -s /bin/gunzip /bin/uncompress
4. In your OSB home directory start the Oracle Secure Backup installation as therootuser./home/oracle/osb3.3/setupIf already installed uninstall using below reference;
http://download.oracle.com/docs/cd/B19090_01/doc/install.101/b14235/obins_uninst.htm[root@srrecovery backup]# obtool
csh: No such file or directory
csh: Trying to start from "/root"
csh: Trying to start from "/"
Oracle Secure Backup 10.3.0.3.0
login: admin
Password:ob> lshostsrorabkp admin,mediaserver,client (via OB) in service
sroravm client (via OB) in service
srpinky client (via OB) in service
srrecovery client (via OB) in service
Metalink Note:
RMAN backup using Oracle Secure Backup fails with ORA-19511 (sbt__rpc_connect) [ID 396046.1]Now running the script again:
Starting restore at 04-NOV-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=155 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=153 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=152 devtype=DISK
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: sid=150 devtype=SBT_TAPE
channel ORA_SBT_TAPE_1: Oracle Secure Backup
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00601: fatal error in recovery manager
RMAN-03010: fatal error during library cache pre-loading
RMAN-10015: error compiling PL/SQL program
RMAN-10033: error during compilation of job step 2: ORA-01109: database not open
Master Note For Oracle Recovery Manager (RMAN) [ID 1116484.1]
Now after the problem has been solved regarding the media, just look for latest backups on disk that have the higher sequence number than that of the tape backups.
Copy and catalog them.
NOTE :
1. The restore database preview shows the SCN beyond which we need to recover to clear the fuzziness.
The restore database preview from your uploaded file is.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Media recovery start SCN is 5971144855529Recovery must be done beyond SCN 5971144855535 to clear data files fuzzinessFinished restore at 05-NOV-10+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2. Your media recovery will be started from SCN 5971144855529. Identify the archive which holds this seqeuence
Execute the following query on the source database to identify the archive seqeuence from which the media recovery starts.
SQL > select sequence# from v$archived_log where 5971144855529 between first_change# and next_change#;
3. Media recovery has to be done beyond SCN 5971144855535 to clear fuzziness. Identify this sequence
Execute the following query on the source database to identify this archive seqeuence
SQL > select sequence# from v$archived_log where 5971144855535 between first_change# and next_change#;
4. Backup the archivelogs to disk starting from the sequence identified in step 2 to step 3.
RMAN > backup archivelog from sequence until sequence ;
5. Move the backup piece to the server where the restore needs to happen.
6. Catalog the backup piece to controlfile on the server where the restore is being done.
7. The seqeuence# that has to be provided in the set until clause will 1 greater than the seqeuence# identfied in step 3.
SQL> ALTER SESSION SET NLS_DATE_FORMAT ="DD-MON-RRRR HH24:MI:SS";
Session altered.
[oracle@srrecovery ~]$ rman | tee rman_sr_2302842781.log
Recovery Manager: Release 10.2.0.5.0 - Production on Fri Nov 5 10:00:19 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
RMAN> connect target /
connected to target database: ORAPROD (DBID=4204323645, not open)
RMAN> spool log to rman_output01.log
RMAN> set echo on
RMAN> show all;
RMAN> report schema;
RMAN> list incarnation;
RMAN> list backup of database;
RMAN> list backup of archivelog all;
RMAN> restore database preview;
RMAN> spool log off
Spooling for log turned off
Recovery Manager10.2.0.5.0
---------------------------------------------------------------------------------------------------------------------------------
RMAN> run
{
set until sequence 2089;
set newname for datafile 1 to '/u01/app/oracle/oradata/oraprod/system.256.725479813';
set newname for datafile 2 to '/u01/app/oracle/oradata/oraprod/undotbs1.258.725479815';
set newname for datafile 3 to '/u01/app/oracle/oradata/oraprod/sysaux.257.725479815';
set newname for datafile 4 to '/u01/app/oracle/oradata/oraprod/users.259.725479815';
set newname for datafile 5 to '/u01/app/oracle/oradata/oraprod/bars';
set newname for datafile 6 to '/u01/app/oracle/oradata/oraprod/ccis';
set newname for datafile 7 to '/u01/app/oracle/oradata/oraprod/dis';
set newname for datafile 8 to '/u01/app/oracle/oradata/oraprod/emd';
set newname for datafile 11 to '/u01/app/oracle/oradata/oraprod/iirs';
set newname for datafile 12 to '/u01/app/oracle/oradata/oraprod/lms';
set newname for datafile 13 to '/u01/app/oracle/oradata/oraprod/erp';
set newname for datafile 14 to '/u01/app/oracle/oradata/oraprod/crs';
set newname for datafile 15 to '/u01/app/oracle/oradata/oraprod/crs2';
set newname for datafile 17 to '/u01/app/oracle/oradata/oraprod/nms';
set newname for datafile 18 to '/u01/app/oracle/oradata/oraprod/payslip';
set newname for datafile 19 to '/u01/app/oracle/oradata/oraprod/scrcs';
set newname for datafile 20 to '/u01/app/oracle/oradata/oraprod/tsm';
set newname for datafile 22 to '/u01/app/oracle/oradata/oraprod/dts_images';
set newname for datafile 23 to '/u01/app/oracle/oradata/oraprod/dts2';
set newname for datafile 24 to '/u01/app/oracle/oradata/oraprod/dts_images3';
set newname for datafile 25 to '/u01/app/oracle/oradata/oraprod/dts';
set newname for datafile 26 to '/u01/app/oracle/oradata/acs';
set newname for datafile 27 to '/u01/app/oracle/oradata/oraprod/dts_images.295.727444363';
set newname for datafile 28 to '/u01/app/oracle/oradata/oraprod/dtsimages3';
restore database skip forever tablespace IDX_INV,IDX_PUR,IDX_CRS,KATS_MSU,testlms;
switch datafile all;
recover database skip forever tablespace IDX_INV,IDX_PUR,IDX_CRS,KATS_MSU,testlms;
alter database open resetlogs;
}
starting media recovery
unable to find archive logarchive log thread=1 sequence=1933Oracle Error:ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error belowORA-01194: file 1 needs more recovery to be consistentORA-01110: data file 1: '/u01/app/oracle/oradata/oraprod/system.256.725479813'
RMAN-00571: ===========================================================RMAN-00569: == ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of recover command at 11/12/2010 09:37:48RMAN-06054: media recovery requesting unknown log: thread 1 seq 1933 lowscn 5971144866958RMAN> **end-of-file**
RMAN> shutdown abort;
RMAN> startup nomount;
--connected to target database: oraprod (not mounted)
RMAN> restore controlfile from '/u01/app/oracle/flash_recovery_area/ORAPROD/autobackup/2010_11_12/o1_mf_s_734839252_6frpd51g_.bkp';
Starting restore at 12-NOV-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
output filename=/u01/app/oracle/oradata/oraprod/control01.ctl
output filename=/u01/app/oracle/oradata/oraprod/control02.ctl
output filename=/u01/app/oracle/oradata/oraprod/control03.ctl
Finished restore at 12-NOV-10RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> alter database open RESETLOGS;
RMAN-00571: ===========================================================
RMAN-00569: == ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 11/12/2010 09:52:54
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '+DATA/oraprod/datafile/system.256.725479813'
RMAN> alter database open;
RMAN-00571: ===========================================================
RMAN-00569: == ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 11/12/2010 09:53:12
ORA-19751: could not create the change tracking file
ORA-19750: change tracking file: '/recoveryarea/ORAPROD/bctf01.log'
ORA-27040: file create error, unable to create file
Linux Error: 2: No such file or directory
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
RMAN> alter database disable block change tracking;
RMAN-00571: ===========================================================
RMAN-00569: == ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "mount, open"
RMAN-01008: the bad identifier was: disable
RMAN-01007: at line 1 column 16 file: standard input
Open another session and give command on sqlplus terminal.
SQL> alter database disable block change tracking;
Database altered.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open RESETLOGS;
alter database open RESETLOGS
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '+DATA/oraprod/datafile/system.256.725479813'
Reason:
The controlfile is not aware of the archivelog/archivelog backups from 1933. You will have to catalog the archivelog backup pieces from 1933 to 2089...RMAN > list backup of archivelog from sequence 1933 until sequence 2089;
***********************************************************************[oracle@sroravm archivelog]$ scp -r 2010_11_12 srrecovery.secp.gov.pk:/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_12/[oracle@sroravm archivelog]$ scp -r 2010_11_11 srrecovery.secp.gov.pk:/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_11/[oracle@sroravm archivelog]$ scp -r 2010_11_10 srrecovery.secp.gov.pk:/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_10/[oracle@sroravm archivelog]$ scp -r 2010_11_09 srrecovery.secp.gov.pk:/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_09/
[oracle@sroravm archivelog]$ scp -r 2010_11_08 srrecovery.secp.gov.pk:/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_08/
[oracle@sroravm archivelog]$ scp -r 2010_11_07 srrecovery.secp.gov.pk:/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_07/
[oracle@sroravm archivelog]$ scp -r 2010_11_06 srrecovery.secp.gov.pk:/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_06/[oracle@sroravm archivelog]$ scp -r 2010_11_05 srrecovery.secp.gov.pk:/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_05/
[oracle@sroravm archivelog]$ scp -r 2010_11_04 srrecovery.secp.gov.pk:/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/
***********************************************************************RMAN> catalog backuppiece '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_12/o1_mf_1_2088_6frpdk87_.arc';
RMAN> shutdown abort;
RMAN> startup nomount;
RMAN> restore controlfile from '/u01/app/oracle/flash_recovery_area/ORAPROD/2010_11_12/o1_mf_s_734839335_6frpgqh6_.bkp';RMAN> alter database mount;Now make a script to archive log all day by day starting from older to newer versions:
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1932_6f3q6bpy_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1933_6f3xm6kq_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1934_6f473q5p_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1935_6f4dpoj2_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1936_6f4gd8qk_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1937_6f4jz5g4_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1938_6f4m0f16_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1939_6f4pzjf7_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1940_6f4tqpk8_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1941_6f4xky0z_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1942_6f523mp8_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1943_6f58761p_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1944_6f5jj1f9_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1945_6f5snz4v_.arc';
catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_04/o1_mf_1_1946_6f5swwqb_.arc';
RMAN> @/home/oracle/catalog_archives.txt
All success except the 12-nov backups saying:
RMAN> catalog archivelog '/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_12/o1_mf_1_2094_6fsr6303_.arc';
RMAN-00571: ===========================================================
RMAN-00569: == ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of catalog command on default channel at 11/12/2010 11:59:13
ORA-19625: error identifying file /u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_12/o1_mf_1_2094_6fsr6303_.arc
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
SQL> select hxfil,fhscn,fhrba_seq,fhsta from x$kcvfh;
HXFIL FHSCN FHRBA_SEQ FHSTA
---------- ---------------- ---------- ----------
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
9 0 0 0
10 0 0 0
11 0 0 0
HXFIL FHSCN FHRBA_SEQ FHSTA
---------- ---------------- ---------- ----------
12 0 0 0
13 0 0 0
14 0 0 0
15 0 0 0
16 0 0 0
17 0 0 0
18 0 0 0
19 0 0 0
20 0 0 0
21 0 0 0
22 0 0 0
HXFIL FHSCN FHRBA_SEQ FHSTA
---------- ---------------- ---------- ----------
23 0 0 0
24 0 0 0
25 0 0 0
26 0 0 0
27 0 0 0
28 0 0 0
29 0 0 0
30 0 0 0
30 rows selected.
[oracle@srrecovery ~]$ cd /u01/app/oracle/oradata/oraprod
[oracle@srrecovery oraprod]$ ls -lrt
total 68098152
-rw-r----- 1 oracle oinstall 30416896 Oct 4 09:49 temp01.dbf
-rw-r----- 1 oracle oinstall 52429312 Oct 4 11:16 redo03.log
-rw-r----- 1 oracle oinstall 52429312 Oct 4 11:16 redo02.log
-rw-r----- 1 oracle oinstall 5251072 Oct 4 11:29 users01.dbf
-rw-r----- 1 oracle oinstall 403709952 Oct 4 11:29 undotbs01.dbf
-rw-r----- 1 oracle oinstall 513810432 Oct 4 11:29 system01.dbf
-rw-r----- 1 oracle oinstall 251666432 Oct 4 11:29 sysaux01.dbf
-rw-r----- 1 oracle oinstall 52429312 Oct 4 11:29 redo01.log
-rw-r----- 1 oracle oinstall 52429312 Nov 2 18:25 group_11
-rw-r----- 1 oracle oinstall 52429312 Nov 2 18:25 group_1
-rw-r----- 1 oracle oinstall 52429312 Nov 3 16:02 group_21
-rw-r----- 1 oracle oinstall 52429312 Nov 3 16:02 group_2
-rw-r----- 1 oracle oinstall 104865792 Nov 3 16:07 testlms
-rw-r----- 1 oracle oinstall 52429312 Nov 4 10:13 group_31
-rw-r----- 1 oracle oinstall 52429312 Nov 4 10:13 group_3
-rw-r----- 1 oracle oinstall 560996352 Nov 12 09:37 undotbs1.258.725479815
-rw-r----- 1 oracle oinstall 1572872192 Nov 12 09:37 erp
-rw-r----- 1 oracle oinstall 1147150336 Nov 12 09:37 dts_images3
-rw-r----- 1 oracle oinstall 157294592 Nov 12 09:37 dts
-rw-r----- 1 oracle oinstall 5368717312 Nov 12 12:06 tsm
-rw-r----- 1 oracle oinstall 52436992 Nov 12 12:06 scrcs
-rw-r----- 1 oracle oinstall 52436992 Nov 12 12:10 dis
-rw-r----- 1 oracle oinstall 209723392 Nov 12 12:11 payslip
-rw-r----- 1 oracle oinstall 1073750016 Nov 12 12:14 ccis
-rw-r----- 1 oracle oinstall 52436992 Nov 12 12:16 bars
-rw-r----- 1 oracle oinstall 2327846912 Nov 12 12:16 system.256.725479813
-rw-r----- 1 oracle oinstall 5083504640 Nov 12 12:16 crs
-rw-r----- 1 oracle oinstall 258154496 Nov 12 12:16 iirs
-rw-r----- 1 oracle oinstall 822091776 Nov 12 12:16 crs2
-rw-r----- 1 oracle oinstall 104865792 Nov 12 12:17 emd
-rw-r----- 1 oracle oinstall 28844032 Nov 12 12:18 users.259.725479815
-rw-r----- 1 oracle oinstall 104865792 Nov 12 12:28 dts_images.295.727444363
-rw-r----- 1 oracle oinstall 734011392 Nov 12 12:38 lms
-rw-r----- 1 oracle oinstall 10108928 Nov 12 12:47 control03.ctl
-rw-r----- 1 oracle oinstall 10108928 Nov 12 12:47 control01.ctl
-rw-r----- 1 oracle oinstall 10108928 Nov 12 12:47 control02.ctl
-rw-r----- 1 oracle oinstall 660611072 Nov 12 12:47 sysaux.257.725479815
-rw-r----- 1 oracle oinstall 1414537216 Nov 12 12:47 dts2
-rw-r----- 1 oracle oinstall 29989281792 Nov 12 12:47 dts_images
-rw-r----- 1 oracle oinstall 10737426432 Nov 12 12:47 dtsimages3
-rw-r----- 1 oracle oinstall 5368717312 Nov 12 12:47 nms
SQL> SQL> spool recovery_info.txt
SQL> set pagesize 20000
SQL> set linesize 180
SQL> set pause off
SQL> set serveroutput on
SQL> set feedback on
SQL> set echo on
SQL> set numformat 999999999999999
SQL> alter session set NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
Session altered.
SQL> select name,controlfile_type, open_mode, checkpoint_change#, ARCHIVE_CHANGE# from v$database;
NAME CONTROL OPEN_MODE CHECKPOINT_CHANGE# ARCHIVE_CHANGE#
--------- ------- ---------- ------------------ ----------------
ORAPROD BACKUP MOUNTED 5971228440207 5971228373317
1 row selected.
SQL> select substr(name, 1, 50), status from v$datafile;SQL> select name,controlfile_type, open_mode, checkpoint_change#, ARCHIVE_CHANGE# from v$database;
NAME CONTROL OPEN_MODE CHECKPOINT_CHANGE# ARCHIVE_CHANGE#
--------- ------- ---------- ------------------ ----------------
ORAPROD BACKUP MOUNTED 5971228440207 5971228373317
1 row selected.
SQL> select substr(name, 1, 50), status from v$datafile;
SUBSTR(NAME,1,50) STATUS
-------------------------------------------------- -------
+DATA/oraprod/datafile/system.256.725479813 SYSTEM
+DATA/oraprod/datafile/undotbs1.258.725479815 ONLINE
+DATA/oraprod/datafile/sysaux.257.725479815 ONLINE
+DATA/oraprod/datafile/users.259.725479815 ONLINE
+DATA/oraprod/datafile/bars ONLINE
+DATA/oraprod/datafile/ccis ONLINE
+DATA/oraprod/datafile/dis ONLINE
+DATA/oraprod/datafile/emd ONLINE
+DATA/oraprod/datafile/idx_inv ONLINE
+DATA/oraprod/datafile/idx_pur ONLINE
+DATA/oraprod/datafile/iirs ONLINE
+DATA/oraprod/datafile/lms ONLINE
+DATA/oraprod/datafile/erp ONLINE
+DATA/oraprod/datafile/crs ONLINE
+DATA/oraprod/datafile/crs2 ONLINE
+DATA/oraprod/datafile/idx_crs ONLINE
+DATA/oraprod/datafile/nms ONLINE
+DATA/oraprod/datafile/payslip ONLINE
+DATA/oraprod/datafile/scrcs ONLINE
+DATA/oraprod/datafile/tsm ONLINE
+DATA/oraprod/datafile/kats_msu ONLINE
+DATA/oraprod/datafile/dts_images ONLINE
+DATA/oraprod/datafile/dts2 ONLINE
+DATA/oraprod/datafile/dts_images3 ONLINE
+DATA/oraprod/datafile/dts ONLINE
+DATA/acs ONLINE
+DATA/oraprod/datafile/dts_images.295.727444363 ONLINE
+DATA/oraprod/datafile/dtsimages3 ONLINE
+DATA/oraprod/datafile/crs_imp ONLINE
+DATA/oraprod/datafile/crs_imp2 ONLINE
30 rows selected.
SQL> select substr(name,1,40), recover, fuzzy, checkpoint_change# from v$datafile_header;
SUBSTR(NAME,1,40) REC FUZ CHECKPOINT_CHANGE#
---------------------------------------- --- --- ------------------
0
0
0
0
0
30 rows selected.
SQL> select GROUP#,THREAD#,SEQUENCE#,MEMBERS,ARCHIVED,STATUS,FIRST_CHANGE# from v$log;
GROUP# THREAD# SEQUENCE# MEMBERS ARC STATUS FIRST_CHANGE#
---------------- ---------------- ---------------- ---------------- --- ---------------- ----------------
1 1 2087 2 YES INACTIVE 5971228397808
3 1 2086 2 YES INACTIVE 5971228373317
2 1 2088 2 NO CURRENT 5971228440207
3 rows selected.
SQL> select GROUP#,substr(member,1,60) from v$logfile;
GROUP# SUBSTR(MEMBER,1,60)
---------------- ------------------------------------------------------------
3 +DATA/oraprod/onlinelog/group_3.266.725479873
3 +DATA/oraprod/onlinelog/group_3.267.725479875
2 +DATA/oraprod/onlinelog/group_2.264.725479873
2 +DATA/oraprod/onlinelog/group_2.265.725479873
1 +DATA/oraprod/onlinelog/group_1.262.725479873
1 +DATA/oraprod/onlinelog/group_1.263.725479873
SQL>select * from v$log_history;
2086 734831670 1 2086 5971228373317 11-NOV-2010 22:03:48 5971228397808 525876 27-JUL-2010 18:11:12
2087 734833828 1 2087 5971228397808 11-NOV-2010 23:54:30 5971228440207 525876 27-JUL-2010 18:11:12
SQL> select * from v$recover_file;
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
---------------- ------- ------- ----------------------------------------------------------------- ---------------- --------------------
1 ONLINE ONLINE FILE NOT FOUND 0
2 ONLINE ONLINE FILE NOT FOUND 0
3 ONLINE ONLINE FILE NOT FOUND 0
4 ONLINE ONLINE FILE NOT FOUND 0
5 ONLINE ONLINE FILE NOT FOUND 0
SQL> SELECT * FROM v$recovery_log;
no rows selected
SQL> SELECT f.name,b.status,b.change#,b.time FROM v$backup b,v$datafile f WHERE b.file# = f.file# AND b.status='ACTIVE';no rows selectedSQL> select hxfil FILENUMBER,fhsta STATUS,fhscn SCN,fhrba_Seq SEQUENCE,fhtnm TBS_NAME from x$kcvfh;FILENUMBER STATUS SCN SEQUENCE TBS_NAME
---------------- ---------------- ---------------- ---------------- ------------------------------
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
9 0 0 0
10 0 0 0
11 0 0 0
12 0 0 0
13 0 0 0
14 0 0 0
15 0 0 0
16 0 0 0
17 0 0 0
18 0 0 0
19 0 0 0
20 0 0 0
21 0 0 0
22 0 0 0
23 0 0 0
24 0 0 0
25 0 0 0
26 0 0 0
27 0 0 0
28 0 0 0
29 0 0 0
30 0 0 0
SQL> spool off
SQL> select member from v$logfile;SQL> alter database rename file '+DATA/oraprod/onlinelog/group_1.262.725479873' to '/u01/app/oracle/oradata/oraprod/group_1';And other if necessary
SQL> alter database datafile 9 offline drop; (new tablespace datafiles should also be included)
And others if necessary.***ON PRODUCTION***1)RMAN> list backup of archivelog from sequence 2088 until sequence 2089;
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
1051 22.51M DISK 00:00:13 12-NOV-10
BP Key: 1043 Status: AVAILABLE Compressed: YES Tag: THURSDAE_BKP_ORAPR_111210020004
Piece Name: /recoveryarea/ORAPROD/backupset/2010_11_12/o1_mf_annnn_THURSDAE_BKP_ORAPR_1_6frpdpsb_.bkp
List of Archived Logs in backup set 1051
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 2088 5971228440207 12-NOV-10 5971228459157 12-NOV-10
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
1058 257.50M SBT_TAPE 00:02:49 12-NOV-10
BP Key: 1050 Status: AVAILABLE Compressed: YES Tag: FRIDAY_TAPE_ORAPRO_111210070001
Handle: 1blsrgpn_1_1 Media: RMAN-DEFAULT-000003
List of Archived Logs in backup set 1058
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 2088 5971228440207 12-NOV-10 5971228459157 12-NOV-10
1 2089 5971228459157 12-NOV-10 5971228486200 12-NOV-10
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
1066 64.74M DISK 00:00:34 13-NOV-10
BP Key: 1058 Status: AVAILABLE Compressed: YES Tag: FRIDAE_BKP_ORAPROD_111310020002
Piece Name: /recoveryarea/ORAPROD/backupset/2010_11_13/o1_mf_annnn_FRIDAE_BKP_ORAPROD_1_6fvgry47_.bkp
List of Archived Logs in backup set 1066
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 2089 5971228459157 12-NOV-10 5971228486200 12-NOV-10
2)From recovery catalog the backuppiece after copying i.e.
[oracle@sroravm 2010_11_13]$ scp -r o1_mf_annnn_FRIDAE_BKP_ORAPROD_1_6fvgry47_.bkp srrecovery.secp.gov.pk:/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_11_13/3)
RMAN> catalog backuppiece '/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_11_13/o1_mf_annnn_FRIDAE_BKP_ORAPROD_1_6fvgry47_.bkp';4)
RMAN> RUN {
2> set until sequence 2090;
3> recover database skip forever tablespace IDX_INV,IDX_PUR,IDX_CRS,KATS_MSU,testlms,crs_imp;
4> alter database open resetlogs;
5> }
executing command: SET until clause
Starting recover at 23-NOV-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=151 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=153 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=154 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=159 devtype=DISK
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: sid=158 devtype=SBT_TAPE
channel ORA_SBT_TAPE_1: Oracle Secure Backup
Executing: alter database datafile 9 offline drop
Executing: alter database datafile 10 offline drop
Executing: alter database datafile 16 offline drop
Executing: alter database datafile 21 offline drop
Executing: alter database datafile 29 offline drop
Executing: alter database datafile 30 offline drop
starting media recovery
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_2: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=2088
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_11_12/o1_mf_annnn_THURSDAE_BKP_ORAPR_1_6frpdpsb_.bkp
channel ORA_DISK_2: restoring archive log
archive log thread=1 sequence=2089
channel ORA_DISK_2: reading from backup piece /u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_11_13/o1_mf_annnn_FRIDAE_BKP_ORAPROD_1_6fvgry47_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_11_12/o1_mf_annnn_THURSDAE_BKP_ORAPR_1_6frpdpsb_.bkp tag=THURSDAE_BKP_ORAPR_111210020004
channel ORA_DISK_1: restore complete, elapsed time: 00:01:35
archive log filename=/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_23/o1_mf_1_2088_6gplmo3v_.arc thread=1 sequence=2088
channel default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_23/o1_mf_1_2088_6gplmo3v_.arc recid=2356 stamp=735818486
channel ORA_DISK_2: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/ORAPROD/backupset/2010_11_13/o1_mf_annnn_FRIDAE_BKP_ORAPROD_1_6fvgry47_.bkp tag=FRIDAE_BKP_ORAPROD_111310020002
channel ORA_DISK_2: restore complete, elapsed time: 00:01:41
archive log filename=/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_23/o1_mf_1_2089_6gplnkg8_.arc thread=1 sequence=2089
channel default: deleting archive log(s)
archive log filename=/u01/app/oracle/flash_recovery_area/ORAPROD/archivelog/2010_11_23/o1_mf_1_2089_6gplnkg8_.arc recid=2357 stamp=735818497
media recovery complete, elapsed time: 00:00:23
Finished recover at 23-NOV-10
database opened
RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows
ORACLE error from target database:
ORA-06553: PLS-801: internal error [56319]
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-01003: no statement parsed
RMAN-12005: error during channel cleanup
ORA-06544: PL/SQL: internal error, arguments: [56319], [], [], [], [], [], [], []
ORA-06553: PLS-801: internal error [56319]
Finally the database is open (SQL> select dbid from v$database;
DBID
----------
4204323645
Both DBIDs are same and the recovery operation has been completed successfully.
NOW SINCE WE SHIFTED FROM 64Bit OS to 32Bit OS we need to run packages:
SQL> shutdown immediate;
SQL> startup upgrade;
SQL> @$ORACLE_HOME/rdbms/admin/utlirp;
SQL> shutdown immediate;
SQL> startup;
SQL> @@$ORACLE_HOME/rdbms/admin/utlrp;