Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

Rasul Allah (sal Allahu alaihi wa sallam) said: "Restore the trusts of those who trust you, and deal not falsely with him who deals falsely with you." [Abu Dawud, Tirmidhi]

Search This Blog

Thursday, January 26, 2012

Database COLD backup & Restore from TAPE

Here I want to duplicate the PROD database to QA.
Here my PROD db is not a live Prod database instead it is a reporting database.

There are some limitations and restrictions like REPORTING DB is in no archivelog mode and no disk space to take the backup and has given permission to take down the DB for a cold backup to TAPE.


DB Backup on the source host:

PROD_HOST:/
#!/bin/ksh
export ORACLE_HOME=/fin04/u0001/oracle/product/10.2.0/db_1
export ORACLE_SID=PRODDB
export TODAY=`date '+%Y%m%d'`
export TIME=`date '+%H%M%S'`
$ORACLE_HOME/bin/rman msglog Backup_PRODDB_COLD.${TODAY}_${TIME}.log << EOF
connect target /
run {
shutdown immediate;
startup mount;
allocate channel ch01 type sbt_tape;
allocate channel ch02 type sbt_tape;
allocate channel ch03 type sbt_tape;
allocate channel ch04 type sbt_tape;
allocate channel ch05 type sbt_tape;
allocate channel ch06 type sbt_tape;
allocate channel ch07 type sbt_tape;
allocate channel ch08 type sbt_tape;
allocate channel ch09 type sbt_tape;
allocate channel ch10 type sbt_tape;
send 'NB_ORA_POLICY=PRODDB_ORA_CDC_PROD,NB_ORA_CLIENT=PROD_HOST,NB_ORA_SCHED=full';
backup
INCREMENTAL LEVEL=0
database ;
backup current controlfile;
sql 'alter database open';
release channel ch01;
release channel ch02;
release channel ch03;
release channel ch04;
release channel ch05;
release channel ch06;
release channel ch07;
release channel ch08;
release channel ch09;
release channel ch10;
}
list incarnation of database;
exit
EOF


:- Backup completed:

RMAN>
piece handle=6pn19kt1_1_1 tag=TAG20120121T024033 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch01: backup set complete, elapsed time: 00:00:58
Finished backup at 21-JAN-12

Starting Control File and SPFILE Autobackup at 21-JAN-12
piece handle=c-3861913925-20120121-00 comment=API Version 2.0,MMS Version 5.0.0.0
Finished Control File and SPFILE Autobackup at 21-JAN-12


List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 PRODDB 3861913925 CURRENT 6574375077 29-OCT-04






DB Restore on the destination/new host:-
==========================================

unixhost(PRODDB) /export/home/oracle
>rman

Recovery Manager: Release 10.2.0.4.0 - Production on Sat Jan 21 17:15:54 2012

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

RMAN> connect target /

connected to target database: PRODDB (not mounted)

RMAN> set dbid=3861913925 ;

executing command: SET DBID

RMAN> run{
2> allocate channel ch01 type sbt_tape;
3> send 'NB_ORA_POLICY=PRODDB_ORA_CDC_PROD,NB_ORA_CLIENT=PROD_HOST-bn';
4> restore controlfile from autobackup; <---- We have to use autobackup for TAPE
5> }

allocated channel: ch01
channel ch01: sid=544 devtype=SBT_TAPE
channel ch01: Veritas NetBackup for Oracle - Release 6.5 (2010042405)

sent command to channel: ch01

Starting restore at 21-JAN-12

channel ch01: looking for autobackup on day: 20120121

channel ch01: autobackup found: c-3861913925-20120121-00
channel ch01: control file restore from autobackup complete
output filename=+QADB_REDO_01/PRODDB/controlfile/current.264.773170015
output filename=+QADB_REDO_02/PRODDB/controlfile/current.266.773170019
Finished restore at 21-JAN-12
released channel: ch01

RMAN>
RMAN>

=====mount the database with the restore controlfile=======

RMAN> sql 'alter database mount';

using target database control file instead of recovery catalog
sql statement: alter database mount

===Start the restore:

#!/bin/ksh
export ORACLE_HOME=/fin03/u0001/oracle/product/10.2.0/db_1
export ORACLE_SID=MYDB
NLS_DATE_FORMAT="DD-MON-RRRR HH24:MI:SS"
export NLS_DATE_FORMAT
/fin03/u0001/oracle/product/10.2.0/db_1/bin/rman debug trace db_restore_trace1.log msglog db_restore.log append< { run
allocate channel ch01 type disk;
crosscheck backup;
delete noprompt expired backup;
}

Now:
===

Started the restore again with trace on just in case:-
========================================================


RMAN-08511: piece handle=6on195dc_1_1 tag=TAG20120120T221549
RMAN-08180: channel ch09: restore complete, elapsed time: 06:19:06
RMAN-08023: channel ch05: restored backup piece 1
RMAN-08511: piece handle=6kn195da_1_1 tag=TAG20120120T221549
RMAN-08180: channel ch05: restore complete, elapsed time: 06:28:23
RMAN-08023: channel ch04: restored backup piece 1
RMAN-08511: piece handle=6ln195db_1_1 tag=TAG20120120T221549
RMAN-08180: channel ch04: restore complete, elapsed time: 06:32:18
RMAN-03091: Finished restore at 23-JAN-2012 02:05:25

RMAN-08031: released channel: ch01
RMAN-08031: released channel: ch03


After the crosscheck and cleanup. RMAN restored 2TB database in less than 7hrs.

In my Restore script I forgot to include "switch datafile all" at the end.
Since we are using "set newname for datafile 1 to NEW" I should have added "switch datafile all"

After restore:-
==================================

RMAN> run {
2> allocate channel ch01 type disk;
3> switch datafile all;
4> }


This didn't work since the channels used for restore has been released and my restore session has been ended.



But after the restore we can do this by going to RMAN>

While database in mount state and all the files has been restored:

RMAN>
RMAN> catalog start with '+QADB_DATA_01/QADB/datafile';
switch database to copy;

RMAN>

This will only work is ALL the datafiles are restored, otherwise the SWITCH DATABASE TO COPY will fail.


Before you open the database:
disable any change tracking


SQL>ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;


Now:-

SQL>ALTER DATABASE OPEN;

Since this is arestore from COLD backup there is no media recovery and hence no "resetlogs option"






At this point database is UP and running:



Stage-2:-

Now I want to rename this Database to something else. I am using NID to change the DBNAME and DBID of the restored database.


unixhost(PRODDB) /export/home/oracle
>tnsping PRODDB1

TNS Ping Utility for Solaris: Version 10.2.0.4.0 - Production on 24-JAN-2012 07:55:08

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:
/fin03/u0001/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = unixhost-vip)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = PRODDB.TWCABLE.COM) (INSTANCE_NAME = PRODDB1)))
OK (10 msec)




unixhost(PRODDB) /export/home/oracle
>nid TARGET=SYS/s09s20y7@PRODDB1 DBNAME=QADB

DBNEWID: Release 10.2.0.4.0 - Production on Tue Jan 24 07:56:39 2012

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

Connected to database PRODDB (DBID=3861913925)

Connected to server version 10.2.0

Control Files in database:
+QADB_REDO_01/PRODDB/controlfile/current.264.773170015
+QADB_REDO_02/PRODDB/controlfile/current.266.773170019

Change database ID and database name PRODDB to QADB? (Y/[N]) => Y

Proceeding with operation
Changing database ID from 3861913925 to 340462486
Changing database name from PRODDB to QADB
Control File +QADB_REDO_01/PRODDB/controlfile/current.264.773170015 - modified
Control File +QADB_REDO_02/PRODDB/controlfile/current.266.773170019 - modified
Datafile +QADB_DATA_01/PRODDB/datafile/system.416.773331423 - dbid changed, wrote new name
Datafile +QADB_DATA_01/PRODDB/datafile/ps_cm_acctg_line_idx1.417.773315313 - dbid changed, wrote new name
Datafile +QADB_DATA_01/PRODDB/datafile/aart_data_lg.373.773319401 - dbid changed, wrote new name
Datafile +QADB_DATA_01/PRODDB/datafile/amlarge.363.773335877 - dbid changed, wrote new name
Datafile +QADB_DATA_01/PRODDB/datafile/amapp.496.773334279 - dbid changed, wrote new name
Datafile +QADB_DATA_01/PRODDB/datafile/amlarge.340.773315185 - dbid changed, wrote new name

