errors in oracle begin backup mode ORA-01123:,ORA-01109:

SQL> alter database begin backup;
alter database begin backup
*
ERROR at line 1:
ORA-01123: cannot start online backup; media recovery not enabled

solution:-
SQL> select open_mode from v$database;

OPEN_MODE
——————–
READ WRITE

SQL> alter database close;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
——————–
MOUNTED

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /oraeng/app/oracle/product/11.2.0/dbs/arch
Oldest online log sequence     57
Current log sequence           58
SQL> alter database archivelog;

Database altered.

SQL> alter database begin backup;
alter database begin backup
*
ERROR at line 1:
ORA-01109: database not open

solution:-
SQL> startup pfile=startup pfile=’/home/oracle/kiruba/admin/pfile/initkiruba.ora’ force;

SQL> startup pfile=’/home/oracle/kiruba/admin/pfile/initkiruba.ora’ force;
ORACLE instance started.

Total System Global Area  941600768 bytes
Fixed Size                  1340440 bytes
Variable Size             549456872 bytes
Database Buffers          385875968 bytes
Redo Buffers                4927488 bytes
Database mounted.
Database opened.
SQL> alter database begin backup;

Database altered.

spfile and pfile errors

SQL> create pfile=’/home/oracle/karan/admin/pfile/initclone.ora’ from spfile;
create pfile=’/home/oracle/karan/admin/pfile/initclone.ora’ from spfile
*
ERROR at line 1:
ORA-01565: error in identifying file ‘?/dbs/[email protected]
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3


SQL> show parameter spfile;

NAME                                 TYPE        VALUE
———————————— ———– ——————————
spfile                               string
SQL> create spfile=
  2  
SQL> create spfile=’/home/oracle/karan/admin/pfile/initclone.ora’ from pfile;
create spfile=’/home/oracle/karan/admin/pfile/initclone.ora’ from pfile
*
ERROR at line 1:
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file
‘/oraeng/app/oracle/product/11.2.0/dbs/initkiruba.ora’


SQL> create spfile from pfile;
create spfile from pfile
*
ERROR at line 1:
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file
‘/oraeng/app/oracle/product/11.2.0/dbs/initkiruba.ora’


SQL> create spfile from pfile=’/home/oracle/karan/admin/pfile/initclone.ora;
create spfile from pfile=’/home/oracle/karan/admin/pfile/initclone.ora
                         *
ERROR at line 1:
ORA-01756: quoted string not properly terminated


SQL> create spfile from pfile=’/home/oracle/karan/admin/pfile/initclone.ora’;
create spfile from pfile=’/home/oracle/karan/admin/pfile/initclone.ora’
*
ERROR at line 1:
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file
‘/home/oracle/karan/admin/pfile/initclone.ora’


SQL> create spfile from pfile;
create spfile from pfile
*
ERROR at line 1:
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file
‘/oraeng/app/oracle/product/11.2.0/dbs/initkiruba.ora’


SQL> crecreate spfile from pfile;
SP2-0734: unknown command beginning “crecreate …” – rest of line ignored.
SQL> create spfile from pfile=’/home/oracle/karan/admin/pfile/initclone.ora’;
create spfile from pfile=’/home/oracle/karan/admin/pfile/initclone.ora’
*
ERROR at line 1:
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file
‘/home/oracle/karan/admin/pfile/initclone.ora’


SQL> 
SQL> 
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file ‘/oraeng/app/oracle/product/11.2.0/dbs/initkiruba.ora’


