Sunday, June 30, 2013

What to Do If You Forgot Your APPS password in R12


We can find the apps password 3 methods

OS Level:-

1.  history|grep FNDCPASS
2.  vi .bash_history or .sh_history

DB Level:-

Step to Find APPS PASSWORD:
SQL> show user
USER is "SYS"
SQL> create or replace FUNCTION apps.decrypt_pin_func(in_chr_key IN VARCHAR2,in_chr_encrypted_pin IN VARCHAR2)
RETURN VARCHAR2
AS
LANGUAGE JAVA NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
/

Function created.

SQL> select ENCRYPTED_FOUNDATION_PASSWORD from apps.fnd_user where USER_NAME='GUEST';

ENCRYPTED_FOUNDATION_PASSWORD
--------------------------------------------------------------------------------
PGA48F6CA123195C053FA4A247AE658615ECC4920653CBF5590CA458321526D79FD37F5AF6A5A9B5EEFE49F20547F673AB16


SQL> SELECT apps.decrypt_pin_func('GUEST/ORACLE','PGA48F6CA123195C053FA4A247AE658615ECC4920653CBF5590CA458321526D79FD37F5AF6A5A9B5EEFE49F20547F673AB16') from dual;

APPS.DECRYPT_PIN_FUNC('GUEST/ORACLE','PGA48F6CA123195C053FA4A247AE658615ECC49206
--------------------------------------------------------------------------------
apps

SQL>conn apps/apps;

connected

Saturday, June 29, 2013

Hot Cloning in Oracle Apps

   Source db name: TEST1
   Target db name: TEST2                     
On source:-
Step 1: Ensure adpreclone.pl has been run on dbTier and appsTier
Step 2:  we put the tablespace in begin backup mode and copy the datafiles

related that tablespace to target and give the end backup that tablespace. We have to repeat

these steps  for all tablespaces.

SQL> ALTER TABLESPACE <Tablespace Name> BEGIN BACKUP;

-bash-3.2$ copy datafiles related that tablespace from source to target using cp command


SQL> ALTER TABLESPACE <Tablespace Name> END BACKUP;

Step 3:-alter system switch logfile; (we have to give 2 to 3 times on source)

Step 4:- we have to copy the all archives from source to target

Note: (No need to copy the tempfiles,redolog files and controlfiles from source to target.
 Only db Files are enough including undo data files.)

On Target:-
We have to copy the Oracle Home from source to target then
Log on to the target system as the ORACLE user
Configure the <RDBMS ORACLE_HOME>
-bash-3.2$ cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
bash-3.2$ Perl adcfgclone.pl dbTechStack
Once the above command execution has completed. The listener has started automatically
-bash-3.2$ cd /u01/oradb/db/tech_st/11.1.0/dbs
  Step2:  we will export ORACLE_HOME and ORACLE_SID
-bash-3.2$ ORACLE_HOME=/u01/oradb/db/tech_st/11.1.0
-bash-3.2$ export ORACLE_HOME
-bash-3.2$ ORACLE_SID=TEST2
-bash-3.2$ export ORACLE_SID
-bash-3.2$ PATH=/u01/oradb/db/tech_st/11.1.0/bin:$PATH;
-bash-3.2$ export PATH
-bash-3.2$ pwd
/u01/oradb/db/tech_st/11.1.0/dbs
-bash-3.2$ pwd
/u01/oradb/db/tech_st/11.1.0/dbs
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Apr 1 22:32:45 2013
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to an idle instance.
  Step3: - On the target system issue STARTUP NOMOUNT command
SQL> startup nomount pfile='/u01/oradb/db/tech_st/11.1.0/dbs/initTEST2.ora';
ORACLE instance started.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Apr 1 22:33:16 2013
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Step4: - Run the prepared script for control file
SQL> @control.sql
Control file created.
SQL> shut immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> create spfile from pfile='/u01/oradb/db/tech_st/11.1.0/dbs/initTEST2.ora';
File created.
SQL> startup mount
Database mounted
Note: after mounted the database we have to set the log_archive_format and log_archive_dest parameters before recovering the database
SQL> alter system set log_archive_format='TEST1_%t_%s_%r.arc' scope=spfile;
System altered.
(Here we have to create the log_archive_format same in target and source)
alter system set log_archive_format='TEST1_%t_%s_%r.arc' ;(Source)
alter system set log_archive_format='TEST1_%t_%s_%r.arc'; (target)
Note:  we have to give the log_archive_format same as Source db name on target db name.
Because while recovering database we do not get any issue on target. Once db opened then we can give Log_archive_format as target db name on target server
SQL> alter system set log_archive_dest_1='location=/u02/oradb/archive' scope=spfile;
System altered.
SQL> shut immediate
ORACLE instance shut down.
SQL> startup mount
Database mounted.
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u02/oradb/archive
Oldest online log sequence     0
Next log sequence to archive   0
Current log sequence           0
Step5: -Start the db in recover mode
SQL> RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE;                                               
(Here we have to give the AUTO Command. once we have given the AUTO Command it will take archives automatically from log_archive_dest parameter of target)
ORA-00279: change 1934005125 generated at 04/01/2013 17:26:47 needed for thread
1
ORA-00289: suggestion : /u02/oradb/archive/TEST1_1_5926_777925422.arc
ORA-00280: change 1934005125 for thread 1 is in sequence #5926
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
AUTO
ORA-00279: change 1934124711 generated at 04/01/2013 17:33:48 needed for thread
1
ORA-00289: suggestion : /u02/oradb/archive/TEST1_1_5927_777925422.arc
ORA-00280: change 1934124711 for thread 1 is in sequence #5927
ORA-00278: log file '/u02/oradb/archive/TEST1_1_5930_777925422.arc' no
longer needed for this recovery
ORA-00308: cannot open archived log
'/u02/oradb/archive/TEST1_1_5931_777925422.arc'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
Step6: - Open the database with resetlogs:
SQL>
ALTER DATABASE OPEN RESETLOGS;
Database altered.
SQL> CREATE TEMPORARY TABLESPACE TEMP01 TEMPFILE '/u01/oradb/db/apps_st/data/temp01_01.dbf' SIZE 4g TABLESPACE GROUP tmpgrp;
Tablespace created.
SQL> CREATE TEMPORARY TABLESPACE TEMP02 TEMPFILE '/u01/oradb/db/apps_st/data/temp02_01.dbf' SIZE 4g TABLESPACE GROUP tmpgrp;
Tablespace created.
SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE tmpgrp;
Database altered.
SQL> EXIT
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-bash-3.2$ pwd
/u01/oradb/db/tech_st/11.1.0/appsutil/install/TEST2_<hostname>
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Apr 1 22:46:39 2013
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Step7: - Run the library update script against the database
SQL> @adupdlib.sql so
PL/SQL procedure successfully completed.
Where <libext> is "sl" for HP-UX, "so" for any other UNIX platform and not required
for Windows. 
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
--bash-3.00$ cd /u02/oradb/db/tech_st/11.1.0/appsutil/clone/bin/
-bash-3.00$ pwd
/u02/oradb/db/tech_st/11.1.0/appsutil/clone/bin
-bash-3.00$ ls
CloneContext_0526102023.log  adcfgclone.pl                adchkutl.sh                  adclone.pl                   adclonectx.pl
Step8: - Configure the target database (the database must be open)
-bash-3.00perl adcfgclone.pl dbconfig /u01/oradb/db/tech_st/11.1.0/appsutil/TEST2_<hostname>.xml
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Apr 1 22:51:56 2013
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> conn apps/apps
Connected.
SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-bash-3.2$ cd /u01/oradb/db/tech_st/11.1.0/appsutil/scripts/TEST2_<hostname>/
-bash-3.2$ pwd
/u01/oradb/db/tech_st/11.1.0/appsutil/scripts/TEST2_<hostname>
-bash-3.2$ ls
adautocfg.sh   addbctl.sh     adexecsql.pl   adpreclone.pl adstrtdb.sql
adchknls.pl    addlnctl.sh    adlsnodes.sh   adstopdb.sql
-Bash-3.2$ sh adautocfg.sh
Enter the APPS user password:
AutoConfig completed successfully.
Step9:-
-bash-3.2$ perl adcfgclone.pl appsTier
 Once The above script has completed successfully. Then it asks the
Do you want to startup the Application Services for TEST2? (y/n) [y] : Y
The application services are started automatically.


******************Hot Cloning activity has completed successfully******************

Friday, June 28, 2013

RMAN 'Duplicate from Active Database' Feature in 11G

Source: DB name: TEST1
Target: DB name: TEST2
On Target:-
 We have to copy the only Oracle home from source to target
On Target we create the listener by using below command or Netca
-Bash-3.00$cd <ORACLE_HOME>/appsutil/clone/bin
-Bash-3.00$perl adcfgclone.pl dbTechStack
Here listener.ora and tnsnames.ora files are created under                                                                                   $ORACLE_HOME/network/admin/SID_<hostname>.
But sqlnet.ora is not created under the above location. So that we have to copy the sqlnet.ora file from source to target
In Target database we have to set the only below parameters in initTEST2.ora
 Vi initTEST2.ora
*.db_name=TEST2
*.db_file_name_convert='/u01/oradb/db/apps_st/data','/u02/oradb/db/apps_st/data'
*.log_file_name_convert='/u01/oradb/db/apps_st/data','/u02/oradb/db/apps_st/data'
*.diagnostic_dest='/u02/oradb/db/tech_st/11.1.0/admin/TEST2_<hostname>'
*.control _files='/u02/oradb/db/apps_st/data/control01.dbf'
*.COMPATIBLE= 11.1.0.0.0
Here db_file_name_convert =<’source db file loc’>, < ‘target db file loc’>, < ’source db file loc’>, < ‘target db file loc’>, <’’>………………..;
  log_file_name_convert= ’<source log file loc>’,’< target log file loc>’;

Now we have to create the password file at $ORACLE_HOME/dbs Location in source and target like below
 bash-3.00$orapwd file=orapwTEST1   password=sys  force=y entries=5  (On source)   
bash-3.00$orapwd  file=orapwTEST2    password=sys  force=y entries=5  (On Target)
 Note: we have to provide the same password in source and target
On Target:-
We have to start the db in nomount state
-bash-3.00$ ps -ef|grep ora_
  oracle  4859  1718   0 16:29:48 pts/1       0:00 grep ora_
-bash-3.00$ ORACLE_SID=TEST2
-bash-3.00$ export ORACLE_SID
-bash-3.00$ sqlplus  sys/sys as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Fri Mar 8 16:30:07 2013
Copyright (c) 1982, 2008, oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile='/u02/oradb/db/tech_st/11.1.0/dbs/initTEST2.ora';
oracle instance started.
Then We have to create spfile from pfile. Then we start the db no mount state.
After that we have to check tnsping is working on Source and target
Note:  we have set the source tns entries and target tns entries in source and target of tnsname.ora file. Then we check the tnsping
$tnsping   <source IP>
$tnsping    <Target IP>
$tnsping   <Source db name>
$tnsping   <target db name>
On Source:-
$tnsping   <source IP>
$tnsping    <Target IP>
$tnsping   <Source db name>
$tnsping   <target db name>
If  tnsping connection is fine. Then we will check the at sqlplus level
Bash-3.0sqlplus sys/sys@TEST2 as sysdba (From Source)
 Bash-3.0sqlplus sys/sys@TEST1 as sysdba (From Target)
If everything fine we can proceed next step
On Target:-
-bash-3.00$ rman target sys/sys@TEST1 nocatalog  auxiliary sys/sys@TEST2
Recovery Manager: Release 11.1.0.7.0 - Production on Fri Mar 8 16:48:06 2013
Copyright (c) 1982, 2007, oracle  All rights reserved.
connected to target database: TEST1 (DBID=4138996220)
using target database control file instead of recovery catalog
connected to auxiliary database: TEST2 (not mounted)
RMAN> duplicate target database to 'TEST2' from active database
 db_file_name_convert  ‘/u01/oradb/db/apps_st/data','/u02/oradb/db/apps_st/data';
Starting Duplicate Db at 08-MAR-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=98 device type=DISK
contents of Memory Script:
{
   set newname for datafile  1 to "/u02/oradb/db/apps_st/data/system01.dbf";
   set newname for datafile  2 to "/u02/oradb/db/apps_st/data/system02.dbf";
   set newname for datafile  3 to "/u02/oradb/db/apps_st/data/system03.dbf";
   set newname for datafile  4 to "/u02/oradb/db/apps_st/data/system04.dbf";
   set newname for datafile  5 to  "/u02/oradb/db/apps_st/data/system05.dbf";
   backup as copy reuse
   datafile  1 auxiliary format "/u02/oradb/db/apps_st/data/system01.dbf"   datafile
 2 auxiliary format  "/u02/oradb/db/apps_st/data/system02.dbf"   datafile
 3 auxiliary format "/u02/oradb/db/apps_st/data/system03.dbf"   datafile
 4 auxiliary format  "/u02/oradb/db/apps_st/data/system04.dbf"   datafile
 5 auxiliary format "/u02/oradb/db/apps_st/data/system05.dbf"   datafile
 sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 08-MAR-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=334 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00045 name=/u01/oradb/db/apps_st/data/a_txn_data08.dbf
output file name=/u02/oradb/db/apps_st/data/a_txn_data08.dbf tag=TAG20130308T075928 RECID=0 STAMP=0
STAMP=809551448cataloged datafile copy
cataloged datafile copy
input datafile copy RECID=1 STAMP=809551447 file name=/u02/oradb/db/apps_st/data/system02.dbf
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 08-MAR-13.
RMAN>
********database will open automatically on target******
 Error 1:-
RMAN> duplicate target database to 'TEST2' from active database
 db_file_name_convert  ‘/u01/oradb/db/apps_st/data','/u02/oradb/db/apps_st/data';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/08/2013 17:38:49
RMAN-06136: oracle error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-01130: database file version 11.1.0.0.0 incompatible with version 11.0.0.0.0
ORA-01110: data file 1: '/u02/oradb/db/apps_st/data/system01.dbf'
We will get the above yellow marked error while creation of Control file level
 we can resolve the above issue by providing below solution
Solution: - we add the COMPATIBLE= 11.1.0.0.0 parameter in initTEST2.ora file.
Error 2:-
Contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount ;
}
executing Memory Script
database dismounted
oracle instance shut down
connected to auxiliary database (not started)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/09/2013 13:04:28
RMAN-03015: error occurred in stored script Memory Script
RMAN-04014: startup failed: ORA-48141: error creating directory during ADR initialization [/u02/oradb/db/tech_st/11.1.0/admin/SID_<hostname>/diag/rdbms//u01/oradb/db/apps_st/dat]
ORA-48189: OS command to create directory failed
SVR4 Error: 2: No such file or directory
Additional information: 2

Solution: - create the spfile from pfile then we need to execute the same script

Thursday, June 27, 2013

RMAN cloning in Oracle 11g

                                 RMAN cloning in Oracle 11g
Source db name: TEST
Target db name: TEST
First we have to run the RMAN Level 0 backup at source. After completion of RMAN Backup at source we will transfer the RMAN Backup to target.
Note:  I have given the same db name at source and target
On Target:-
 We have to copy the only Oracle Home from source to target
On Target we have to create the listener by using below command or Netca
-Bash-3.00$cd <ORACLE_HOME>/appsutil/clone/bin
-Bash-3.00$perl adcfgclone.pl dbTechStack
Here listener.ora and tnsnames.ora files are created under $ORACLE_HOME/network/admin/SID_<hostname>.
But sqlnet.ora is not created under the above location.
So that we have to copy the sqlnet.ora file from source to target
In Target database we have to set the only below parameters in initTEST.ora
 View   initTEST.ora
*.db_name=TEST
*.diagnostic_dest='/u01/oradb/db/tech_st/11.1.0/admin/TEST_<hostname>'
*.control _files='/u01/oradb/db/apps_st/data/control01.dbf'
*.COMPATIBLE= 11.1.0.0.0
:wq!
Note: The above parameters is enough in init<dbname>.ora level in target
-bash-3.00$ sqlplus / as sysdba  
SQL*Plus: Release 11.1.0.7.0 - Production on Fri Mar 8 16:30:07 2013
Copyright (c) 1982, 2008, U01.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile='/u01/oradb/db/tech_st/11.1.0/dbs/initTEST.ora';
Oracle  instance started.
SQL> exit
Disconnected from U01 Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-bash-3.00$ cd  /u01/oradb/rmanbackup/ (This RMAN backup has transferd from source)
-bash-3.00$ ls
TEST_RMAN_LVL0_20130626.log  
 contrl_861_1_819081694.bk     
db_845_1_819078611.bk                     
arc_857_1_819081319.bk                
-bash-3.00$ rman target /
Recovery Manager: Release 11.1.0.7.0 - Production on Wed Jun 26 15:01:42 2013
Copyright (c) 1982, 2007, U01.  All rights reserved.
connected to target database: TEST (not mounted)
RMAN> restore controlfile from '/u01/oradb/rmanbackup/contrl_861_1_819081694.bk';
Starting restore at 26-JUN-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=98 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/oradb/db/apps_st/data/control01.dbf
Finished restore at 26-JUN-13
RMAN> mount database;
database mounted
released channel: ORA_DISK_1
-bash-3.00$ rman target sys/SRINU
Recovery Manager: Release 11.1.0.7.0 - Production on Wed Jun 26 15:04:26 2013
Copyright (c) 1982, 2007, oracle.  All rights reserved.
connected to target database: TEST (DBID=4138996220, not open)
RMAN> catalog start with '/u01/oradb/rmanbackup';  (Here we have to provide the target RMAN Backup location )
using target database control file instead of recovery catalog
searching for all files that match the pattern /u01/oradb/rmanbackup
List of Files Unknown to the Database
=====================================
File Name: /u01/oradb/rmanbackup/TEST_RMAN_LVL0_20130626.log
File Name: /u01/oradb/rmanbackup/arc_857_1_819081319.bk
File Name: /u01/oradb/rmanbackup/contrl_861_1_819081694.bk
File Name: /u01/oradb/rmanbackup/db_850_1_819079929.bk

Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/oradb/rmanbackup/arc_857_1_819081319.bk
File Name: /u01/oradb/rmanbackup/arc_858_1_819081319.bk
File Name: /u01/oradb/rmanbackup/contrl_861_1_819081694.bk
File Name: /u01/oradb/rmanbackup/db_856_1_819081120.bk
List of Files Which Where Not Cataloged
=======================================
File Name: /u01/oradb/rmanbackup/TEST_RMAN_LVL0_20130626.log
 RMAN-07517: Reason: The file header is corrupted
Note: In the above Catalog script we have to provide the target rman backup location.
Note: Execute the select  file_id, file_name from dba_data_files order by file_id; query  in source location and according that the below script we have to mention which mount point to copy the datafiles.( Here we are transferring to u01 Mount point )
RMAN> run
 {
set newname for datafile 1 to '/u01/oradb/db/apps_st/data/system01.dbf';
set newname for datafile 2 to '/u01/oradb/db/apps_st/data/system02.dbf';
set newname for datafile 3 to '/u01/oradb/db/apps_st/data/system03.dbf';
set newname for datafile 4 to '/u01/oradb/db/apps_st/data/system04.dbf';
set newname for datafile 5 to '/u01/oradb/db/apps_st/data/system05.dbf';
set newname for datafile 6 to '/u01/oradb/db/apps_st/data/system06.dbf';
set newname for datafile 7 to '/u01/oradb/db/apps_st/data/system07.dbf';
set newname for datafile 8 to '/u01/oradb/db/apps_st/data/system08.dbf';
set newname for datafile 9 to '/u01/oradb/db/apps_st/data/system09.dbf';
set newname for datafile 10 to '/u01/oradb/db/apps_st/data/system10.dbf';
restore database;
switch datafile all;
recover database;
}
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
executing command: SET NEWNAME
Starting restore at 26-JUN-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00040 to /u01/oradb/db/apps_st/data/sysaux02.dbf
channel ORA_DISK_1: restoring datafile 00051 to /u01/oradb/db/apps_st/data/users1.dbf
channel ORA_DISK_1: restoring datafile 00057 to /u01/oradb/db/apps_st/data/users2.dbf
channel ORA_DISK_1: reading from backup piece /u011/oradb/rmanbackup/db_841_1_819078609.bk
channel ORA_DISK_1: errors found reading piece handle=/u011/oradb/rmanbackup/db_841_1_819078609.bk
channel ORA_DISK_1: failover to piece handle=/u01/oradb/rmanbackup/db_841_1_819078609.bk tag=TAG20130626T015007
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:06:55
Finished restore at 26-JUN-13
datafile 1 switched to datafile copy
input datafile copy RECID=67 STAMP=819132122 file name=/u01/oradb/db/apps_st/data/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=68 STAMP=819132122 file name=/u01/oradb/db/apps_st/data/system02.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=69 STAMP=819132123 file name=/u01/oradb/db/apps_st/data/system03.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=70 STAMP=819132123 file name=/u01/oradb/db/apps_st/data/system04.dbf
Starting recover at 26-JUN-13
using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=237
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=238
channel ORA_DISK_1: reading from backup piece /u011/oradb/rmanbackup/arc_860_1_819081323.bk
channel ORA_DISK_1: errors found reading piece handle=/u011/oradb/rmanbackup/arc_860_1_819081323.bk
channel ORA_DISK_1: failover to piece handle=/u01/oradb/rmanbackup/arc_860_1_819081323.bk tag=TAG20130626T023518
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:05
archived log file name=/u01/oradb/db/tech_st/11.1.0/dbs/arch1_237_807868191.dbf thread=1 sequence=237
archived log file name=/u01/oradb/db/tech_st/11.1.0/dbs/arch1_238_807868191.dbf thread=1 sequence=238
unable to find archived log
archived log thread=1 sequence=239
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 06/26/2013 16:43:37
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 239 and starting SCN of 309516351
RMAN> alter database open RESETLOGS;
Database opened
                                                                                                                                             Srini