Datafile +QADB_DATA_01/PRODDB/datafile/pcapp.508.773335933 - dbid changed, wrote new name
Datafile +QADB_DATA_01/PRODDB/datafile/pclarge.401.773329153 - dbid changed, wrote new name
Datafile +QADB_DATA_01/PRODDB/datafile/perfstat.468.773331615 - dbid changed, wrote new name
Datafile +QADB_DATA_01/PRODDB/datafile/poapp.456.773315299 - dbid changed, wrote new name
Datafile +QADB_DATA_01/PRODDB/datafile/polarge.267.773327515 - dbid changed, wrote new name

Control File +QADB_REDO_01/PRODDB/controlfile/current.264.773170015 - dbid changed, wrote new name
Control File +QADB_REDO_02/PRODDB/controlfile/current.266.773170019 - dbid changed, wrote new name
Instance shut down

Database name changed to QADB.
Modify parameter file and generate a new password file before restarting.
Database ID for database QADB changed to 340462486.
All previous backups and archived redo logs for this database are unusable.
Database is not aware of previous backups and archived logs in Recovery Area.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and ID.
DBNEWID - Completed succesfully.


***
Change the DBNAME and other log/dump directories that has the old name from the parameter file.


Here I have the parameter file already setup for the clone so I am just changing the control_file location in my clone parameter file.

*.control_files='+QADB_REDO_01/PRODDB/controlfile/current.264.773170015','+QADB_REDO_02/PRODDB/controlfile/current.266.773170019'

ORA-1237 signalled during: ALTER DATABASE DATAFILE

When I tried to resize the datafile, I was getting the below errors even though we have plenty of space available in ASM.


Mon Oct 31 13:12:52 2011
ALTER DATABASE DATAFILE '+DBNAME_DATA_01/DBNAME2/datafile/bipsched.280.751030175' RESIZE 120M
ORA-1237 signalled during: ALTER DATABASE DATAFILE '+DBNAME_DATA_01/DBNAME2/datafile/bipsched.280.751030175' RESIZE 120M...
ORA-17505: ksfdrsz:1 Failed to resize file to size 3168 blocks
ORA-15061: ASM operation not supported [41]
~
~



I can create a new tablespace as below but cannot resize any datafile.

SQL> create tablespace test;

Tablespace created.

SQL> drop tablespace test;

Tablespace dropped.


ASM Diskgroup information ..


DiskGroup Name %Used TOTAL_MB FREE_MB
-------------------- ----- ------------ ------------
DBNAME_DATA_01 58 1,048,000 439,612


SQL> select group_number, disk_number, total_mb, free_mb from v$asm_disk order by 1;

GROUP_NUMBER DISK_NUMBER TOTAL_MB FREE_MB
------------ ----------- ---------- ----------
1 11 131000 81944
1 12 131000 55811
1 10 131000 35444
1 9 131000 16276
1 8 131000 42609
1 7 131000 62822


29 rows selected.


ASM log:
======================

NOTE: ASM client DBNAME:DBNAME disconnected unexpectedly.
NOTE: check client alert log.
NOTE: Process state recorded in trace file /ora01/u0001/oracle/diag/asm/+asm/+ASM/trace/+ASM_ora_5197.trc
~
~