SQL> startup pfile=’/home/oracle/kiruba/admin/pfile/initkiruba.ora’;
ORA-01081: cannot start already-running ORACLE – shut it down first
SQL> /home/oracle/kiruba/admin/pfile/initkiruba.ora
SP2-0734: unknown command beginning “/home/orac…” – rest of line ignored.
SQL> startup pfile=’/home/oracle/kiruba/admin/pfile/initkiruba.ora force;
LRM-00109: could not open parameter file ‘/home/oracle/kiruba/admin/pfile/initkiruba.ora force’
ORA-01078: failure in processing system parameters
SQL> startup pfile=’/home/oracle/kiruba/admin/pfile/initkiruba.ora’force;
LRM-00109: could not open parameter file ‘/home/oracle/kiruba/admin/pfile/initkiruba.oraforce’
ORA-01078: failure in processing system parameters
SQL> startup pfile=’/home/oracle/kiruba/admin/pfile/initkiruba.ora’ force;;
SP2-0714: invalid combination of STARTUP options
solution:-
SQL> ! 
[oracle@localhost ~]$ locate initkiruba.or
/home/oracle/kiruba/admin/pfile/initkiruba.ora
[oracle@localhost ~]$ exit
exit

SQL> startup pfile=’/home/oracle/kiruba/admin/pfile/initkiruba.ora’ force;

ORACLE instance started.
Total System Global Area  941600768 bytes
Fixed Size                  1340440 bytes
Variable Size             549456872 bytes
Database Buffers          385875968 bytes
Redo Buffers                4927488 bytes
Database mounted.
Database opened.
SQL> create spfile from pfile=’/home/oracle/kiruba/admin/pfile/initkiruba.ora’;
File created.

USING RMAN Restoring the SPFILE – with and without AUTOBACKUP

Restoring the SPFILE – with and without AUTOBACKUP
Let us look at some backup and recovery scenarios pertaining to the SPFIILE. The SPFILE is a small but very important file and if we lose the spfile, we cannot start the database even if all the other database files are present and intact.
So in my opinion, it is quite an important thing to consider in our disaster recovery strategy.
Remember best practise is to turn the autobackup of the control file to ON (it is OFF by default).
SPFILE is automatically backed up along with the database control file when any of the following events occur and when the control file autobackup has been enabled in RMAN. .
RMAN> show controlfile autobackup;
RMAN configuration parameters for database with db_unique_name GAVIN are:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
When does the SPFILE gat backed up with AUTOBACKUP now tuned on?
  • After every BACKUP or CREATE CATALOG command
  • After every BACKUP command contained in a RUN block
  • After every structural change to the database occurs like adding a new tablespace, altering the state of a tablespace or datafile (for example, bringing it online), adding a new online redo log, renaming a file
Where does the SPFILE autobackup reside?
RMAN> show controlfile autobackup format ;
RMAN configuration parameters for database with db_unique_name GAVIN are:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default
This is the default setting for CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK
By default, RMAN will send the autobackup to the flash recovery area (if used).
Let us now remove the default keyword
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’;
new RMAN configuration parameters are successfully stored
In this case the SPFILE (and control file) autobackup is located anywhere you specify, but default location will be %ORACLE_HOME%\Database on Windows and $ORACLE_HOME/dbs on UNIX.
RMAN> list backup of spfile;
using target database control file instead of recovery catalog
List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
252     Full    9.73M      DISK        00:00:00     13-JUN-13
        BP Key: 267   Status: AVAILABLE  Compressed: NO  Tag: TAG20130613T144508
        Piece Name: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-2968723077-20130613-00
Let us now specify an actual location on disk instead of just the %F,
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘/u01/backup/%F’;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘/u01/backup/%F’;
new RMAN configuration parameters are successfully stored
RMAN> list backup of spfile;
using target database control file instead of recovery catalog
List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
256     Full    9.73M      DISK        00:00:01     13-JUN-13
        BP Key: 271   Status: AVAILABLE  Compressed: NO  Tag: TAG20130613T155004
        Piece Name: /u01/backup/c-2968723077-20130613-01
Note the SPFILE autobackup is now located at /u01/backup and we can see the format of the backup file on disk is no longer OMF.
The DBID (2968723077) and the timestamp (20130613) is now contained in the backup file name c-2968723077-20130613-01
Let us now revert the autobackup back to the FRA.
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’;
RMAN configuration parameters are successfully reset to default value
RMAN> show CONTROLFILE AUTOBACKUP FORMAT;
RMAN configuration parameters for database with db_unique_name GAVIN are:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default
RMAN> list backup of spfile;
using target database control file instead of recovery catalog
List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
266     Full    9.73M      DISK        00:00:01     13-JUN-13
        BP Key: 281   Status: AVAILABLE  Compressed: NO  Tag: TAG20130613T162411
        Piece Name: /u01/app/oracle/fast_recovery_area/GAVIN/autobackup/2013_06_13/o1_mf_s_818007851_8vlsdd3n_.bkp
Autobackup is now back to OMF.
Recovery scenarios involving loss of SPFILE
Case 1) Autobackup in Flash (or now called Fast) Recovery Area
The SPFILE has accidently been deleted and now the database is not starting up after a shutdown has been executed.
FRA has been configured.
If FRA has been configured, the backup of the SPFILE is located in the autobackup sub-directory.
For example:
/u01/app/oracle/fast_recovery_area/GAVIN/autobackup/2013_06_10/ o1_mf_s_818007851_8vlsdd3n_.bkp
Note that it is stored in OMF format in this example. The ‘s’ in the string identifies the OMF as a backup related to the SPFILE
To recover from loss of SPFILE if you are NOT using an RMAN Catalog, we need to do two things first :
1) Set the DBID
2) Issue the STARTUP NOMOUNT FORCE command from an RMAN prompt (note – not SQL*PLUS)
RMAN> SET DBID=2968723077;
executing command: SET DBID
RMAN> startup force nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file ‘/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initgavin.ora’
starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started
Total System Global Area     158662656 bytes
Fixed Size                     2226456 bytes
Variable Size                104859368 bytes
Database Buffers              46137344 bytes
Redo Buffers                   5439488 bytes
This is a typical error we will face when either restoring the SPFILE or control file from an autobackup.
RMAN>  restore controlfile from autobackup;
Starting restore at 13-JUN-13
using channel ORA_DISK_1
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130613
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130612
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130611
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130610
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130609
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130608
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130607
channel ORA_DISK_1: no AUTOBACKUP in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/13/2013 17:15:52
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
The reason in this case is that since the spfile is missing and we have mounted the instance using a dummy spfile, the database needs to know where to look to find the autobackup of the spfile .
So now we include the db_file_recovery_dest and db_name parameters in the RESTORE SPFILE command.
RMAN> restore spfile from autobackup db_recovery_file_dest=’/u01/backup/fast_recovery_area’ db_name=’GAVIN’;
Starting restore at 13-JUN-13
using channel ORA_DISK_1
recovery area destination: /u01/backup/fast_recovery_area
database name (or database unique name) used for search: GAVIN
channel ORA_DISK_1: AUTOBACKUP /u01/backup/fast_recovery_area/GAVIN/autobackup/2013_06_10/o1_mf_s_818007851_8vlsdd3n_.bkp found in the recovery area
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130613
channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/backup/fast_recovery_area/GAVIN/autobackup/2013_06_10/o1_mf_s_818007851_8vlsdd3n_.bkp
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 13-JUN-13
Case 2) Autobackup in non-FRA location – non OMF
RMAN> startup nomount force
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file ‘/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initgavin.ora’
starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started
Total System Global Area     158662656 bytes
Fixed Size                     2226456 bytes
Variable Size                104859368 bytes
Database Buffers              46137344 bytes
Redo Buffers                   5439488 bytes
RMAN> set DBID=2968723077
executing command: SET DBID
RMAN>  run {
2> set CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘/u01/backup/%F’;
3> restore spfile from autobackup;
4> }
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 13-JUN-13
using channel ORA_DISK_1
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130613
channel ORA_DISK_1: AUTOBACKUP found: ‘/u01/backup/c-2968723077-20130613-01
channel ORA_DISK_1: restoring spfile from AUTOBACKUP ‘/u01/backup/c-2968723077-20130613-01
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 13-JUN-13
Case 3) Total Disaster Recovery ( restore by specifying the backup file name)
In this scenario, the entire database server has crashed and we have lost the entire database files including the SPFILE.
A new server has been provisioned and all the latest backup files have been restored from tape to a location on disk /u01/backup.
In this case the backup files are OMF and we have been able to identify the SPFILE backup file from the ‘s’ keyword in the backup file name
RMAN> restore spfile from ‘/u01/backup/o1_mf_s_818007851_8vlsdd3n_.bkp’;
Starting restore at 13-JUN-13
using channel ORA_DISK_1
channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/backup/o1_mf_s_818007851_8vlsdd3n_.bkp
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 13-JUN-13
Case 4) Total Disaster Recovery ( restore by specifying restore from AUTOBACKUP)
In this case, the scenario is the same as the above.
But what happens if we want to use the AUTOBACKUP command to restore the spfile because many backup files have been restored and we are not sure which backup file contains the SPFILE backup.
But what happens in this case when we try to restore the SPFILE from the location where the backup has been restored.
RMAN>  run {
2> set CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘/u01/backup/%F’;
3> restore spfile from autobackup;
4> }
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 17-JUN-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=171 device type=DISK
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130617
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130616
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130615
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130614
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130613
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130612
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130611
channel ORA_DISK_1: no AUTOBACKUP in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/17/2013 15:29:58
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
So to work around this, we tried to fool RMAN by creating the directory structure when using a FRA.
We create the directory structure GAVIN/autobackup/2013_06_17 under the to level location /u01/backup and copy the backup pieces to this location.
-bash-3.2$ cd /u01/backup
-bash-3.2$ mkdir -p GAVIN/autobackup/2013_06_17
-bash-3.2$ mv /u01/backup/o1* /u01/backup/GAVIN/autobackup/2013_06_17
Now we are able to restore the SPFILE from autobackup!
RMAN>  run {
2> restore spfile from autobackup db_recovery_file_dest=’/u01/backup/’ db_name=’GAVIN’;
3> }
Starting restore at 17-JUN-13
using channel ORA_DISK_1
recovery area destination: /u01/backup/
database name (or database unique name) used for search: GAVIN
channel ORA_DISK_1: AUTOBACKUP /u01/backup/GAVIN/autobackup/2013_06_17/o1_mf_s_818349778_8vx79lo6_.bkp found in the recovery area
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130617
channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/backup/GAVIN/autobackup/2013_06_17/o1_mf_s_818349778_8vx79lo6_.bkp
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 17-JUN-13