*** 2011-10-31 13:06:42.127
kggpnpSIHAGetItem 2 = /dev/oracle/*
KGGPNP_SIHA: attribute value for 'ASM_DISKSTRING' is '/dev/oracle/*'

*** 2011-10-31 13:11:07.151
kggpnpSIHAGetItem 2 = /dev/oracle/*

*** 2011-10-31 13:11:11.711
KGGPNP_SIHA: attribute value for 'ASM_DISKSTRING' is '/dev/oracle/*'
kggpnpSIHAGetItem 2 = /dev/oracle/*

*** 2011-10-31 13:11:46.464
KGGPNP_SIHA: attribute value for 'ASM_DISKSTRING' is '/dev/oracle/*'
kggpnpSIHAGetItem 2 = /dev/oracle/*

No much useful info from the ASM logs:


Tried rebalance as suggested by some on the oracle forums:
============================================================

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Automatic Storage Management option

SQL> alter diskgroup DBNAME_DATA_01 rebalance power 11;

Diskgroup altered.

SQL> select sysdate, OPERATION,STATE, POWER, ACTUAL, SOFAR, EST_WORK,EST_RATE, EST_MINUTES
from v$asm_operation;
2
SYSDATE OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE
--------- ----- ---- ---------- ---------- ---------- ---------- ----------
EST_MINUTES
-----------
31-OCT-11 REBAL RUN 11 11 192 103187 3952
26


SQL> /

SYSDATE OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE
--------- ----- ---- ---------- ---------- ---------- ---------- ----------
EST_MINUTES
-----------
31-OCT-11 REBAL RUN 11 11 1272 103592 4058
25


SQL> set linesize 1000
SQL> /

SYSDATE OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES
--------- ----- ---- ---------- ---------- ---------- ---------- ---------- -----------
31-OCT-11 REBAL RUN 11 11 3192 107444 6249 16




In MOS:

Resolution:

ORA-15061 reported while doing a file operation with 11.1 or 11.2 ASM after PSU applied in database home [ID 1070880.1]

and Indeed our ASM and DB homes are different and we recently applied PSU patch to our DBHOME but not to the ASM home.
So as per the above note it is requirement to apply the PSU on both the homes.

Applying the patch:

SQL> shutdown immediate;


unixhost(+ASM) /ora_backup/u0001/patches/PSU/9952216
>/ora_backup/u0001/patches/OPatch/OPatch/opatch napply -skip_subset -skip_duplicate
Invoking OPatch 11.2.0.1.6

Oracle Interim Patch Installer version 11.2.0.1.6
Copyright (c) 2011, Oracle Corporation. All rights reserved.

UTIL session

Oracle Home : /ora01/u0001/oracle/11.2.0/grid
Central Inventory : /ora01/u0001/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 11.2.0.1.6
OUI version : 11.2.0.1.0
Log file location : /ora01/u0001/oracle/11.2.0/grid/cfgtoollogs/opatch/opatch2011-11-01_17-33-11PM.log

Verifying environment and performing prerequisite checks...
Checking skip_duplicate
Checking skip_subset
OPatch continues with these patches: 9952216

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Is the local system ready for patching? [y|n]
y

User Responded with: Y
Backing up files...
Applying interim patch '9952216' to OH '/ora01/u0001/oracle/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.oraolap, 11.2.0.1.0 ] , [ oracle.precomp.common, 11.2.0.1.0 ] not present in the Oracle Home or a higher version is found.



Patches 9952216 successfully applied.

After aplying the patch.

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
DBNAME2


SQL> alter database datafile '+DBNAME_DATA_01/DBNAME2/datafile/undotbs1.272.750861081' resize 850M;

Database altered.

Thursday, January 19, 2012

RMAN DISK CONSISTENT (COLD) Backup & Restore

COLD BACKUP SCRIPT:
===========================

#!/bin/ksh
export TODAY=`date '+%Y%m%d'`
export TIME=`date '+%H%M%S'`
export ORACLE_HOME=/hr01/u0001/oracle/product/11.1.0/db_1
export LEVEL=F
export ORACLE_SID=DBNAME
$ORACLE_HOME/bin/rman msglog /ora_backup/u0001/DBNAME/DBNAME_Backup_${LEVEL}.${TODAY}_${TIME}.log << EOF
connect catalog rcat/@CATALOGDB;
connect target /
run {
shutdown immediate;
startup mount;
allocate channel dsk1 type disk format '/ora_backup/u0001/${ORACLE_SID}/BACKUP_${LEVEL}_${ORACLE_SID}_${TODAY}_${TIME}_s%s_p%p_%u';
allocate channel dsk2 type disk format '/ora_backup/u0002/${ORACLE_SID}/BACKUP_${LEVEL}_${ORACLE_SID}_${TODAY}_${TIME}_s%s_p%p_%u';
allocate channel dsk3 type disk format '/ora_backup/u0003/${ORACLE_SID}/BACKUP_${LEVEL}_${ORACLE_SID}_${TODAY}_${TIME}_s%s_p%p_%u';
allocate channel dsk4 type disk format '/ora_backup/u0004/${ORACLE_SID}/BACKUP_${LEVEL}_${ORACLE_SID}_${TODAY}_${TIME}_s%s_p%p_%u';
sql 'select sysdate from dual';
backup
INCREMENTAL LEVEL=0
database ;
backup current controlfile;
sql 'alter database open';
release channel dsk1;
release channel dsk2;
release channel dsk3;
release channel dsk4;
}
list incarnation of database;
exit
EOF
#
#


COLD BACKUP LOG
===========================

oracle@unixhost(DBNAME):/ora_backup/u0001/DBNAME>vi DBNAME_Backup_F.20120118_114848.log
"DBNAME_Backup_F.20120118_114848.log" 321 lines, 19850 characters

Recovery Manager: Release 11.1.0.7.0 - Production on Wed Jan 18 11:48:49 2012

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

RMAN>
connected to recovery catalog database

RMAN>
connected to target database: DBNAME (DBID=945596454)

RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18>
starting full resync of recovery catalog
full resync complete
database closed
database dismounted
Oracle instance shut down

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area 8353644544 bytes

Fixed Size 2104088 bytes
Variable Size 2013267176 bytes
Database Buffers 6308233216 bytes
Redo Buffers 30040064 bytes

allocated channel: dsk1
channel dsk1: SID=1308 device type=DISK

allocated channel: dsk2
channel dsk2: SID=1307 device type=DISK

allocated channel: dsk3
channel dsk3: SID=1306 device type=DISK

allocated channel: dsk4
channel dsk4: SID=1305 device type=DISK

sql statement: select sysdate from dual

Starting backup at 18-JAN-12
channel dsk1: starting incremental level 0 datafile backup set
channel dsk1: specifying datafile(s) in backup set
input datafile file number=00142 name=/hr01/u0007/oradata/DBNAME/psindex_01.dbf
input datafile file number=00002 name=/hr01/u0004/oradata/DBNAME/sysaux_01.dbf
input datafile file number=00150 name=/hr01/u0008/oradata/DBNAME/psindex_09.dbf
input datafile file number=00074 name=/hr01/u0005/oradata/DBNAME/hrlarge_01.dbf
channel dsk1: starting piece 1 at 18-JAN-12
channel dsk2: starting incremental level 0 datafile backup set
channel dsk2: specifying datafile(s) in backup set
input datafile file number=00143 name=/hr01/u0007/oradata/DBNAME/psindex_02.dbf
input datafile file number=00109 name=/hr01/u0004/oradata/DBNAME/pttbl_01.dbf
input datafile file number=00151 name=/hr01/u0008/oradata/DBNAME/psindex_10.dbf
input datafile file number=00122 name=/hr01/u0003/oradata/DBNAME/pylarge_01.dbf
channel dsk2: starting piece 1 at 18-JAN-12
channel dsk3: starting incremental level 0 datafile backup set
channel dsk3: specifying datafile(s) in backup set
input datafile file number=00144 name=/hr01/u0007/oradata/DBNAME/psindex_03.dbf
input datafile file number=00011 name=/hr01/u0006/oradata/DBNAME/bnlarge_01.dbf
input datafile file number=00110 name=/hr01/u0004/oradata/DBNAME/pttbl_02.dbf
input datafile file number=00152 name=/hr01/u0008/oradata/DBNAME/psindex_11.dbf
channel dsk3: starting piece 1 at 18-JAN-12
channel dsk4: starting incremental level 0 datafile backup set
channel dsk4: specifying datafile(s) in backup set
input datafile file number=00145 name=/hr01/u0007/oradata/DBNAME/psindex_04.dbf
input datafile file number=00075 name=/hr01/u0005/oradata/DBNAME/hrlarge_02.dbf
input datafile file number=00123 name=/hr01/u0003/oradata/DBNAME/pylarge_02.dbf
input datafile file number=00111 name=/hr01/u0006/oradata/DBNAME/pttbl_03.dbf
channel dsk4: starting piece 1 at 18-JAN-12
channel dsk1: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0001/DBNAME/BACKUP_F_DBNAME_20120118_114848_s88_p1_2on12nua tag=TAG20120118T114929 comment=NONE
channel dsk1: backup set complete, elapsed time: 00:06:15
channel dsk1: starting incremental level 0 datafile backup set
channel dsk1: specifying datafile(s) in backup set
input datafile file number=00124 name=/hr01/u0003/oradata/DBNAME/pylarge_03.dbf
input datafile file number=00112 name=/hr01/u0006/oradata/DBNAME/pttbl_04.dbf
input datafile file number=00126 name=/hr01/u0004/oradata/DBNAME/pylarge_05.dbf
input datafile file number=00154 name=/hr01/u0008/oradata/DBNAME/psindex_13.dbf
channel dsk1: starting piece 1 at 18-JAN-12
channel dsk2: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0002/DBNAME/BACKUP_F_DBNAME_20120118_114848_s89_p1_2pn12nua tag=TAG20120118T114929 comment=NONE
channel dsk2: backup set complete, elapsed time: 00:06:15
channel dsk2: starting incremental level 0 datafile backup set
channel dsk2: specifying datafile(s) in backup set
input datafile file number=00147 name=/hr01/u0007/oradata/DBNAME/psindex_06.dbf
input datafile file number=00096 name=/hr01/u0005/oradata/DBNAME/psdefault_01.dbf
input datafile file number=00095 name=/hr01/u0005/oradata/DBNAME/pscognos_01.dbf
input datafile file number=00077 name=/hr01/u0005/oradata/DBNAME/hrsapp_01.dbf
input datafile file number=00120 name=/hr01/u0005/oradata/DBNAME/py0lrg_01.dbf
input datafile file number=00006 name=/hr01/u0005/oradata/DBNAME/adapp_01.dbf
input datafile file number=00137 name=/hr01/u0005/oradata/DBNAME/tlapp_01.dbf
input datafile file number=00015 name=/hr01/u0005/oradata/DBNAME/cuaudit_01.dbf
input datafile file number=00043 name=/hr01/u0005/oradata/DBNAME/eolarge_01.dbf
input datafile file number=00127 name=/hr01/u0003/oradata/DBNAME/pylarge_06.dbf
input datafile file number=00113 name=/hr01/u0006/oradata/DBNAME/pttbl_05.dbf
channel dsk2: starting piece 1 at 18-JAN-12
channel dsk4: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0004/DBNAME/BACKUP_F_DBNAME_20120118_114848_s91_p1_2rn12nua tag=TAG20120118T114929 comment=NONE
channel dsk4: backup set complete, elapsed time: 00:06:31
channel dsk4: starting incremental level 0 datafile backup set
channel dsk4: specifying datafile(s) in backup set
input datafile file number=00158 name=/hr01/u0004/oradata/DBNAME/sysaux_02.dbf
input datafile file number=00003 name=/hr01/u0081/oradata/DBNAME/undo1_01.dbf
input datafile file number=00155 name=/hr01/u0008/oradata/DBNAME/psindex_14.dbf
input datafile file number=00148 name=/hr01/u0007/oradata/DBNAME/psindex_07.dbf
channel dsk4: starting piece 1 at 18-JAN-12
channel dsk3: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0003/DBNAME/BACKUP_F_DBNAME_20120118_114848_s90_p1_2qn12nua tag=TAG20120118T114929 comment=NONE
channel dsk3: backup set complete, elapsed time: 00:07:16
channel dsk3: starting incremental level 0 datafile backup set
channel dsk3: specifying datafile(s) in backup set
input datafile file number=00114 name=/hr01/u0006/oradata/DBNAME/pttbl_06.dbf
input datafile file number=00157 name=/hr01/u0081/oradata/DBNAME/undo1_02.dbf
input datafile file number=00156 name=/hr01/u0008/oradata/DBNAME/psindex_15.dbf
input datafile file number=00149 name=/hr01/u0007/oradata/DBNAME/psindex_08.dbf
channel dsk3: starting piece 1 at 18-JAN-12
channel dsk4: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0004/DBNAME/BACKUP_F_DBNAME_20120118_114848_s94_p1_2un12oah tag=TAG20120118T114929 comment=NONE
channel dsk4: backup set complete, elapsed time: 00:04:00
channel dsk4: starting incremental level 0 datafile backup set
channel dsk4: specifying datafile(s) in backup set
input datafile file number=00125 name=/hr01/u0004/oradata/DBNAME/pylarge_04.dbf
input datafile file number=00153 name=/hr01/u0008/oradata/DBNAME/psindex_12.dbf
input datafile file number=00146 name=/hr01/u0007/oradata/DBNAME/psindex_05.dbf
input datafile file number=00097 name=/hr01/u0005/oradata/DBNAME/psimage_01.dbf
input datafile file number=00010 name=/hr01/u0005/oradata/DBNAME/bnapp_01.dbf
input datafile file number=00129 name=/hr01/u0005/oradata/DBNAME/saapp_01.dbf
channel dsk4: starting piece 1 at 18-JAN-12
channel dsk3: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0003/DBNAME/BACKUP_F_DBNAME_20120118_114848_s95_p1_2vn12obu tag=TAG20120118T114929 comment=NONE
channel dsk3: backup set complete, elapsed time: 00:05:00
channel dsk3: starting incremental level 0 datafile backup set
channel dsk3: specifying datafile(s) in backup set
input datafile file number=00159 name=/hr01/u0003/oradata/DBNAME/pylarge_07.dbf
input datafile file number=00115 name=/hr01/u0005/oradata/DBNAME/pttbl_07.dbf
input datafile file number=00050 name=/hr01/u0004/oradata/DBNAME/eplarge_01.dbf
input datafile file number=00005 name=/hr01/u0004/oradata/DBNAME/aalarge_01.dbf
input datafile file number=00054 name=/hr01/u0004/oradata/DBNAME/faapp_01.dbf
input datafile file number=00080 name=/hr01/u0004/oradata/DBNAME/hrswork_01.dbf
input datafile file number=00132 name=/hr01/u0004/oradata/DBNAME/srapp_01.dbf
input datafile file number=00070 name=/hr01/u0004/oradata/DBNAME/hrapp6_01.dbf
input datafile file number=00101 name=/hr01/u0004/oradata/DBNAME/ptapp_01.dbf
input datafile file number=00022 name=/hr01/u0004/oradata/DBNAME/eoapp_01.dbf
input datafile file number=00128 name=/hr01/u0004/oradata/DBNAME/pywork_01.dbf
input datafile file number=00014 name=/hr01/u0004/oradata/DBNAME/coapp_01.dbf
input datafile file number=00058 name=/hr01/u0004/oradata/DBNAME/fsapp_01.dbf
input datafile file number=00119 name=/hr01/u0004/oradata/DBNAME/pvapp_01.dbf
input datafile file number=00136 name=/hr01/u0004/oradata/DBNAME/taapp_01.dbf
input datafile file number=00030 name=/hr01/u0004/oradata/DBNAME/eodsapp_01.dbf
input datafile file number=00066 name=/hr01/u0004/oradata/DBNAME/hrapp2_01.dbf
input datafile file number=00018 name=/hr01/u0004/oradata/DBNAME/cularg3_01.dbf
input datafile file number=00046 name=/hr01/u0004/oradata/DBNAME/eopplrg_01.dbf
input datafile file number=00026 name=/hr01/u0004/oradata/DBNAME/eocmlrg_01.dbf
input datafile file number=00034 name=/hr01/u0004/oradata/DBNAME/eoecwrk_01.dbf
input datafile file number=00038 name=/hr01/u0004/oradata/DBNAME/eoewlrg_01.dbf
input datafile file number=00042 name=/hr01/u0004/oradata/DBNAME/eoiuwrk_01.dbf
input datafile file number=00009 name=/hr01/u0004/oradata/DBNAME/bdapp_01.dbf
input datafile file number=00062 name=/hr01/u0004/oradata/DBNAME/gpdeapp_01.dbf
input datafile file number=00084 name=/hr01/u0004/oradata/DBNAME/omapp_01.dbf
input datafile file number=00088 name=/hr01/u0004/oradata/DBNAME/pclarge_01.dbf
input datafile file number=00092 name=/hr01/u0004/oradata/DBNAME/poapp_01.dbf
input datafile file number=00105 name=/hr01/u0004/oradata/DBNAME/ptlock_01.dbf
input datafile file number=00007 name=/hr01/u0006/oradata/DBNAME/amapp_01.dbf
input datafile file number=00048 name=/hr01/u0006/oradata/DBNAME/eotplrg_01.dbf
input datafile file number=00052 name=/hr01/u0006/oradata/DBNAME/erlarge_01.dbf
input datafile file number=00060 name=/hr01/u0006/oradata/DBNAME/glapp_01.dbf
input datafile file number=00094 name=/hr01/u0006/oradata/DBNAME/psaudit_01.dbf
channel dsk3: starting piece 1 at 18-JAN-12
channel dsk1: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0001/DBNAME/BACKUP_F_DBNAME_20120118_114848_s92_p1_2sn12oa1 tag=TAG20120118T114929 comment=NONE
channel dsk1: backup set complete, elapsed time: 00:06:47
channel dsk1: starting incremental level 0 datafile backup set
channel dsk1: specifying datafile(s) in backup set
input datafile file number=00012 name=/hr01/u0005/oradata/DBNAME/bnlarge_02.dbf
input datafile file number=00001 name=/hr01/u0003/oradata/DBNAME/system_01.dbf
input datafile file number=00100 name=/hr01/u0003/oradata/DBNAME/ptamsg_01.dbf
input datafile file number=00061 name=/hr01/u0003/oradata/DBNAME/gpapp_01.dbf
input datafile file number=00139 name=/hr01/u0003/oradata/DBNAME/tlwork_01.dbf
input datafile file number=00013 name=/hr01/u0003/oradata/DBNAME/ccapp_01.dbf
input datafile file number=00108 name=/hr01/u0003/oradata/DBNAME/ptrpts_01.dbf
input datafile file number=00004 name=/hr01/u0003/oradata/DBNAME/aaapp_01.dbf
input datafile file number=00025 name=/hr01/u0003/oradata/DBNAME/eocmapp_01.dbf
input datafile file number=00065 name=/hr01/u0003/oradata/DBNAME/hrapp1_01.dbf
input datafile file number=00057 name=/hr01/u0003/oradata/DBNAME/fglarge_01.dbf
input datafile file number=00073 name=/hr01/u0003/oradata/DBNAME/hrlarg1_01.dbf
input datafile file number=00079 name=/hr01/u0003/oradata/DBNAME/hrslarge_01.dbf
input datafile file number=00008 name=/hr01/u0003/oradata/DBNAME/avapp_01.dbf
input datafile file number=00049 name=/hr01/u0003/oradata/DBNAME/epapp_01.dbf
input datafile file number=00131 name=/hr01/u0003/oradata/DBNAME/salarge_01.dbf
input datafile file number=00135 name=/hr01/u0003/oradata/DBNAME/stwork_01.dbf
input datafile file number=00033 name=/hr01/u0003/oradata/DBNAME/eoeclrg_01.dbf
input datafile file number=00037 name=/hr01/u0003/oradata/DBNAME/eoewapp_01.dbf
input datafile file number=00017 name=/hr01/u0003/oradata/DBNAME/cularg2_01.dbf
input datafile file number=00021 name=/hr01/u0003/oradata/DBNAME/dtapp_01.dbf
input datafile file number=00045 name=/hr01/u0003/oradata/DBNAME/eoppapp_01.dbf
input datafile file number=00069 name=/hr01/u0003/oradata/DBNAME/hrapp5_01.dbf
input datafile file number=00091 name=/hr01/u0003/oradata/DBNAME/piwork_01.dbf
input datafile file number=00118 name=/hr01/u0003/oradata/DBNAME/ptwork_01.dbf
input datafile file number=00029 name=/hr01/u0003/oradata/DBNAME/eoculrg_01.dbf
input datafile file number=00041 name=/hr01/u0003/oradata/DBNAME/eoiulrg_01.dbf
input datafile file number=00087 name=/hr01/u0003/oradata/DBNAME/pcapp_01.dbf
input datafile file number=00053 name=/hr01/u0003/oradata/DBNAME/erwork_01.dbf
input datafile file number=00083 name=/hr01/u0003/oradata/DBNAME/inapp_01.dbf
input datafile file number=00104 name=/hr01/u0003/oradata/DBNAME/ptcmstar_01.dbf
input datafile file number=00064 name=/hr01/u0006/oradata/DBNAME/hrapp_01.dbf
input datafile file number=00121 name=/hr01/u0006/oradata/DBNAME/pyapp_01.dbf
input datafile file number=00082 name=/hr01/u0006/oradata/DBNAME/htapp_01.dbf
input datafile file number=00107 name=/hr01/u0006/oradata/DBNAME/ptprjwk_01.dbf
input datafile file number=00138 name=/hr01/u0006/oradata/DBNAME/tllarge_01.dbf
input datafile file number=00032 name=/hr01/u0006/oradata/DBNAME/eoecapp_01.dbf
input datafile file number=00056 name=/hr01/u0006/oradata/DBNAME/fgapp_01.dbf
input datafile file number=00072 name=/hr01/u0006/oradata/DBNAME/hrimage_01.dbf
input datafile file number=00024 name=/hr01/u0006/oradata/DBNAME/eocfapp_01.dbf
channel dsk1: starting piece 1 at 18-JAN-12
channel dsk2: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0002/DBNAME/BACKUP_F_DBNAME_20120118_114848_s93_p1_2tn12oa2 tag=TAG20120118T114929 comment=NONE
channel dsk2: backup set complete, elapsed time: 00:07:52
channel dsk2: starting incremental level 0 datafile backup set
channel dsk2: specifying datafile(s) in backup set
input datafile file number=00140 name=/hr01/u0004/oradata/DBNAME/tools_01.dbf
input datafile file number=00076 name=/hr01/u0005/oradata/DBNAME/hrlarge_03.dbf
input datafile file number=00116 name=/hr01/u0005/oradata/DBNAME/pttlrg_01.dbf
input datafile file number=00106 name=/hr01/u0005/oradata/DBNAME/ptprc_01.dbf
input datafile file number=00063 name=/hr01/u0005/oradata/DBNAME/hpapp_01.dbf
input datafile file number=00085 name=/hr01/u0005/oradata/DBNAME/paapp_01.dbf
input datafile file number=00081 name=/hr01/u0005/oradata/DBNAME/hrwork_01.dbf
input datafile file number=00055 name=/hr01/u0005/oradata/DBNAME/falarge_01.dbf
input datafile file number=00089 name=/hr01/u0005/oradata/DBNAME/piapp_01.dbf
input datafile file number=00051 name=/hr01/u0005/oradata/DBNAME/erapp_01.dbf
input datafile file number=00102 name=/hr01/u0005/oradata/DBNAME/ptappe_01.dbf
input datafile file number=00133 name=/hr01/u0005/oradata/DBNAME/stapp_01.dbf
input datafile file number=00059 name=/hr01/u0005/oradata/DBNAME/giapp_01.dbf
input datafile file number=00071 name=/hr01/u0005/oradata/DBNAME/hrapp7_01.dbf
input datafile file number=00098 name=/hr01/u0005/oradata/DBNAME/psimgr_01.dbf
input datafile file number=00019 name=/hr01/u0005/oradata/DBNAME/cularge_01.dbf
input datafile file number=00035 name=/hr01/u0005/oradata/DBNAME/eoeiapp_01.dbf
input datafile file number=00067 name=/hr01/u0005/oradata/DBNAME/hrapp3_01.dbf
input datafile file number=00047 name=/hr01/u0005/oradata/DBNAME/eotpapp_01.dbf
input datafile file number=00023 name=/hr01/u0005/oradata/DBNAME/eobfapp_01.dbf
input datafile file number=00027 name=/hr01/u0005/oradata/DBNAME/eocmwrk_01.dbf
input datafile file number=00031 name=/hr01/u0005/oradata/DBNAME/eodslrg_01.dbf
input datafile file number=00039 name=/hr01/u0005/oradata/DBNAME/eoewwrk_01.dbf
input datafile file number=00093 name=/hr01/u0005/oradata/DBNAME/psapmsgarchpd_01.dbf
input datafile file number=00141 name=/hr01/u0005/oradata/DBNAME/waapp_01.dbf
input datafile file number=00068 name=/hr01/u0006/oradata/DBNAME/hrapp4_01.dbf
input datafile file number=00078 name=/hr01/u0006/oradata/DBNAME/hrsarch_01.dbf
input datafile file number=00103 name=/hr01/u0006/oradata/DBNAME/ptaudit_01.dbf
input datafile file number=00117 name=/hr01/u0006/oradata/DBNAME/pttree_01.dbf
input datafile file number=00134 name=/hr01/u0006/oradata/DBNAME/stlarge_01.dbf
input datafile file number=00099 name=/hr01/u0006/oradata/DBNAME/pswork_01.dbf
input datafile file number=00016 name=/hr01/u0006/oradata/DBNAME/cularg1_01.dbf
input datafile file number=00044 name=/hr01/u0006/oradata/DBNAME/eoltapp_01.dbf
input datafile file number=00130 name=/hr01/u0006/oradata/DBNAME/sacapp_01.dbf
input datafile file number=00086 name=/hr01/u0006/oradata/DBNAME/palarge_01.dbf
input datafile file number=00020 name=/hr01/u0006/oradata/DBNAME/diapp_01.dbf
input datafile file number=00028 name=/hr01/u0006/oradata/DBNAME/eocuapp_01.dbf
input datafile file number=00036 name=/hr01/u0006/oradata/DBNAME/eoeilrg_01.dbf
input datafile file number=00040 name=/hr01/u0006/oradata/DBNAME/eoiuapp_01.dbf
input datafile file number=00090 name=/hr01/u0006/oradata/DBNAME/pilarge_01.dbf
channel dsk2: starting piece 1 at 18-JAN-12
channel dsk2: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0002/DBNAME/BACKUP_F_DBNAME_20120118_114848_s99_p1_33n12oor tag=TAG20120118T114929 comment=NONE
channel dsk2: backup set complete, elapsed time: 00:01:05
channel dsk2: starting incremental level 0 datafile backup set
channel dsk2: specifying datafile(s) in backup set
channel dsk3: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0003/DBNAME/BACKUP_F_DBNAME_20120118_114848_s97_p1_31n12olb tag=TAG20120118T114929 comment=NONE
channel dsk3: backup set complete, elapsed time: 00:02:57
channel dsk3: starting incremental level 0 datafile backup set
channel dsk3: specifying datafile(s) in backup set
including current SPFILE in backup set
channel dsk3: starting piece 1 at 18-JAN-12
including current control file in backup set
channel dsk2: starting piece 1 at 18-JAN-12
channel dsk2: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0002/DBNAME/BACKUP_F_DBNAME_20120118_114848_s100_p1_34n12oqs tag=TAG20120118T114929 comment=NONE
channel dsk2: backup set complete, elapsed time: 00:00:01
channel dsk3: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0003/DBNAME/BACKUP_F_DBNAME_20120118_114848_s101_p1_35n12oqs tag=TAG20120118T114929 comment=NONE
channel dsk3: backup set complete, elapsed time: 00:00:01
channel dsk4: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0004/DBNAME/BACKUP_F_DBNAME_20120118_114848_s96_p1_30n12oi1 tag=TAG20120118T114929 comment=NONE
channel dsk4: backup set complete, elapsed time: 00:04:50
channel dsk1: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0001/DBNAME/BACKUP_F_DBNAME_20120118_114848_s98_p1_32n12omp tag=TAG20120118T114929 comment=NONE
channel dsk1: backup set complete, elapsed time: 00:02:26
Finished backup at 18-JAN-12

Starting backup at 18-JAN-12
channel dsk1: starting full datafile backup set
channel dsk1: specifying datafile(s) in backup set
including current control file in backup set
channel dsk1: starting piece 1 at 18-JAN-12
channel dsk1: finished piece 1 at 18-JAN-12
piece handle=/ora_backup/u0001/DBNAME/BACKUP_F_DBNAME_20120118_114848_s102_p1_36n12orj tag=TAG20120118T120507 comment=NONE
channel dsk1: backup set complete, elapsed time: 00:00:01
Finished backup at 18-JAN-12

sql statement: alter database open

released channel: dsk1

released channel: dsk2

released channel: dsk3

released channel: dsk4

RMAN>

List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
607657 607658 DBNAME 945596454 CURRENT 1 01-DEC-11

RMAN>

Recovery Manager complete.

Restore from the COLD BACKUP:-
=========================================


"initDBNAME.ora" 56 lines, 1791 characters
oracle@unixhost(DBNAME):/hr01/u0001/oracle/product/11.1.0/db_1/dbs>r sql
sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Wed Jan 18 14:45:13 2012

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

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 8353644544 bytes
Fixed Size 2104088 bytes
Variable Size 2013267176 bytes
Database Buffers 6308233216 bytes
Redo Buffers 30040064 bytes
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
oracle@unixhost(DBNAME):/hr01/u0001/oracle/product/11.1.0/db_1/dbs>rman

Recovery Manager: Release 11.1.0.7.0 - Production on Wed Jan 18 14:45:38 2012

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

RMAN> connect target /

connected to target database: DBNAME (not mounted)


RMAN> restore controlfile from '/ora_backup/u0001/DBNAME/BACKUP_F_DBNAME_20120118_114848_s102_p1_36n12orj';

Starting restore at 18-JAN-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1308 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/hr01/u0001/oracle/product/11.1.0/db_1/dbs/cntrlDBNAME.dbf
Finished restore at 18-JAN-12

RMAN> sql 'alter database mount';

sql statement: alter database mount
released channel: ORA_DISK_1

RMAN>

RMAN>


RMAN> run {
2> allocate channel ch01 type disk;
3> allocate channel ch02 type disk;
4> allocate channel ch03 type disk;
5> allocate channel ch04 type disk;
6> restore database;
7> }

released channel: ORA_DISK_1
allocated channel: ch01
channel ch01: SID=1308 device type=DISK

allocated channel: ch02
channel ch02: SID=1307 device type=DISK

allocated channel: ch03
channel ch03: SID=1306 device type=DISK

allocated channel: ch04
channel ch04: SID=1305 device type=DISK

Starting restore at 18-JAN-12

channel ch01: starting datafile backup set restore
channel ch01: specifying datafile(s) to restore from backup set
channel ch01: restoring datafile 00109 to /hr01/u0004/oradata/DBNAME/pttbl_01.dbf
channel ch01: restoring datafile 00122 to /hr01/u0003/oradata/DBNAME/pylarge_01.dbf
channel ch01: restoring datafile 00143 to /hr01/u0007/oradata/DBNAME/psindex_02.dbf
channel ch01: restoring datafile 00151 to /hr01/u0008/oradata/DBNAME/psindex_10.dbf
channel ch01: reading from backup piece /ora_backup/u0002/DBNAME/BACKUP_F_DBNAME_20120118_114848_s89_p1_2pn12nua
channel ch02: starting datafile backup set restore
channel ch02: specifying datafile(s) to restore from backup set
channel ch02: restoring datafile 00002 to /hr01/u0004/oradata/DBNAME/sysaux_01.dbf
channel ch02: restoring datafile 00074 to /hr01/u0005/oradata/DBNAME/hrlarge_01.dbf
channel ch02: restoring datafile 00142 to /hr01/u0007/oradata/DBNAME/psindex_01.dbf
channel ch02: restoring datafile 00150 to /hr01/u0008/oradata/DBNAME/psindex_09.dbf
channel ch02: reading from backup piece /ora_backup/u0001/DBNAME/BACKUP_F_DBNAME_20120118_114848_s88_p1_2on12nua
channel ch03: starting datafile backup set restore
channel ch03: specifying datafile(s) to restore from backup set
channel ch03: restoring datafile 00075 to /hr01/u0005/oradata/DBNAME/hrlarge_02.dbf
channel ch03: restoring datafile 00111 to /hr01/u0006/oradata/DBNAME/pttbl_03.dbf
channel ch03: restoring datafile 00123 to /hr01/u0003/oradata/DBNAME/pylarge_02.dbf
channel ch03: restoring datafile 00145 to /hr01/u0007/oradata/DBNAME/psindex_04.dbf
channel ch03: reading from backup piece /ora_backup/u0004/DBNAME/BACKUP_F_DBNAME_20120118_114848_s91_p1_2rn12nua
channel ch04: starting datafile backup set restore
channel ch04: specifying datafile(s) to restore from backup set
channel ch04: restoring datafile 00011 to /hr01/u0006/oradata/DBNAME/bnlarge_01.dbf
channel ch04: restoring datafile 00110 to /hr01/u0004/oradata/DBNAME/pttbl_02.dbf
channel ch04: restoring datafile 00144 to /hr01/u0007/oradata/DBNAME/psindex_03.dbf
channel ch04: restoring datafile 00152 to /hr01/u0008/oradata/DBNAME/psindex_11.dbf
channel ch04: reading from backup piece /ora_backup/u0003/DBNAME/BACKUP_F_DBNAME_20120118_114848_s90_p1_2qn12nua
channel ch03: piece handle=/ora_backup/u0004/DBNAME/BACKUP_F_DBNAME_20120118_114848_s91_p1_2rn12nua tag=TAG20120118T114929
channel ch03: restored backup piece 1
channel ch03: restore complete, elapsed time: 00:09:55
channel ch03: starting datafile backup set restore
channel ch03: specifying datafile(s) to restore from backup set
channel ch03: restoring datafile 00003 to /hr01/u0081/oradata/DBNAME/undo1_01.dbf
channel ch03: restoring datafile 00148 to /hr01/u0007/oradata/DBNAME/psindex_07.dbf
channel ch03: restoring datafile 00155 to /hr01/u0008/oradata/DBNAME/psindex_14.dbf
channel ch03: restoring datafile 00158 to /hr01/u0004/oradata/DBNAME/sysaux_02.dbf
channel ch03: reading from backup piece /ora_backup/u0004/DBNAME/BACKUP_F_DBNAME_20120118_114848_s94_p1_2un12oah
channel ch01: piece handle=/ora_backup/u0002/DBNAME/BACKUP_F_DBNAME_20120118_114848_s89_p1_2pn12nua tag=TAG20120118T114929
channel ch01: restored backup piece 1
channel ch01: restore complete, elapsed time: 00:10:31
channel ch01: starting datafile backup set restore
channel ch01: specifying datafile(s) to restore from backup set
channel ch01: restoring datafile 00114 to /hr01/u0006/oradata/DBNAME/pttbl_06.dbf
channel ch01: restoring datafile 00149 to /hr01/u0007/oradata/DBNAME/psindex_08.dbf
channel ch01: restoring datafile 00156 to /hr01/u0008/oradata/DBNAME/psindex_15.dbf
channel ch01: restoring datafile 00157 to /hr01/u0081/oradata/DBNAME/undo1_02.dbf
channel ch01: reading from backup piece /ora_backup/u0003/DBNAME/BACKUP_F_DBNAME_20120118_114848_s95_p1_2vn12obu
channel ch04: piece handle=/ora_backup/u0003/DBNAME/BACKUP_F_DBNAME_20120118_114848_s90_p1_2qn12nua tag=TAG20120118T114929
channel ch04: restored backup piece 1
channel ch04: restore complete, elapsed time: 00:11:46
channel ch04: starting datafile backup set restore
channel ch04: specifying datafile(s) to restore from backup set
channel ch04: restoring datafile 00112 to /hr01/u0006/oradata/DBNAME/pttbl_04.dbf
channel ch04: restoring datafile 00124 to /hr01/u0003/oradata/DBNAME/pylarge_03.dbf
channel ch04: restoring datafile 00126 to /hr01/u0004/oradata/DBNAME/pylarge_05.dbf
channel ch04: restoring datafile 00154 to /hr01/u0008/oradata/DBNAME/psindex_13.dbf
channel ch04: reading from backup piece /ora_backup/u0001/DBNAME/BACKUP_F_DBNAME_20120118_114848_s92_p1_2sn12oa1
channel ch02: piece handle=/ora_backup/u0001/DBNAME/BACKUP_F_DBNAME_20120118_114848_s88_p1_2on12nua tag=TAG20120118T114929
channel ch02: restored backup piece 1
channel ch02: restore complete, elapsed time: 00:13:47
channel ch02: starting datafile backup set restore
channel ch02: specifying datafile(s) to restore from backup set
channel ch02: restoring datafile 00006 to /hr01/u0005/oradata/DBNAME/adapp_01.dbf
channel ch02: restoring datafile 00015 to /hr01/u0005/oradata/DBNAME/cuaudit_01.dbf
channel ch02: restoring datafile 00043 to /hr01/u0005/oradata/DBNAME/eolarge_01.dbf
channel ch02: restoring datafile 00077 to /hr01/u0005/oradata/DBNAME/hrsapp_01.dbf
channel ch02: restoring datafile 00095 to /hr01/u0005/oradata/DBNAME/pscognos_01.dbf
channel ch02: restoring datafile 00096 to /hr01/u0005/oradata/DBNAME/psdefault_01.dbf
channel ch02: restoring datafile 00113 to /hr01/u0006/oradata/DBNAME/pttbl_05.dbf
channel ch02: restoring datafile 00120 to /hr01/u0005/oradata/DBNAME/py0lrg_01.dbf
channel ch02: restoring datafile 00127 to /hr01/u0003/oradata/DBNAME/pylarge_06.dbf
channel ch02: restoring datafile 00137 to /hr01/u0005/oradata/DBNAME/tlapp_01.dbf
channel ch02: restoring datafile 00147 to /hr01/u0007/oradata/DBNAME/psindex_06.dbf
channel ch02: reading from backup piece /ora_backup/u0002/DBNAME/BACKUP_F_DBNAME_20120118_114848_s93_p1_2tn12oa2
channel ch04: piece handle=/ora_backup/u0001/DBNAME/BACKUP_F_DBNAME_20120118_114848_s92_p1_2sn12oa1 tag=TAG20120118T114929
channel ch04: restored backup piece 1
channel ch04: restore complete, elapsed time: 00:07:36
channel ch04: starting datafile backup set restore
channel ch04: specifying datafile(s) to restore from backup set
channel ch04: restoring datafile 00016 to /hr01/u0006/oradata/DBNAME/cularg1_01.dbf
channel ch04: restoring datafile 00019 to /hr01/u0005/oradata/DBNAME/cularge_01.dbf
channel ch04: restoring datafile 00020 to /hr01/u0006/oradata/DBNAME/diapp_01.dbf
channel ch04: restoring datafile 00023 to /hr01/u0005/oradata/DBNAME/eobfapp_01.dbf
channel ch04: restoring datafile 00027 to /hr01/u0005/oradata/DBNAME/eocmwrk_01.dbf
channel ch04: restoring datafile 00028 to /hr01/u0006/oradata/DBNAME/eocuapp_01.dbf
channel ch04: restoring datafile 00031 to /hr01/u0005/oradata/DBNAME/eodslrg_01.dbf
channel ch04: restoring datafile 00035 to /hr01/u0005/oradata/DBNAME/eoeiapp_01.dbf
channel ch04: restoring datafile 00036 to /hr01/u0006/oradata/DBNAME/eoeilrg_01.dbf
channel ch04: restoring datafile 00039 to /hr01/u0005/oradata/DBNAME/eoewwrk_01.dbf
channel ch04: restoring datafile 00040 to /hr01/u0006/oradata/DBNAME/eoiuapp_01.dbf
channel ch04: restoring datafile 00044 to /hr01/u0006/oradata/DBNAME/eoltapp_01.dbf
channel ch04: restoring datafile 00047 to /hr01/u0005/oradata/DBNAME/eotpapp_01.dbf
channel ch04: restoring datafile 00051 to /hr01/u0005/oradata/DBNAME/erapp_01.dbf
channel ch04: restoring datafile 00055 to /hr01/u0005/oradata/DBNAME/falarge_01.dbf
channel ch04: restoring datafile 00059 to /hr01/u0005/oradata/DBNAME/giapp_01.dbf
channel ch04: restoring datafile 00063 to /hr01/u0005/oradata/DBNAME/hpapp_01.dbf
channel ch04: restoring datafile 00067 to /hr01/u0005/oradata/DBNAME/hrapp3_01.dbf
channel ch04: restoring datafile 00068 to /hr01/u0006/oradata/DBNAME/hrapp4_01.dbf
channel ch04: restoring datafile 00071 to /hr01/u0005/oradata/DBNAME/hrapp7_01.dbf
channel ch04: restoring datafile 00076 to /hr01/u0005/oradata/DBNAME/hrlarge_03.dbf
channel ch04: restoring datafile 00078 to /hr01/u0006/oradata/DBNAME/hrsarch_01.dbf
channel ch04: restoring datafile 00081 to /hr01/u0005/oradata/DBNAME/hrwork_01.dbf
channel ch04: restoring datafile 00085 to /hr01/u0005/oradata/DBNAME/paapp_01.dbf
channel ch04: restoring datafile 00086 to /hr01/u0006/oradata/DBNAME/palarge_01.dbf
channel ch04: restoring datafile 00089 to /hr01/u0005/oradata/DBNAME/piapp_01.dbf
channel ch04: restoring datafile 00090 to /hr01/u0006/oradata/DBNAME/pilarge_01.dbf
channel ch04: restoring datafile 00093 to /hr01/u0005/oradata/DBNAME/psapmsgarchpd_01.dbf
channel ch04: restoring datafile 00098 to /hr01/u0005/oradata/DBNAME/psimgr_01.dbf
channel ch04: restoring datafile 00099 to /hr01/u0006/oradata/DBNAME/pswork_01.dbf
channel ch04: restoring datafile 00102 to /hr01/u0005/oradata/DBNAME/ptappe_01.dbf
channel ch04: restoring datafile 00103 to /hr01/u0006/oradata/DBNAME/ptaudit_01.dbf
channel ch04: restoring datafile 00106 to /hr01/u0005/oradata/DBNAME/ptprc_01.dbf
channel ch04: restoring datafile 00116 to /hr01/u0005/oradata/DBNAME/pttlrg_01.dbf
channel ch04: restoring datafile 00117 to /hr01/u0006/oradata/DBNAME/pttree_01.dbf
channel ch04: restoring datafile 00130 to /hr01/u0006/oradata/DBNAME/sacapp_01.dbf
channel ch04: restoring datafile 00133 to /hr01/u0005/oradata/DBNAME/stapp_01.dbf
channel ch04: restoring datafile 00134 to /hr01/u0006/oradata/DBNAME/stlarge_01.dbf
channel ch04: restoring datafile 00140 to /hr01/u0004/oradata/DBNAME/tools_01.dbf
channel ch04: restoring datafile 00141 to /hr01/u0005/oradata/DBNAME/waapp_01.dbf
channel ch04: reading from backup piece /ora_backup/u0002/DBNAME/BACKUP_F_DBNAME_20120118_114848_s99_p1_33n12oor
channel ch02: piece handle=/ora_backup/u0002/DBNAME/BACKUP_F_DBNAME_20120118_114848_s93_p1_2tn12oa2 tag=TAG20120118T114929
channel ch02: restored backup piece 1
channel ch02: restore complete, elapsed time: 00:06:52
channel ch02: starting datafile backup set restore
channel ch02: specifying datafile(s) to restore from backup set
channel ch02: restoring datafile 00005 to /hr01/u0004/oradata/DBNAME/aalarge_01.dbf
channel ch02: restoring datafile 00007 to /hr01/u0006/oradata/DBNAME/amapp_01.dbf
channel ch02: restoring datafile 00009 to /hr01/u0004/oradata/DBNAME/bdapp_01.dbf
channel ch02: restoring datafile 00014 to /hr01/u0004/oradata/DBNAME/coapp_01.dbf
channel ch02: restoring datafile 00018 to /hr01/u0004/oradata/DBNAME/cularg3_01.dbf
channel ch02: restoring datafile 00022 to /hr01/u0004/oradata/DBNAME/eoapp_01.dbf
channel ch02: restoring datafile 00026 to /hr01/u0004/oradata/DBNAME/eocmlrg_01.dbf
channel ch02: restoring datafile 00030 to /hr01/u0004/oradata/DBNAME/eodsapp_01.dbf
channel ch02: restoring datafile 00034 to /hr01/u0004/oradata/DBNAME/eoecwrk_01.dbf
channel ch02: restoring datafile 00038 to /hr01/u0004/oradata/DBNAME/eoewlrg_01.dbf
channel ch02: restoring datafile 00042 to /hr01/u0004/oradata/DBNAME/eoiuwrk_01.dbf
channel ch02: restoring datafile 00046 to /hr01/u0004/oradata/DBNAME/eopplrg_01.dbf
channel ch02: restoring datafile 00048 to /hr01/u0006/oradata/DBNAME/eotplrg_01.dbf
channel ch02: restoring datafile 00050 to /hr01/u0004/oradata/DBNAME/eplarge_01.dbf
channel ch02: restoring datafile 00052 to /hr01/u0006/oradata/DBNAME/erlarge_01.dbf
channel ch02: restoring datafile 00054 to /hr01/u0004/oradata/DBNAME/faapp_01.dbf
channel ch02: restoring datafile 00058 to /hr01/u0004/oradata/DBNAME/fsapp_01.dbf
channel ch02: restoring datafile 00060 to /hr01/u0006/oradata/DBNAME/glapp_01.dbf
channel ch02: restoring datafile 00062 to /hr01/u0004/oradata/DBNAME/gpdeapp_01.dbf
channel ch02: restoring datafile 00066 to /hr01/u0004/oradata/DBNAME/hrapp2_01.dbf
channel ch02: restoring datafile 00070 to /hr01/u0004/oradata/DBNAME/hrapp6_01.dbf
channel ch02: restoring datafile 00080 to /hr01/u0004/oradata/DBNAME/hrswork_01.dbf
channel ch02: restoring datafile 00084 to /hr01/u0004/oradata/DBNAME/omapp_01.dbf
channel ch02: restoring datafile 00088 to /hr01/u0004/oradata/DBNAME/pclarge_01.dbf
channel ch02: restoring datafile 00092 to /hr01/u0004/oradata/DBNAME/poapp_01.dbf
channel ch02: restoring datafile 00094 to /hr01/u0006/oradata/DBNAME/psaudit_01.dbf
channel ch02: restoring datafile 00101 to /hr01/u0004/oradata/DBNAME/ptapp_01.dbf
channel ch02: restoring datafile 00105 to /hr01/u0004/oradata/DBNAME/ptlock_01.dbf
channel ch02: restoring datafile 00115 to /hr01/u0005/oradata/DBNAME/pttbl_07.dbf
channel ch02: restoring datafile 00119 to /hr01/u0004/oradata/DBNAME/pvapp_01.dbf
channel ch02: restoring datafile 00128 to /hr01/u0004/oradata/DBNAME/pywork_01.dbf
channel ch02: restoring datafile 00132 to /hr01/u0004/oradata/DBNAME/srapp_01.dbf
channel ch02: restoring datafile 00136 to /hr01/u0004/oradata/DBNAME/taapp_01.dbf
channel ch02: restoring datafile 00159 to /hr01/u0003/oradata/DBNAME/pylarge_07.dbf
channel ch02: reading from backup piece /ora_backup/u0003/DBNAME/BACKUP_F_DBNAME_20120118_114848_s97_p1_31n12olb
channel ch01: piece handle=/ora_backup/u0003/DBNAME/BACKUP_F_DBNAME_20120118_114848_s95_p1_2vn12obu tag=TAG20120118T114929
channel ch01: restored backup piece 1
channel ch01: restore complete, elapsed time: 00:10:08
channel ch01: starting datafile backup set restore
channel ch01: specifying datafile(s) to restore from backup set
channel ch01: restoring datafile 00010 to /hr01/u0005/oradata/DBNAME/bnapp_01.dbf
channel ch01: restoring datafile 00097 to /hr01/u0005/oradata/DBNAME/psimage_01.dbf
channel ch01: restoring datafile 00125 to /hr01/u0004/oradata/DBNAME/pylarge_04.dbf
channel ch01: restoring datafile 00129 to /hr01/u0005/oradata/DBNAME/saapp_01.dbf
channel ch01: restoring datafile 00146 to /hr01/u0007/oradata/DBNAME/psindex_05.dbf
channel ch01: restoring datafile 00153 to /hr01/u0008/oradata/DBNAME/psindex_12.dbf
channel ch01: reading from backup piece /ora_backup/u0004/DBNAME/BACKUP_F_DBNAME_20120118_114848_s96_p1_30n12oi1
channel ch03: piece handle=/ora_backup/u0004/DBNAME/BACKUP_F_DBNAME_20120118_114848_s94_p1_2un12oah tag=TAG20120118T114929
channel ch03: restored backup piece 1
channel ch03: restore complete, elapsed time: 00:12:19
channel ch03: starting datafile backup set restore
channel ch03: specifying datafile(s) to restore from backup set
channel ch03: restoring datafile 00001 to /hr01/u0003/oradata/DBNAME/system_01.dbf
channel ch03: restoring datafile 00004 to /hr01/u0003/oradata/DBNAME/aaapp_01.dbf
channel ch03: restoring datafile 00008 to /hr01/u0003/oradata/DBNAME/avapp_01.dbf
channel ch03: restoring datafile 00012 to /hr01/u0005/oradata/DBNAME/bnlarge_02.dbf
channel ch03: restoring datafile 00013 to /hr01/u0003/oradata/DBNAME/ccapp_01.dbf
channel ch03: restoring datafile 00017 to /hr01/u0003/oradata/DBNAME/cularg2_01.dbf
channel ch03: restoring datafile 00021 to /hr01/u0003/oradata/DBNAME/dtapp_01.dbf
channel ch03: restoring datafile 00024 to /hr01/u0006/oradata/DBNAME/eocfapp_01.dbf
channel ch03: restoring datafile 00025 to /hr01/u0003/oradata/DBNAME/eocmapp_01.dbf
channel ch03: restoring datafile 00029 to /hr01/u0003/oradata/DBNAME/eoculrg_01.dbf
channel ch03: restoring datafile 00032 to /hr01/u0006/oradata/DBNAME/eoecapp_01.dbf
channel ch03: restoring datafile 00033 to /hr01/u0003/oradata/DBNAME/eoeclrg_01.dbf
channel ch03: restoring datafile 00037 to /hr01/u0003/oradata/DBNAME/eoewapp_01.dbf
channel ch03: restoring datafile 00041 to /hr01/u0003/oradata/DBNAME/eoiulrg_01.dbf
channel ch03: restoring datafile 00045 to /hr01/u0003/oradata/DBNAME/eoppapp_01.dbf
channel ch03: restoring datafile 00049 to /hr01/u0003/oradata/DBNAME/epapp_01.dbf
channel ch03: restoring datafile 00053 to /hr01/u0003/oradata/DBNAME/erwork_01.dbf
channel ch03: restoring datafile 00056 to /hr01/u0006/oradata/DBNAME/fgapp_01.dbf
channel ch03: restoring datafile 00057 to /hr01/u0003/oradata/DBNAME/fglarge_01.dbf
channel ch03: restoring datafile 00061 to /hr01/u0003/oradata/DBNAME/gpapp_01.dbf
channel ch03: restoring datafile 00064 to /hr01/u0006/oradata/DBNAME/hrapp_01.dbf
channel ch03: restoring datafile 00065 to /hr01/u0003/oradata/DBNAME/hrapp1_01.dbf
channel ch03: restoring datafile 00069 to /hr01/u0003/oradata/DBNAME/hrapp5_01.dbf
channel ch03: restoring datafile 00072 to /hr01/u0006/oradata/DBNAME/hrimage_01.dbf
channel ch03: restoring datafile 00073 to /hr01/u0003/oradata/DBNAME/hrlarg1_01.dbf
channel ch03: restoring datafile 00079 to /hr01/u0003/oradata/DBNAME/hrslarge_01.dbf
channel ch03: restoring datafile 00082 to /hr01/u0006/oradata/DBNAME/htapp_01.dbf
channel ch03: restoring datafile 00083 to /hr01/u0003/oradata/DBNAME/inapp_01.dbf
channel ch03: restoring datafile 00087 to /hr01/u0003/oradata/DBNAME/pcapp_01.dbf
channel ch03: restoring datafile 00091 to /hr01/u0003/oradata/DBNAME/piwork_01.dbf
channel ch03: restoring datafile 00100 to /hr01/u0003/oradata/DBNAME/ptamsg_01.dbf
channel ch03: restoring datafile 00104 to /hr01/u0003/oradata/DBNAME/ptcmstar_01.dbf
channel ch03: restoring datafile 00107 to /hr01/u0006/oradata/DBNAME/ptprjwk_01.dbf
channel ch03: restoring datafile 00108 to /hr01/u0003/oradata/DBNAME/ptrpts_01.dbf
channel ch03: restoring datafile 00118 to /hr01/u0003/oradata/DBNAME/ptwork_01.dbf
channel ch03: restoring datafile 00121 to /hr01/u0006/oradata/DBNAME/pyapp_01.dbf
channel ch03: restoring datafile 00131 to /hr01/u0003/oradata/DBNAME/salarge_01.dbf
channel ch03: restoring datafile 00135 to /hr01/u0003/oradata/DBNAME/stwork_01.dbf
channel ch03: restoring datafile 00138 to /hr01/u0006/oradata/DBNAME/tllarge_01.dbf
channel ch03: restoring datafile 00139 to /hr01/u0003/oradata/DBNAME/tlwork_01.dbf
channel ch03: reading from backup piece /ora_backup/u0001/DBNAME/BACKUP_F_DBNAME_20120118_114848_s98_p1_32n12omp
channel ch04: piece handle=/ora_backup/u0002/DBNAME/BACKUP_F_DBNAME_20120118_114848_s99_p1_33n12oor tag=TAG20120118T114929
channel ch04: restored backup piece 1
channel ch04: restore complete, elapsed time: 00:04:28
channel ch02: piece handle=/ora_backup/u0003/DBNAME/BACKUP_F_DBNAME_20120118_114848_s97_p1_31n12olb tag=TAG20120118T114929
channel ch02: restored backup piece 1
channel ch02: restore complete, elapsed time: 00:04:52
channel ch03: piece handle=/ora_backup/u0001/DBNAME/BACKUP_F_DBNAME_20120118_114848_s98_p1_32n12omp tag=TAG20120118T114929
channel ch03: restored backup piece 1
channel ch03: restore complete, elapsed time: 00:04:45
channel ch01: piece handle=/ora_backup/u0004/DBNAME/BACKUP_F_DBNAME_20120118_114848_s96_p1_30n12oi1 tag=TAG20120118T114929
channel ch01: restored backup piece 1
channel ch01: restore complete, elapsed time: 00:08:41
Finished restore at 18-JAN-12
released channel: ch01
released channel: ch02
released channel: ch03
released channel: ch04

RMAN>

RMAN> sql 'alter database open resetlogs';

sql statement: alter database open resetlogs

RMAN> exit


Recovery Manager complete.

Thursday, January 5, 2012

Recover root password

I can login as user1 but forgot the password for root.

Instead of using single user mode.

Login into Ubuntu and then in Terminal:

As uers1:
sudo su -
password :
root@host1:

Here now you are logged in as root change the password for root.


To login remotely into ubuntu PC from windows use TightVNC viewer