RECOVERY SCENARIO: Complete loss of all database files including SPFILE using RMAN

RECOVERY SCENARIO: Complete loss of all database files including SPFILE using RMAN 
Database Details
——————
Database Name=OPSDBA
Machine Name=ITLINUXDEVBLADE07
DBID=1499754868 (select dbid from v$database)
SIMULATING CRASH
————————
opsdba:/u01/ORACLE/opsdba>ls -l
total 1948980
drwxr-x—    2 oracle  dba          4096 Feb 12 13:35 arch
-rw-r—–    1 oracle   dba       7389184 Feb 12 13:57 control01.ctl
-rw-r—–    1 oracle   dba       7389184 Feb 12 13:57 control02.ctl
-rw-r—–    1 oracle   dba       7389184 Feb 12 13:57 control03.ctl
-rw-r—–    1 oracle   dba      104865792 Feb 12 13:57 drtbs1.dbf
-rw-r—–    1 oracle   dba      104865792 Feb 12 13:57 drtbs2.dbf
drwxr-xr-x    2 oracle  dba          4096 Feb 12 13:55 recovery
-rw-r—–    1 oracle   dba      52429312 Feb 12 13:34 redo01.log
-rw-r—–    1 oracle   dba      52429312 Feb 12 13:35 redo02.log
-rw-r—–    1 oracle   dba      52429312 Feb 12 13:57 redo03.log
-rw-r—–    1 oracle   dba      367009792 Feb 12 13:57 sysaux01.dbf
-rw-r—–    1 oracle   dba      513810432 Feb 12 13:57 system01.dbf
-rw-r—–    1 oracle   dba      20979712 Jan 30 12:32 temp01.dbf
-rw-r—–    1 oracle   dba       5251072 Feb 12 13:57 undonew.dbf
-rw-r—–    1 oracle   dba      634396672 Feb 12 13:57 undotbs01.dbf
-rw-r—–    1 oracle   dba      31465472 Feb 12 13:57 users01.dbf
-rw-r—–    1 oracle   dba      10493952 Feb 12 13:57 users02.dbf
-rw-r—–    1 oracle   dba      10493952 Feb 12 13:57 users03.dbf
-rw-r—–    1 oracle   dba      10493952 Feb 12 13:57 users04.dbf
-rw-r—–    1 oracle   dba      10493952 Feb 12 13:57 users05.dbf
-rw-r—–    1 oracle   dba       5251072 Feb 12 13:57 users06.dbf
-rw-r—–    1 oracle   dba       5251072 Feb 12 13:57 users07.dbf
opsdba:/u01/ORACLE/opsdba>rm *.dbf
                                                       *FILES REMOVED
opsdba:/u01/ORACLE/opsdba>ls -l *.dbf
ls: *.dbf: No such file or directory
opsdba:/opt/oracle/product10gpr2/dbs>mv spfileopsdba.ora spfileopsdba.org
opsdba:/opt/oracle/product10gpr2/dbs>ls -lt spfile*   *SPFILE REMOVED
-rw-r—–    1 oracle   dba          2560 Feb 12 13:06 spfileopsdba.org
-rw-r—–    1 oracle   dba          2560 Jan 23 11:32 spfilerman10d.ora
-rw-r—–    1 oracle   dba          4608 Dec 18 09:28 spfileerpmig.ora
-rw-r—–    1 oracle   dba          3584 Nov 21 08:22 spfileprimary.ora
-rw-r—–    1 oracle   dba          3584 Oct 22 14:32 spfilebozo.ora
-rw-r—–    1 oracle   dba          4608 Oct  8 15:24 spfilestreams2.ora
-rw-r—–    1 oracle   dba          2560 Oct  1 11:46 spfilevaultdb.ora
THE FOLLOWING STEPS WILL OUTLINE THE RECOVERY PROCESS:
Step 1:   RECOVERY OF SPFILE
Create spfile.rcv as:
set dbid= 1499754868
run {
startup nomount force  ;
 };
opsdba:/u01/ORACLE/opsdba/recovery>rman target / catalog rman10/rman10@rman10p cmdfile=spfile.rcv
Recovery Manager: Release 10.2.0.2.0 – Production on Mon Feb 12 14:02:26 2007
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to target database (not started)
connected to recovery catalog database
RMAN>
executing command: SET DBID
database name is “OPSDBA” and DBID is 1499754868
Oracle instance started
Total System Global Area     264241152 bytes
Fixed Size                     2070416 bytes
Variable Size                113248368 bytes
Database Buffers             142606336 bytes
Redo Buffers                   6316032 bytes
Recovery Manager complete.
opsdba:/u01/ORACLE/opsdba/recovery>
Now restore the spfile
set dbid=1499754868
run {
allocate channel ch1 type ‘sbt_tape’ parms ‘ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opsdbad.opt)’;
restore spfile ;
release channel ch1 ;
}
Step 2:   RESTORE OF CONTROLFILES
Same Steps as spfile with the restore command changed. So the new script is
set dbid=1499754868
run {
allocate channel ch1 type ‘sbt_tape’ parms ‘ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opsdbad.opt)’;
restore controlfile ;
release channel ch1 ;
}
Step 3:   RESTORE OF DATABASE
Since you have the controlfiles now mount the database
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> alter database mount;
Database altered.
Now get the log sequence number of the database from the catalog database:
select sequence# from rc_backup_redolog where db_name=’OPSDBA’;
RMAN> run {
2> allocate channel ch1 type ‘sbt_tape’ parms ‘ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opsdbad.opt)’;
3> restore database ;
4> recover database until logseq=6;           — GOT FROM THE ABOVE QUERY
5> release channel ch1 ;
6> }
7>
allocated channel: ch1
channel ch1: sid=156 devtype=SBT_TAPE
channel ch1: Data Protection for Oracle: version 5.2.4.0
Starting restore at 12-FEB-07
channel ch1: starting datafile backupset restore
channel ch1: specifying datafile(s) to restore from backup set
Step 4:   alter database open resetlogs;
ENJOY