Вы находитесь на странице: 1из 41

# su - oracle

Sun Microsystems Inc. SunOS 5.10 Generic January 2005


You have new mail.
-bash-3.00$ . .profile
-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 01:49:15 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.
Total System Global Area 343932928 bytes
Fixed Size 1280132 bytes
Variable Size 130025340 bytes
Database Buffers 209715200 bytes
Redo Buffers 2912256 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 01:52:47 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DBN (DBID=1241456785)
RMAN> list backup
2> ;
using target database control file instead of recovery catalog
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6 Full 6.80M DISK 00:00:04 28-JUN-10
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20100628T090547
Piece Name: /oracle/product/10.2.0/db_1/dbs/DBN_FULL_06lhbpc8_1_1
Control File Included: Ckp SCN: 895196 Ckp time: 28-JUN-10
SPFILE Included: Modification time: 28-JUN-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Full 6.77M DISK 00:00:03 28-JUN-10
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20100628T102203
Piece Name: /oracle/product/10.2.0/db_1/dbs/07lhbtmb_1_1
Control File Included: Ckp SCN: 895652 Ckp time: 28-JUN-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
13 Incr 1 6.80M DISK 00:00:02 24-JUL-10
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: SUNDAY25
Piece Name: /oracle/product/10.2.0/db_1/dbs/0dljj8b0_1_1
Control File Included: Ckp SCN: 1670616 Ckp time: 24-JUL-10
SPFILE Included: Modification time: 24-JUL-10
RMAN> exit

Recovery Manager complete.


-bash-3.00$ df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0d0s0 12G 9.6G 2.1G 83% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 2.2G 896K 2.2G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/usr/lib/libc/libc_hwcap1.so.1
12G 9.6G 2.1G 83% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 2.2G 80K 2.2G 1% /tmp
swap 2.2G 36K 2.2G 1% /var/run
/dev/dsk/c0d0s7 13M 11M 571K 96% /export/home
/hgfs 16G 4.0M 16G 1% /hgfs
/tmp/VMwareDnD 64G 16M 64G 1% /var/run/vmblock
-bash-3.00$ export ORACLE_SID=rmandb
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 01:54:16 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> list backup;
using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of list command at 08/04/2010 01:54:24
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Intel SVR4 UNIX Error: 2: No such file or directory
RMAN> exit

Recovery Manager complete.


-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 01:54:38 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 343932928 bytes
Fixed Size 1280132 bytes
Variable Size 155191164 bytes
Database Buffers 184549376 bytes
Redo Buffers 2912256 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 01:56:13 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: RMANDATA (DBID=1584586268)
RMAN> list backup;
using target database control file instead of recovery catalog
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 529.85M DISK 00:01:31 21-JUL-10
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20100721T223417
Piece Name: /oracle/rmanb
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 745571 21-JUL-10 /rmandb/rmandata/system01.dbf
2 Full 745571 21-JUL-10 /rmandb/rmandata/undotbs01.dbf
3 Full 745571 21-JUL-10 /rmandb/rmandata/sysaux01.dbf
4 Full 745571 21-JUL-10 /rmandb/rmandata/users01.dbf
5 Full 745571 21-JUL-10 /rmandb/rman.dbf
6 Full 745571 21-JUL-10

-bash-3.00$ cd /
-bash-3.00$ cd oracle
-bash-3.00$ rm rmand
rmand: No such file or directory
-bash-3.00$ rm rmanb
-bash-3.00$ df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0d0s0 12G 9.1G 2.6G 78% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 1.8G 896K 1.8G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/usr/lib/libc/libc_hwcap1.so.1
12G 9.1G 2.6G 78% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 1.8G 80K 1.8G 1% /tmp
swap 1.8G 36K 1.8G 1% /var/run
/dev/dsk/c0d0s7 13M 11M 571K 96% /export/home
/hgfs 16G 4.0M 16G 1% /hgfs
/tmp/VMwareDnD 64G 16M 64G 1% /var/run/vmblock
/* deleted the full backup file for the rmandb database

# su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have new mail.
-bash-3.00$ . .profile
-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 02:03:15 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 02:03:47 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DBN (DBID=1241456785)
RMAN> list backup;
using target database control file instead of recovery catalog
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6 Full 6.80M DISK 00:00:04 28-JUN-10
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20100628T090547
Piece Name: /oracle/product/10.2.0/db_1/dbs/DBN_FULL_06lhbpc8_1_1
Control File Included: Ckp SCN: 895196 Ckp time: 28-JUN-10
SPFILE Included: Modification time: 28-JUN-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Full 6.77M DISK 00:00:03 28-JUN-10
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20100628T102203
Piece Name: /oracle/product/10.2.0/db_1/dbs/07lhbtmb_1_1
Control File Included: Ckp SCN: 895652 Ckp time: 28-JUN-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
13 Incr 1 6.80M DISK 00:00:02 24-JUL-10
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: SUNDAY25
Piece Name: /oracle/product/10.2.0/db_1/dbs/0dljj8b0_1_1
Control File Included: Ckp SCN: 1670616 Ckp time: 24-JUL-10
SPFILE Included: Modification time: 24-JUL-10
RMAN> report backup
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "backup": expecting one of: "device, need, obsol
ete, schema, unrecoverable"
RMAN-01007: at line 1 column 8 file: standard input
RMAN> report need backup;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of files with less than 1 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
1 0 /oracle/product/dbn/system01.dbf
2 0 /oracle/product/dbn/undotbs01.dbf
3 0 /oracle/product/dbn/sysaux01.dbf
4 0 /oracle/product/dbn/users01.dbf
5 0 /oracle/product/dbn/example01.dbf
6 0 /oracle/product/newtablespace.dbf
10 0 /oracle/indxts.dbf
12 0 /oracle/secondf.dbf
13 0 /oracle/16k.dbf
RMAN> list backup;

List of Backup Sets


===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6 Full 6.80M DISK 00:00:04 28-JUN-10
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20100628T090547
Piece Name: /oracle/product/10.2.0/db_1/dbs/DBN_FULL_06lhbpc8_1_1
Control File Included: Ckp SCN: 895196 Ckp time: 28-JUN-10
SPFILE Included: Modification time: 28-JUN-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Full 6.77M DISK 00:00:03 28-JUN-10
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20100628T102203
Piece Name: /oracle/product/10.2.0/db_1/dbs/07lhbtmb_1_1
Control File Included: Ckp SCN: 895652 Ckp time: 28-JUN-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
13 Incr 1 6.80M DISK 00:00:02 24-JUL-10
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: SUNDAY25
Piece Name: /oracle/product/10.2.0/db_1/dbs/0dljj8b0_1_1
Control File Included: Ckp SCN: 1670616 Ckp time: 24-JUL-10
SPFILE Included: Modification time: 24-JUL-10
RMAN> exit

Recovery Manager complete.


-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 02:13:24 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> show parameter flash
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_flashback_retention_target integer 1440
SQL> show parameter db_recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string
db_recovery_file_dest_size big integer 2G
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options

/* found out that the flash recovery area has not been set

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 02:16:30 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DBN (DBID=1241456785)
RMAN> backup incremental level 0 database tag=level0;

Starting backup at 04-AUG-10


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=159 devtype=DISK
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/product/dbn/system01.dbf
input datafile fno=00003 name=/oracle/product/dbn/sysaux01.dbf
input datafile fno=00005 name=/oracle/product/dbn/example01.dbf
input datafile fno=00002 name=/oracle/product/dbn/undotbs01.dbf
input datafile fno=00010 name=/oracle/indxts.dbf
input datafile fno=00012 name=/oracle/secondf.dbf
input datafile fno=00004 name=/oracle/product/dbn/users01.dbf
input datafile fno=00006 name=/oracle/product/newtablespace.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/product/10.2.0/db_1/dbs/0flkf7jk_1_1 tag=LEVEL0 comment=NON
E
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:46
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/product/10.2.0/db_1/dbs/0glkf7oq_1_1 tag=LEVEL0 comment=NON
E
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00013 name=/oracle/16k.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/product/10.2.0/db_1/dbs/0hlkf7ot_1_1 tag=LEVEL0 comment=NON
E
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-AUG-10

RMAN> list backup;

List of Backup Sets


===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6 Full 6.80M DISK 00:00:04 28-JUN-10
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20100628T090547
Piece Name: /oracle/product/10.2.0/db_1/dbs/DBN_FULL_06lhbpc8_1_1
Control File Included: Ckp SCN: 895196 Ckp time: 28-JUN-10
SPFILE Included: Modification time: 28-JUN-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Full 6.77M DISK 00:00:03 28-JUN-10
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20100628T102203
Piece Name: /oracle/product/10.2.0/db_1/dbs/07lhbtmb_1_1
Control File Included: Ckp SCN: 895652 Ckp time: 28-JUN-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
13 Incr 1 6.80M DISK 00:00:02 24-JUL-10
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: SUNDAY25
Piece Name: /oracle/product/10.2.0/db_1/dbs/0dljj8b0_1_1
Control File Included: Ckp SCN: 1670616 Ckp time: 24-JUL-10
SPFILE Included: Modification time: 24-JUL-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
15 Incr 0 659.70M DISK 00:02:43 04-AUG-10
BP Key: 15 Status: AVAILABLE Compressed: NO Tag: LEVEL0
Piece Name: /oracle/product/10.2.0/db_1/dbs/0flkf7jk_1_1
List of Datafiles in backup set 15
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 0 Incr 1864626 04-AUG-10 /oracle/product/dbn/system01.dbf
2 0 Incr 1864626 04-AUG-10 /oracle/product/dbn/undotbs01.dbf
3 0 Incr 1864626 04-AUG-10 /oracle/product/dbn/sysaux01.dbf
4 0 Incr 1864626 04-AUG-10 /oracle/product/dbn/users01.dbf
5 0 Incr 1864626 04-AUG-10 /oracle/product/dbn/example01.dbf
6 0 Incr 1864626 04-AUG-10 /oracle/product/newtablespace.dbf
10 0 Incr 1864626 04-AUG-10 /oracle/indxts.dbf
12 0 Incr 1864626 04-AUG-10 /oracle/secondf.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
16 Incr 0 6.80M DISK 00:00:03 04-AUG-10
BP Key: 16 Status: AVAILABLE Compressed: NO Tag: LEVEL0
Piece Name: /oracle/product/10.2.0/db_1/dbs/0glkf7oq_1_1
Control File Included: Ckp SCN: 1864696 Ckp time: 04-AUG-10
SPFILE Included: Modification time: 04-AUG-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
17 Incr 0 128.00K DISK 00:00:00 04-AUG-10
BP Key: 17 Status: AVAILABLE Compressed: NO Tag: LEVEL0
Piece Name: /oracle/product/10.2.0/db_1/dbs/0hlkf7ot_1_1
List of Datafiles in backup set 17
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
13 0 Incr 1864698 04-AUG-10 /oracle/16k.dbf
RMAN> report obosolete;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "device, need, o
bsolete, schema, unrecoverable"
RMAN-01008: the bad identifier was: obosolete
RMAN-01007: at line 1 column 8 file: standard input
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup,
beginline, blockrecover, catalog, change, connect, copy, convert, create, cross
check, configure, duplicate, debug, delete, drop, exit, endinline, flashback, ho
st, {, library, list, mount, open, print, quit, recover, register, release, repl
ace, report, renormalize, reset, restore, resync, rman, run, rpctest, set, setli
mit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade
, unregister, validate"
RMAN-01007: at line 1 column 17 file: standard input
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 6 28-JUN-10
Backup Piece 6 28-JUN-10 /oracle/product/10.2.0/db_1/dbs/D
BN_FULL_06lhbpc8_1_1
Backup Set 7 28-JUN-10
Backup Piece 7 28-JUN-10 /oracle/product/10.2.0/db_1/dbs/0
7lhbtmb_1_1
Archive Log 35 03-JUL-10 /oracle/product/archive1_37_72118
6066.dbf
Archive Log 36 05-JUL-10 /oracle/product/archive1_38_72118
6066.dbf
Archive Log 37 06-JUL-10 /oracle/product/archive1_39_72118
6066.dbf
Archive Log 38 07-JUL-10 /oracle/product/archive1_40_72118
6066.dbf
Archive Log 39 07-JUL-10 /oracle/product/archive1_41_72118
6066.dbf
Archive Log 40 07-JUL-10 /oracle/product/archive1_42_72118
6066.dbf
Archive Log 41 07-JUL-10 /oracle/product/archive1_43_72118
6066.dbf
Archive Log 42 08-JUL-10 /oracle/product/archive1_44_72118
6066.dbf
Archive Log 43 09-JUL-10 /oracle/product/archive1_45_72118
6066.dbf
Archive Log 44 13-JUL-10 /oracle/product/archive1_46_72118
6066.dbf
Archive Log 45 13-JUL-10 /oracle/product/archive1_47_72118
6066.dbf
Archive Log 46 14-JUL-10 /oracle/product/archive1_48_72118
6066.dbf
Archive Log 47 14-JUL-10 /oracle/product/archive1_49_72118
6066.dbf
Archive Log 48 15-JUL-10 /oracle/product/archive1_50_72118
6066.dbf
Archive Log 49 19-JUL-10 /oracle/product/archive1_51_72118
6066.dbf
Archive Log 50 19-JUL-10 /oracle/product/archive1_52_72118
6066.dbf
Archive Log 51 20-JUL-10 /oracle/product/archive1_53_72118
6066.dbf
Archive Log 52 21-JUL-10 /oracle/product/archive1_54_72118
6066.dbf
Archive Log 53 22-JUL-10 /oracle/product/archive1_55_72118
6066.dbf
Archive Log 54 24-JUL-10 /oracle/product/archive1_56_72118
6066.dbf
Backup Set 13 24-JUL-10
Backup Piece 13 24-JUL-10 /oracle/product/10.2.0/db_1/dbs/0
dljj8b0_1_1
Archive Log 55 25-JUL-10 /oracle/product/archive1_57_72118
6066.dbf
Archive Log 56 28-JUL-10 /oracle/product/archive1_58_72118
6066.dbf
Archive Log 57 29-JUL-10 /oracle/product/archive1_59_72118
6066.dbf
Archive Log 58 30-JUL-10 /oracle/product/archive1_60_72118
6066.dbf
Archive Log 59 31-JUL-10 /oracle/product/archive1_61_72118
6066.dbf
Archive Log 60 31-JUL-10 /oracle/product/archive1_62_72118
6066.dbf
Archive Log 61 02-AUG-10 /oracle/product/archive1_63_72118
6066.dbf
Archive Log 62 02-AUG-10 /oracle/product/archive1_64_72118
6066.dbf
RMAN> crosscheck backup;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/product/10.2.0/db_1/dbs/DBN_FULL_06lhbpc8_1_1 recid=
6 stamp=722855307
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/product/10.2.0/db_1/dbs/07lhbtmb_1_1 recid=7 stamp=7
22859725
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/product/10.2.0/db_1/dbs/0dljj8b0_1_1 recid=13 stamp=
725197154
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/product/10.2.0/db_1/dbs/0flkf7jk_1_1 recid=15 stamp=
726113921
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/product/10.2.0/db_1/dbs/0glkf7oq_1_1 recid=16 stamp=
726114076
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/product/10.2.0/db_1/dbs/0hlkf7ot_1_1 recid=17 stamp=
726114077
Crosschecked 6 objects

RMAN> delete obsolete;


RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 6 28-JUN-10
Backup Piece 6 28-JUN-10 /oracle/product/10.2.0/db_1/dbs/D
BN_FULL_06lhbpc8_1_1
Backup Set 7 28-JUN-10
Backup Piece 7 28-JUN-10 /oracle/product/10.2.0/db_1/dbs/0
7lhbtmb_1_1
Archive Log 35 03-JUL-10 /oracle/product/archive1_37_72118
6066.dbf
Archive Log 36 05-JUL-10 /oracle/product/archive1_38_72118
6066.dbf
Archive Log 37 06-JUL-10 /oracle/product/archive1_39_72118
6066.dbf
Archive Log 38 07-JUL-10 /oracle/product/archive1_40_72118
6066.dbf
Archive Log 39 07-JUL-10 /oracle/product/archive1_41_72118
6066.dbf
Archive Log 40 07-JUL-10 /oracle/product/archive1_42_72118
6066.dbf
Archive Log 41 07-JUL-10 /oracle/product/archive1_43_72118
6066.dbf
Archive Log 42 08-JUL-10 /oracle/product/archive1_44_72118
6066.dbf
Archive Log 43 09-JUL-10 /oracle/product/archive1_45_72118
6066.dbf
Archive Log 44 13-JUL-10 /oracle/product/archive1_46_72118
6066.dbf
Archive Log 45 13-JUL-10 /oracle/product/archive1_47_72118
6066.dbf
Archive Log 46 14-JUL-10 /oracle/product/archive1_48_72118
6066.dbf
Archive Log 47 14-JUL-10 /oracle/product/archive1_49_72118
6066.dbf
Archive Log 48 15-JUL-10 /oracle/product/archive1_50_72118
6066.dbf
Archive Log 49 19-JUL-10 /oracle/product/archive1_51_72118
6066.dbf
Archive Log 50 19-JUL-10 /oracle/product/archive1_52_72118
6066.dbf
Archive Log 51 20-JUL-10 /oracle/product/archive1_53_72118
6066.dbf
Archive Log 52 21-JUL-10 /oracle/product/archive1_54_72118
6066.dbf
Archive Log 53 22-JUL-10 /oracle/product/archive1_55_72118
6066.dbf
Archive Log 54 24-JUL-10 /oracle/product/archive1_56_72118
6066.dbf
Backup Set 13 24-JUL-10
Backup Piece 13 24-JUL-10 /oracle/product/10.2.0/db_1/dbs/0
dljj8b0_1_1
Archive Log 55 25-JUL-10 /oracle/product/archive1_57_72118
6066.dbf
Archive Log 56 28-JUL-10 /oracle/product/archive1_58_72118
6066.dbf
Archive Log 57 29-JUL-10 /oracle/product/archive1_59_72118
6066.dbf
Archive Log 58 30-JUL-10 /oracle/product/archive1_60_72118
6066.dbf
Archive Log 59 31-JUL-10 /oracle/product/archive1_61_72118
6066.dbf
Archive Log 60 31-JUL-10 /oracle/product/archive1_62_72118
6066.dbf
Archive Log 61 02-AUG-10 /oracle/product/archive1_63_72118
6066.dbf
Archive Log 62 02-AUG-10 /oracle/product/archive1_64_72118
6066.dbf
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/oracle/product/10.2.0/db_1/dbs/DBN_FULL_06lhbpc8_1_1 recid=
6 stamp=722855307
deleted backup piece
backup piece handle=/oracle/product/10.2.0/db_1/dbs/07lhbtmb_1_1 recid=7 stamp=7
22859725
deleted archive log
archive log filename=/oracle/product/archive1_37_721186066.dbf recid=35 stamp=72
3406722
deleted archive log
archive log filename=/oracle/product/archive1_38_721186066.dbf recid=36 stamp=72
3549656
deleted archive log
archive log filename=/oracle/product/archive1_39_721186066.dbf recid=37 stamp=72
3681753
deleted archive log
archive log filename=/oracle/product/archive1_40_721186066.dbf recid=38 stamp=72
3698804
deleted archive log
archive log filename=/oracle/product/archive1_41_721186066.dbf recid=39 stamp=72
3717030
deleted archive log
archive log filename=/oracle/product/archive1_42_721186066.dbf recid=40 stamp=72
3764613
deleted archive log
archive log filename=/oracle/product/archive1_43_721186066.dbf recid=41 stamp=72
3769867
deleted archive log
archive log filename=/oracle/product/archive1_44_721186066.dbf recid=42 stamp=72
3794417
deleted archive log
archive log filename=/oracle/product/archive1_45_721186066.dbf recid=43 stamp=72
3902025
deleted archive log
archive log filename=/oracle/product/archive1_46_721186066.dbf recid=44 stamp=72
4236317
deleted archive log
archive log filename=/oracle/product/archive1_47_721186066.dbf recid=45 stamp=72
4282785
deleted archive log
archive log filename=/oracle/product/archive1_48_721186066.dbf recid=46 stamp=72
4304919
deleted archive log
archive log filename=/oracle/product/archive1_49_721186066.dbf recid=47 stamp=72
4370209
deleted archive log
archive log filename=/oracle/product/archive1_50_721186066.dbf recid=48 stamp=72
4386458
deleted archive log
archive log filename=/oracle/product/archive1_51_721186066.dbf recid=49 stamp=72
4802562
deleted archive log
archive log filename=/oracle/product/archive1_52_721186066.dbf recid=50 stamp=72
4803364
deleted archive log
archive log filename=/oracle/product/archive1_53_721186066.dbf recid=51 stamp=72
4819276
deleted archive log
archive log filename=/oracle/product/archive1_54_721186066.dbf recid=52 stamp=72
4973795
deleted archive log
archive log filename=/oracle/product/archive1_55_721186066.dbf recid=53 stamp=72
4996028
deleted archive log
archive log filename=/oracle/product/archive1_56_721186066.dbf recid=54 stamp=72
5190722
deleted backup piece
backup piece handle=/oracle/product/10.2.0/db_1/dbs/0dljj8b0_1_1 recid=13 stamp=
725197154
deleted archive log
archive log filename=/oracle/product/archive1_57_721186066.dbf recid=55 stamp=72
5283807
deleted archive log
archive log filename=/oracle/product/archive1_58_721186066.dbf recid=56 stamp=72
5585541
deleted archive log
archive log filename=/oracle/product/archive1_59_721186066.dbf recid=57 stamp=72
5621708
deleted archive log
archive log filename=/oracle/product/archive1_60_721186066.dbf recid=58 stamp=72
5716376
deleted archive log
archive log filename=/oracle/product/archive1_61_721186066.dbf recid=59 stamp=72
5772240
deleted archive log
archive log filename=/oracle/product/archive1_62_721186066.dbf recid=60 stamp=72
5802567
deleted archive log
archive log filename=/oracle/product/archive1_63_721186066.dbf recid=61 stamp=72
5933045
deleted archive log
archive log filename=/oracle/product/archive1_64_721186066.dbf recid=62 stamp=72
5949732
Deleted 31 objects

RMAN> report obsolete


2> ;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
no obsolete backups found
///* to delete the backups taken in the rman, use the below command.
noticed that the backup has been deleted both from rman repository and from disk
RMAN> delete backup of database;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
15 15 1 1 AVAILABLE DISK /oracle/product/10.2.0/db_1/dbs/
0flkf7jk_1_1
17 17 1 1 AVAILABLE DISK /oracle/product/10.2.0/db_1/dbs/
0hlkf7ot_1_1
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/oracle/product/10.2.0/db_1/dbs/0flkf7jk_1_1 recid=15 stamp=
726113921
deleted backup piece
backup piece handle=/oracle/product/10.2.0/db_1/dbs/0hlkf7ot_1_1 recid=17 stamp=
726114077
Deleted 2 objects

RMAN> list backup;

List of Backup Sets


===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
16 Incr 0 6.80M DISK 00:00:03 04-AUG-10
BP Key: 16 Status: AVAILABLE Compressed: NO Tag: LEVEL0
Piece Name: /oracle/product/10.2.0/db_1/dbs/0glkf7oq_1_1
Control File Included: Ckp SCN: 1864696 Ckp time: 04-AUG-10
SPFILE Included: Modification time: 04-AUG-10
RMAN> crosscheck backup;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/product/10.2.0/db_1/dbs/0glkf7oq_1_1 recid=16 stamp=
726114076
Crosschecked 1 objects
////deleted the file from dbs folder and from rman using delete obsolete
-bash-3.00$ cd /oracle
-bash-3.00$ cd product/10.2.0/db_1/dbs
-bash-3.00$
-bash-3.00$ rm 0glkf7oq_1_1
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 02:36:15 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DBN (DBID=1241456785)
RMAN> crosscheck backup;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=142 devtype=DISK
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/oracle/product/10.2.0/db_1/dbs/0glkf7oq_1_1 recid=16 stamp=
726114076
Crosschecked 1 objects

RMAN> delete obsolete;


RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 16 04-AUG-10
Backup Piece 16 04-AUG-10 /oracle/product/10.2.0/db_1/dbs/0
glkf7oq_1_1
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/oracle/product/10.2.0/db_1/dbs/0glkf7oq_1_1 recid=16 stamp=
726114076
Deleted 1 objects

RMAN> crosscheck backup;


using channel ORA_DISK_1
///there is no backup to crosscheck
RMAN> crosscheck backup;
using channel ORA_DISK_1
RMAN> list backup;
///no backups...

//now set the flash recovery destination...size is already specified


-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 02:38:46 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> alter system set db_recovery_file_dest='/oracle/flash_recovery_area';
System altered.
SQL> show parameter db_recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /oracle/flash_recovery_area
db_recovery_file_dest_size big integer 2G

///go to rman and do the incremental backups


SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 02:40:57 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DBN (DBID=1241456785)
RMAN> list backup;
using target database control file instead of recovery catalog
RMAN> backup level 0 database tag=level0;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "level": expecting one of: "archivelog, as, back
up, backupset, blocks, channel, check, copy, copies, controlfilecopy, cumulative
, current, database, datafile, datafilecopy, device, diskratio, db_recovery_file
_dest, db_file_name_convert, duration, filesperset, for, format, full, force, in
cremental, keep, (, maxsetsize, nochecksum, noexclude, nokeep, not, proxy, pool,
reuse, recovery, skip, spfile, setsize, tablespace, tag, to, validate"
RMAN-01007: at line 1 column 8 file: standard input
RMAN> backup incremental level 0 database tag=level0;
Starting backup at 04-AUG-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=159 devtype=DISK
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/product/dbn/system01.dbf
input datafile fno=00003 name=/oracle/product/dbn/sysaux01.dbf
input datafile fno=00005 name=/oracle/product/dbn/example01.dbf
input datafile fno=00002 name=/oracle/product/dbn/undotbs01.dbf
input datafile fno=00010 name=/oracle/indxts.dbf
input datafile fno=00012 name=/oracle/secondf.dbf
input datafile fno=00004 name=/oracle/product/dbn/users01.dbf
input datafile fno=00006 name=/oracle/product/newtablespace.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_nnnd0_LE
VEL0_65ljzv24_.bkp tag=LEVEL0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_ncsn0_LE
VEL0_65lk28j7_.bkp tag=LEVEL0 comment=NONE(((control file backup
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00013 name=/oracle/16k.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_nnnd0_LE
VEL0_65lk2con_.bkp tag=LEVEL0 comment=NONE(spfile backup
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-AUG-10
///and noticed that in the flash recovery area under the directory
flash_recovery_area/DBN/backupset/2010_08_04
3 backup files created.
1->6.8M
2->659MB
3->144K
ie since I have configured the controlfile auto backup, it has taken the control
file and spfile backups
we can figure out which is the control file backup and spfile backup from the ba
ckup info while taking the backup

///List the backups and we will see the backups


RMAN> list backup;

List of Backup Sets


===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
18 Incr 0 659.71M DISK 00:01:10 04-AUG-10
BP Key: 18 Status: AVAILABLE Compressed: NO Tag: LEVEL0
Piece Name: /oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65ljzv24_.bkp
List of Datafiles in backup set 18
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 0 Incr 1865607 04-AUG-10 /oracle/product/dbn/system01.dbf
2 0 Incr 1865607 04-AUG-10 /oracle/product/dbn/undotbs01.dbf
3 0 Incr 1865607 04-AUG-10 /oracle/product/dbn/sysaux01.dbf
4 0 Incr 1865607 04-AUG-10 /oracle/product/dbn/users01.dbf
5 0 Incr 1865607 04-AUG-10 /oracle/product/dbn/example01.dbf
6 0 Incr 1865607 04-AUG-10 /oracle/product/newtablespace.dbf
10 0 Incr 1865607 04-AUG-10 /oracle/indxts.dbf
12 0 Incr 1865607 04-AUG-10 /oracle/secondf.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19 Incr 0 6.80M DISK 00:00:03 04-AUG-10
BP Key: 19 Status: AVAILABLE Compressed: NO Tag: LEVEL0
Piece Name: /oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
csn0_LEVEL0_65lk28j7_.bkp
Control File Included: Ckp SCN: 1865636 Ckp time: 04-AUG-10
SPFILE Included: Modification time: 04-AUG-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
20 Incr 0 128.00K DISK 00:00:00 04-AUG-10
BP Key: 20 Status: AVAILABLE Compressed: NO Tag: LEVEL0
Piece Name: /oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65lk2con_.bkp
List of Datafiles in backup set 20
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
13 0 Incr 1865638 04-AUG-10 /oracle/16k.dbf

///now make some changes in the database and take a level 1 backup
-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 02:52:35 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn exp
Enter password:
Connected.
SQL> create table rmancheck as select * from sys.dba_objects;
Table created.
SQL> desc rmancheck
Name Null? Type
----------------------------------------- -------- ----------------------------
OWNER VARCHAR2(30)
OBJECT_NAME VARCHAR2(128)
SUBOBJECT_NAME VARCHAR2(30)
OBJECT_ID NUMBER
DATA_OBJECT_ID NUMBER
OBJECT_TYPE VARCHAR2(19)
CREATED DATE
LAST_DDL_TIME DATE
TIMESTAMP VARCHAR2(19)
STATUS VARCHAR2(7)
TEMPORARY VARCHAR2(1)
GENERATED VARCHAR2(1)
SECONDARY VARCHAR2(1)
SQL> select count(*) from rmancheck;
COUNT(*)
----------
50487
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 02:56:26 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DBN (DBID=1241456785)
RMAN> backup incremental level 1 database tag=level1;
Starting backup at 04-AUG-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=142 devtype=DISK
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/product/dbn/system01.dbf
input datafile fno=00003 name=/oracle/product/dbn/sysaux01.dbf
input datafile fno=00005 name=/oracle/product/dbn/example01.dbf
input datafile fno=00002 name=/oracle/product/dbn/undotbs01.dbf
input datafile fno=00010 name=/oracle/indxts.dbf
input datafile fno=00012 name=/oracle/secondf.dbf
input datafile fno=00004 name=/oracle/product/dbn/users01.dbf
input datafile fno=00006 name=/oracle/product/newtablespace.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_nnnd1_LE
VEL1_65lkvmof_.bkp tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_ncsn1_LE
VEL1_65lkx2g9_.bkp tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00013 name=/oracle/16k.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_nnnd1_LE
VEL1_65lkx5np_.bkp tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-AUG-10

///noticed that 3 files has been created again with different names....
/// go back to sql and check the system table datafile number

-bash-3.00$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 03:01:14 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> col file_name for a30
SQL> select file_name,file_id from dba_data_files;
FILE_NAME FILE_ID
------------------------------ ----------
/oracle/product/dbn/users01.db 4
f
/oracle/product/dbn/sysaux01.d 3
bf
/oracle/product/dbn/undotbs01. 2
dbf
/oracle/product/dbn/system01.d 1
bf
FILE_NAME FILE_ID
------------------------------ ----------
/oracle/product/dbn/example01. 5
dbf
/oracle/product/newtablespace. 6
dbf
/oracle/indxts.dbf 10
/oracle/16k.dbf 13
/oracle/secondf.dbf 12
9 rows selected.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 03:08:47 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DBN (DBID=1241456785)

RMAN> list backup summary;


using target database control file instead of recovery catalog
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
18 B 0 A DISK 04-AUG-10 1 1 NO LEVEL0
19 B 0 A DISK 04-AUG-10 1 1 NO LEVEL0
20 B 0 A DISK 04-AUG-10 1 1 NO LEVEL0
21 B 1 A DISK 04-AUG-10 1 1 NO LEVEL1
22 B 1 A DISK 04-AUG-10 1 1 NO LEVEL1
23 B 1 A DISK 04-AUG-10 1 1 NO LEVEL1

///also take a full backup to a different location


RMAN> backup database format '/oracle/rmandbfullbackup';
Starting backup at 04-AUG-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=159 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/product/dbn/system01.dbf
input datafile fno=00003 name=/oracle/product/dbn/sysaux01.dbf
input datafile fno=00005 name=/oracle/product/dbn/example01.dbf
input datafile fno=00002 name=/oracle/product/dbn/undotbs01.dbf
input datafile fno=00010 name=/oracle/indxts.dbf
input datafile fno=00012 name=/oracle/secondf.dbf
input datafile fno=00004 name=/oracle/product/dbn/users01.dbf
input datafile fno=00006 name=/oracle/product/newtablespace.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/rmandbfullbackup tag=TAG20100804T031327 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 08/04/2010 03:14:
56
ORA-19504: failed to create file "/oracle/rmandbfullbackup"
ORA-27038: created file already exists
Additional information: 1
RMAN> exit

Recovery Manager complete.


-bash-3.00$ cd /oracle
-bash-3.00$ rm rmandbfullbackup;
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 03:17:26 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DBN (DBID=1241456785)
RMAN> list backup;
using target database control file instead of recovery catalog
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
18 Incr 0 659.71M DISK 00:01:10 04-AUG-10
BP Key: 18 Status: AVAILABLE Compressed: NO Tag: LEVEL0
Piece Name: /oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65ljzv24_.bkp
List of Datafiles in backup set 18
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 0 Incr 1865607 04-AUG-10 /oracle/product/dbn/system01.dbf
2 0 Incr 1865607 04-AUG-10 /oracle/product/dbn/undotbs01.dbf
3 0 Incr 1865607 04-AUG-10 /oracle/product/dbn/sysaux01.dbf
4 0 Incr 1865607 04-AUG-10 /oracle/product/dbn/users01.dbf
5 0 Incr 1865607 04-AUG-10 /oracle/product/dbn/example01.dbf
6 0 Incr 1865607 04-AUG-10 /oracle/product/newtablespace.dbf
10 0 Incr 1865607 04-AUG-10 /oracle/indxts.dbf
12 0 Incr 1865607 04-AUG-10 /oracle/secondf.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19 Incr 0 6.80M DISK 00:00:03 04-AUG-10
BP Key: 19 Status: AVAILABLE Compressed: NO Tag: LEVEL0
Piece Name: /oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
csn0_LEVEL0_65lk28j7_.bkp
Control File Included: Ckp SCN: 1865636 Ckp time: 04-AUG-10
SPFILE Included: Modification time: 04-AUG-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
20 Incr 0 128.00K DISK 00:00:00 04-AUG-10
BP Key: 20 Status: AVAILABLE Compressed: NO Tag: LEVEL0
Piece Name: /oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65lk2con_.bkp
List of Datafiles in backup set 20
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
13 0 Incr 1865638 04-AUG-10 /oracle/16k.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
21 Incr 1 6.34M DISK 00:00:40 04-AUG-10
BP Key: 21 Status: AVAILABLE Compressed: NO Tag: LEVEL1
Piece Name: /oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd1_LEVEL1_65lkvmof_.bkp
List of Datafiles in backup set 21
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 1 Incr 1866174 04-AUG-10 /oracle/product/dbn/system01.dbf
2 1 Incr 1866174 04-AUG-10 /oracle/product/dbn/undotbs01.dbf
3 1 Incr 1866174 04-AUG-10 /oracle/product/dbn/sysaux01.dbf
4 1 Incr 1866174 04-AUG-10 /oracle/product/dbn/users01.dbf
5 1 Incr 1866174 04-AUG-10 /oracle/product/dbn/example01.dbf
6 1 Incr 1866174 04-AUG-10 /oracle/product/newtablespace.dbf
10 1 Incr 1866174 04-AUG-10 /oracle/indxts.dbf
12 1 Incr 1866174 04-AUG-10 /oracle/secondf.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
22 Incr 1 6.80M DISK 00:00:03 04-AUG-10
BP Key: 22 Status: AVAILABLE Compressed: NO Tag: LEVEL1
Piece Name: /oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
csn1_LEVEL1_65lkx2g9_.bkp
Control File Included: Ckp SCN: 1866189 Ckp time: 04-AUG-10
SPFILE Included: Modification time: 04-AUG-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
23 Incr 1 64.00K DISK 00:00:00 04-AUG-10
BP Key: 23 Status: AVAILABLE Compressed: NO Tag: LEVEL1
Piece Name: /oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd1_LEVEL1_65lkx5np_.bkp
List of Datafiles in backup set 23
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
13 1 Incr 1866192 04-AUG-10 /oracle/16k.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
24 Full 657.79M DISK 00:01:24 04-AUG-10
BP Key: 24 Status: AVAILABLE Compressed: NO Tag: TAG20100804T031327
Piece Name: /oracle/rmandbfullbackup
List of Datafiles in backup set 24
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1866803 04-AUG-10 /oracle/product/dbn/system01.dbf
2 Full 1866803 04-AUG-10 /oracle/product/dbn/undotbs01.dbf
3 Full 1866803 04-AUG-10 /oracle/product/dbn/sysaux01.dbf
4 Full 1866803 04-AUG-10 /oracle/product/dbn/users01.dbf
5 Full 1866803 04-AUG-10 /oracle/product/dbn/example01.dbf
6 Full 1866803 04-AUG-10 /oracle/product/newtablespace.dbf
10 Full 1866803 04-AUG-10 /oracle/indxts.dbf
12 Full 1866803 04-AUG-10 /oracle/secondf.dbf
RMAN> crosscheck backup;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=142 devtype=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65ljzv24_.bkp recid=18 stamp=726115322crosschecked backup piece: fou
nd to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
csn0_LEVEL0_65lk28j7_.bkp recid=19 stamp=726115400crosschecked backup piece: fou
nd to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65lk2con_.bkp recid=20 stamp=726115403crosschecked backup piece: fou
nd to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd1_LEVEL1_65lkvmof_.bkp recid=21 stamp=726116211crosschecked backup piece: fou
nd to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
csn1_LEVEL1_65lkx2g9_.bkp recid=22 stamp=726116258crosschecked backup piece: fou
nd to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd1_LEVEL1_65lkx5np_.bkp recid=23 stamp=726116261crosschecked backup piece: fou
nd to be 'EXPIRED'
backup piece handle=/oracle/rmandbfullbackup recid=24 stamp=726117208
Crosschecked 7 objects

RMAN> delete obsolete;


RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 19 04-AUG-10
Backup Piece 19 04-AUG-10 /oracle/flash_recovery_area/DBN/b
ackupset/2010_08_04/o1_mf_ncsn0_LEVEL0_65lk28j7_.bkp
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
csn0_LEVEL0_65lk28j7_.bkp recid=19 stamp=726115400Deleted 1 objects
////* accidentally used the statement delete obsolete and the first level 0 back
up is deleted from both rman repository and DISK
RMAN> crosscheck backup;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65ljzv24_.bkp recid=18 stamp=726115322crosschecked backup piece: fou
nd to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65lk2con_.bkp recid=20 stamp=726115403crosschecked backup piece: fou
nd to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd1_LEVEL1_65lkvmof_.bkp recid=21 stamp=726116211crosschecked backup piece: fou
nd to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
csn1_LEVEL1_65lkx2g9_.bkp recid=22 stamp=726116258crosschecked backup piece: fou
nd to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd1_LEVEL1_65lkx5np_.bkp recid=23 stamp=726116261crosschecked backup piece: fou
nd to be 'EXPIRED'
backup piece handle=/oracle/rmandbfullbackup recid=24 stamp=726117208
Crosschecked 6 objects

RMAN> delete expired backup;


using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
24 24 1 1 EXPIRED DISK /oracle/rmandbfullbackup
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/oracle/rmandbfullbackup recid=24 stamp=726117208
Deleted 1 EXPIRED objects

RMAN>
///delete all the backups;
RMAN> delete backup of database;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
18 18 1 1 AVAILABLE DISK /oracle/flash_recovery_area/DBN/
backupset/2010_08_04/o1_mf_nnnd0_LEVEL0_65ljzv24_.bkp
20 20 1 1 AVAILABLE DISK /oracle/flash_recovery_area/DBN/
backupset/2010_08_04/o1_mf_nnnd0_LEVEL0_65lk2con_.bkp
21 21 1 1 AVAILABLE DISK /oracle/flash_recovery_area/DBN/
backupset/2010_08_04/o1_mf_nnnd1_LEVEL1_65lkvmof_.bkp
23 23 1 1 AVAILABLE DISK /oracle/flash_recovery_area/DBN/
backupset/2010_08_04/o1_mf_nnnd1_LEVEL1_65lkx5np_.bkp
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65ljzv24_.bkp recid=18 stamp=726115322
deleted backup piece
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65lk2con_.bkp recid=20 stamp=726115403
deleted backup piece
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd1_LEVEL1_65lkvmof_.bkp recid=21 stamp=726116211
deleted backup piece
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd1_LEVEL1_65lkx5np_.bkp recid=23 stamp=726116261
Deleted 4 objects

///noticed that only 4 backups have been deleted instead of 5

//noticed that controlfile backup is not deleted


RMAN> delete backup of database;
using channel ORA_DISK_1
///manually delete the controlfile backup ....
RMAN> exit

Recovery Manager complete.


-bash-3.00$ cd /oracle
-bash-3.00$ cd flash_recovery_area/DBN/backupset/2010_08_04
-bash-3.00$ rm o1_mf_ncsn1_LEVEL1_65lkx2g9_.bkp

///now remove the table created to check the level1 backup...


-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 03:34:30 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn exp
Enter password:
Connected.
SQL> drop table rmancheck cascade;
drop table rmancheck cascade
*
ERROR at line 1:
ORA-00905: missing keyword

SQL> drop table rmancheck;


Table dropped.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 03:37:54 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DBN (DBID=1241456785)
RMAN> backup incremental level 0 database tag=level0;
Starting backup at 04-AUG-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=159 devtype=DISK
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/product/dbn/system01.dbf
input datafile fno=00003 name=/oracle/product/dbn/sysaux01.dbf
input datafile fno=00005 name=/oracle/product/dbn/example01.dbf
input datafile fno=00002 name=/oracle/product/dbn/undotbs01.dbf
input datafile fno=00010 name=/oracle/indxts.dbf
input datafile fno=00012 name=/oracle/secondf.dbf
input datafile fno=00004 name=/oracle/product/dbn/users01.dbf
input datafile fno=00006 name=/oracle/product/newtablespace.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_nnnd0_LE
VEL0_65ln9d2j_.bkp tag=LEVEL0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:06
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_ncsn0_LE
VEL0_65lnch3j_.bkp tag=LEVEL0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00013 name=/oracle/16k.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_nnnd0_LE
VEL0_65lncj62_.bkp tag=LEVEL0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-AUG-10

///noticed that 3 backup files created in the flashrecovery area

RMAN> exit

Recovery Manager complete.


-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 03:42:27 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn exp
Enter password:
Connected.
SQL> create table rmancheck as select * from sys.dba_objects;
Table created.

///create a table and take a level 1 backup


SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 03:43:36 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DBN (DBID=1241456785)
RMAN> backup incremental level 1 database tag=level1;
Starting backup at 04-AUG-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=142 devtype=DISK
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/product/dbn/system01.dbf
input datafile fno=00003 name=/oracle/product/dbn/sysaux01.dbf
input datafile fno=00005 name=/oracle/product/dbn/example01.dbf
input datafile fno=00002 name=/oracle/product/dbn/undotbs01.dbf
input datafile fno=00010 name=/oracle/indxts.dbf
input datafile fno=00012 name=/oracle/secondf.dbf
input datafile fno=00004 name=/oracle/product/dbn/users01.dbf
input datafile fno=00006 name=/oracle/product/newtablespace.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_nnnd1_LE
VEL1_65lnn6xh_.bkp tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_ncsn1_LE
VEL1_65lnoonn_.bkp tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00013 name=/oracle/16k.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_nnnd1_LE
VEL1_65lnopqq_.bkp tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-AUG-10
///verified in the flashrecovey area that 3 files have been created

/// now take a full normal backup of the database..

RMAN> backup database format '/oracle/rmanbackup/full' tag=fullbackupnormal;


Starting backup at 04-AUG-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/product/dbn/system01.dbf
input datafile fno=00003 name=/oracle/product/dbn/sysaux01.dbf
input datafile fno=00005 name=/oracle/product/dbn/example01.dbf
input datafile fno=00002 name=/oracle/product/dbn/undotbs01.dbf
input datafile fno=00010 name=/oracle/indxts.dbf
input datafile fno=00012 name=/oracle/secondf.dbf
input datafile fno=00004 name=/oracle/product/dbn/users01.dbf
input datafile fno=00006 name=/oracle/product/newtablespace.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/rmanbackup/full tag=FULLBACKUPNORMAL comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 08/04/2010 03:55:
44
ORA-19504: failed to create file "/oracle/rmanbackup/full"
ORA-27038: created file already exists
Additional information: 1

//the error is because the backup is not able to create control file and spfile
auto backups coz of the same name
the error is removed using
RMAN> backup database format '/oracle/rmanbackup/full_%s_%p' tag=fullbackup;
Starting backup at 04-AUG-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/product/dbn/system01.dbf
input datafile fno=00003 name=/oracle/product/dbn/sysaux01.dbf
input datafile fno=00005 name=/oracle/product/dbn/example01.dbf
input datafile fno=00002 name=/oracle/product/dbn/undotbs01.dbf
input datafile fno=00010 name=/oracle/indxts.dbf
input datafile fno=00012 name=/oracle/secondf.dbf
input datafile fno=00004 name=/oracle/product/dbn/users01.dbf
input datafile fno=00006 name=/oracle/product/newtablespace.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/rmanbackup/full_39_1 tag=FULLBACKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/rmanbackup/full_40_1 tag=FULLBACKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00013 name=/oracle/16k.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/rmanbackup/full_41_1 tag=FULLBACKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-AUG-10

check the file naming convention in the above file...

///delete the backups and try using %U

RMAN> backup database format '/oracle/rmanbackup/full_%u' tag=fulll;


Starting backup at 04-AUG-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/product/dbn/system01.dbf
input datafile fno=00003 name=/oracle/product/dbn/sysaux01.dbf
input datafile fno=00005 name=/oracle/product/dbn/example01.dbf
input datafile fno=00002 name=/oracle/product/dbn/undotbs01.dbf
input datafile fno=00010 name=/oracle/indxts.dbf
input datafile fno=00012 name=/oracle/secondf.dbf
input datafile fno=00004 name=/oracle/product/dbn/users01.dbf
input datafile fno=00006 name=/oracle/product/newtablespace.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 08/04/2010 04:44:
06
ORA-19502: write error on file "/oracle/rmanbackup/full_1alkfg2v", blockno 82177
(blocksize=8192)
ORA-27063: number of bytes read/written is incorrect
Intel SVR4 UNIX Error: 28: No space left on device
Additional information: -1
Additional information: 1048576
ORA-19502: write error on file "/oracle/rmanbackup/full_1alkfg2v", blockno 81921
(blocksize=8192)
ORA-27063: number of bytes read/written is incorrect
Additional information: 720896

///released space by clearing trash


RMAN> backup database format '/oracle/rmanbackup/full_%u' tag=fulll;
Starting backup at 04-AUG-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/product/dbn/system01.dbf
input datafile fno=00003 name=/oracle/product/dbn/sysaux01.dbf
input datafile fno=00005 name=/oracle/product/dbn/example01.dbf
input datafile fno=00002 name=/oracle/product/dbn/undotbs01.dbf
input datafile fno=00010 name=/oracle/indxts.dbf
input datafile fno=00012 name=/oracle/secondf.dbf
input datafile fno=00004 name=/oracle/product/dbn/users01.dbf
input datafile fno=00006 name=/oracle/product/newtablespace.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/rmanbackup/full_1blkfgb3 tag=FULLL comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/rmanbackup/full_1clkfgdo tag=FULLL comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00013 name=/oracle/16k.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-10
channel ORA_DISK_1: finished piece 1 at 04-AUG-10
piece handle=/oracle/rmanbackup/full_1dlkfgdr tag=FULLL comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-AUG-10

////log back into sqlplus and create a table in exp and crash the database
SQL> conn exp
Enter password:
Connected.
SQL> create table abc (col int);
Table created.
SQL> insert into abc values 1;
insert into abc values 1
*
ERROR at line 1:
ORA-03001: unimplemented feature

SQL> insert into abc values (1);


1 row created.
SQL> insert into abc values (9);
1 row created.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 05:15:57 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

//delete the systemfile

///deleted the system file and i still able to query so many things
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/oracle/product/dbn/control01.ctl
/oracle/product/dbn/control02.ctl
/oracle/product/dbn/control03.ctl
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/oracle/product/dbn/system01.dbf
/oracle/product/dbn/undotbs01.dbf
/oracle/product/dbn/sysaux01.dbf
/oracle/product/dbn/users01.dbf
/oracle/product/dbn/example01.dbf
/oracle/product/newtablespace.dbf
/oracle/indxts.dbf
/oracle/secondf.dbf
/oracle/16k.dbf
9 rows selected.
SQL> desc dba_data_files
Name Null? Type
----------------------------------------- -------- ----------------------------
FILE_NAME VARCHAR2(513)
FILE_ID NUMBER
TABLESPACE_NAME VARCHAR2(30)
BYTES NUMBER
BLOCKS NUMBER
STATUS VARCHAR2(9)
RELATIVE_FNO NUMBER
AUTOEXTENSIBLE VARCHAR2(3)
MAXBYTES NUMBER
MAXBLOCKS NUMBER
INCREMENT_BY NUMBER
USER_BYTES NUMBER
USER_BLOCKS NUMBER
ONLINE_STATUS VARCHAR2(7)
SQL> select file_name,file_id from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
FILE_ID
----------
/oracle/product/dbn/users01.dbf
4
/oracle/product/dbn/sysaux01.dbf
3
/oracle/product/dbn/undotbs01.dbf
2

FILE_NAME
--------------------------------------------------------------------------------
FILE_ID
----------
/oracle/product/dbn/system01.dbf
1
/oracle/product/dbn/example01.dbf
5
/oracle/product/newtablespace.dbf
6
FILE_NAME
--------------------------------------------------------------------------------
FILE_ID
----------
/oracle/indxts.dbf
10
/oracle/16k.dbf
13
/oracle/secondf.dbf
12

9 rows selected.
SQL> col file_name for a35
SQL> select file_name,file_id from dba_data_files;
FILE_NAME FILE_ID
----------------------------------- ----------
/oracle/product/dbn/users01.dbf 4
/oracle/product/dbn/sysaux01.dbf 3
/oracle/product/dbn/undotbs01.dbf 2
/oracle/product/dbn/system01.dbf 1
/oracle/product/dbn/example01.dbf 5
/oracle/product/newtablespace.dbf 6
/oracle/indxts.dbf 10
/oracle/16k.dbf 13
/oracle/secondf.dbf 12
9 rows selected.

SQL> select table_name from dba_tables where table_name='RMANCHECK';


select table_name from dba_tables where table_name='RMANCHECK'
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01116: error in opening database file 1
ORA-01110: data file 1: '/oracle/product/dbn/system01.dbf'
ORA-27041: unable to open file
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3

SQL> select file_name,file_id from dba_data_files;


FILE_NAME FILE_ID
----------------------------------- ----------
/oracle/product/dbn/users01.dbf 4
/oracle/product/dbn/sysaux01.dbf 3
/oracle/product/dbn/undotbs01.dbf 2
/oracle/product/dbn/system01.dbf 1
/oracle/product/dbn/example01.dbf 5
/oracle/product/newtablespace.dbf 6
/oracle/indxts.dbf 10
/oracle/16k.dbf 13
/oracle/secondf.dbf 12
9 rows selected.
SQL> conn exp
Enter password:
Connected.
SQL> select table_name from user_tables;
TABLE_NAME
------------------------------
TEST
RMANCHECK
SECSAL
TABA
TABB
ABC
PART
BIGTABLE
8 rows selected.

SQL> conn sys as sysdba


Enter password:
Connected.
SQL> desc dba_tablespaces
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-01116: error in opening database file 1
ORA-01110: data file 1: '/oracle/product/dbn/system01.dbf'
ORA-27041: unable to open file
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3

///shutdown immediate will not work


SQL> shutdown immediate
ORA-01116: error in opening database file 1
ORA-01110: data file 1: '/oracle/product/dbn/system01.dbf'
ORA-27041: unable to open file
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3

//use shutdown abort


SQL> shutdown abort
ORACLE instance shut down.

-bash-3.00$ export ORACLE_SID=hpora


-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 05:27:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup mount
Oracle instance started
database mounted
Total System Global Area 343932928 bytes
Fixed Size 1280132 bytes
Variable Size 130025340 bytes
Database Buffers 209715200 bytes
Redo Buffers 2912256 bytes
RMAN> restore datafile 1
2> ;
Starting restore at 04-AUG-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oracle/product/dbn/system01.dbf
channel ORA_DISK_1: reading from backup piece /oracle/rmanbackup/full_1blkfgb3--
--> here the backup is using the normal backup
channel ORA_DISK_1: restored backup piece 1
piece handle=/oracle/rmanbackup/full_1blkfgb3 tag=FULLL
channel ORA_DISK_1: restore complete, elapsed time: 00:00:46
Finished restore at 04-AUG-10
RMAN> recover datafile 1;
Starting recover at 04-AUG-10
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 65 is already on disk as file /oracle/product/arch
ive1_65_721186066.dbf
archive log thread 1 sequence 66 is already on disk as file /oracle/product/arch
ive1_66_721186066.dbf
archive log thread 1 sequence 67 is already on disk as file /oracle/product/arch
ive1_67_721186066.dbf
archive log filename=/oracle/product/archive1_65_721186066.dbf thread=1 sequence
=65
media recovery complete, elapsed time: 00:00:01
Finished recover at 04-AUG-10

RMAN> alter database open


2> ;
database opened
RMAN> exit

Recovery Manager complete.


-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 05:30:41 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn exp
Enter password:
Connected.
SQL> select * from abc;
COL
----------
1
9
///Here we have seen that the database is fully recovered using the archived log
and the full normal backup...
we have taken the full normal backup after creating the 'rmancheck' table in the
'exp' user.
and the table 'abc' in the 'exp' we have not backed up, but it is recovered usin
g the archive logs and coz archivelogs are present we dont have to use 'RESETLOG
S'
////now delete the normal full backup and check the recovery using incremental b
ackups.
RMAN> crosscheck backup;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=142 devtype=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65ln9d2j_.bkp recid=25 stamp=726118700
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
csn0_LEVEL0_65lnch3j_.bkp recid=26 stamp=726118767
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd0_LEVEL0_65lncj62_.bkp recid=27 stamp=726118768
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd1_LEVEL1_65lnn6xh_.bkp recid=28 stamp=726119046
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
csn1_LEVEL1_65lnoonn_.bkp recid=29 stamp=726119093
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_n
nnd1_LEVEL1_65lnopqq_.bkp recid=30 stamp=726119094
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/oracle/rmanbackup/full_1blkfgb3 recid=38 stamp=726122851
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/oracle/rmanbackup/full_1clkfgdo recid=39 stamp=726122938
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/oracle/rmanbackup/full_1dlkfgdr recid=40 stamp=726122939
Crosschecked 9 objects

///full backup is removed


RMAN> delete expired backup;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
38 38 1 1 EXPIRED DISK /oracle/rmanbackup/full_1blkfgb3
39 39 1 1 EXPIRED DISK /oracle/rmanbackup/full_1clkfgdo
40 40 1 1 EXPIRED DISK /oracle/rmanbackup/full_1dlkfgdr
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/oracle/rmanbackup/full_1blkfgb3 recid=38 stamp=726122851
deleted backup piece
backup piece handle=/oracle/rmanbackup/full_1clkfgdo recid=39 stamp=726122938
deleted backup piece
backup piece handle=/oracle/rmanbackup/full_1dlkfgdr recid=40 stamp=726122939
Deleted 3 EXPIRED objects

RMAN> list backup summary;

List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
25 B 0 A DISK 04-AUG-10 1 1 NO LEVEL0
26 B 0 A DISK 04-AUG-10 1 1 NO LEVEL0
27 B 0 A DISK 04-AUG-10 1 1 NO LEVEL0
28 B 1 A DISK 04-AUG-10 1 1 NO LEVEL1
29 B 1 A DISK 04-AUG-10 1 1 NO LEVEL1
30 B 1 A DISK 04-AUG-10 1 1 NO LEVEL1

///now delete the system file and see


RMAN> exit

Recovery Manager complete.


-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 05:37:59 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> desc dba_tablespaces
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-01116: error in opening database file 1
ORA-01110: data file 1: '/oracle/product/dbn/system01.dbf'
ORA-27041: unable to open file
Intel SVR4 UNIX Error: 2: No such file or directory
Additional information: 3

SQL> exit
///after this, tried to restore the datafile 1 directly without shutting the dat
abase. never succeeded
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 05:38:44 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DBN (DBID=1241456785)
RMAN> restore datafile 1;
Starting restore at 04-AUG-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=143 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oracle/product/dbn/system01.dbf
channel ORA_DISK_1: reading from backup piece /oracle/flash_recovery_area/DBN/ba
ckupset/2010_08_04/o1_mf_nnnd0_LEVEL0_65ln9d2j_.bkp
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/04/2010 05:39:01
ORA-19870: error reading backup piece /oracle/flash_recovery_area/DBN/backupset/
2010_08_04/o1_mf_nnnd0_LEVEL0_65ln9d2j_.bkp
ORA-19573: cannot obtain exclusive enqueue for datafile 1

// now i didnt specify the oracle sid using


export ORACLE_SID=hpora

RMAN> exit

Recovery Manager complete.


-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 05:39:16 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown abort
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Wed Aug 4 05:40:31 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> restore datafile 1;
Starting restore at 04-AUG-10
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/04/2010 05:40:38
RMAN-12010: automatic channel allocation initialization failed
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Intel SVR4 UNIX Error: 2: No such file or directory
RMAN> startup mount
Oracle instance started
database mounted
Total System Global Area 343932928 bytes
Fixed Size 1280132 bytes
Variable Size 130025340 bytes
Database Buffers 209715200 bytes
Redo Buffers 2912256 bytes
RMAN> sql 'select instance_name from v$instance';
using target database control file instead of recovery catalog
sql statement: select instance_name from v$instance
RMAN> restore datafile 1;
Starting restore at 04-AUG-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oracle/product/dbn/system01.dbf
channel ORA_DISK_1: reading from backup piece /oracle/flash_recovery_area/DBN/ba
ckupset/2010_08_04/o1_mf_nnnd0_LEVEL0_65ln9d2j_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_nnnd0_LE
VEL0_65ln9d2j_.bkp tag=LEVEL0
channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 04-AUG-10
RMAN> recover datafile 1;
Starting recover at 04-AUG-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /oracle/product/dbn/system01.dbf
channel ORA_DISK_1: reading from backup piece /oracle/flash_recovery_area/DBN/ba
ckupset/2010_08_04/o1_mf_nnnd1_LEVEL1_65lnn6xh_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/oracle/flash_recovery_area/DBN/backupset/2010_08_04/o1_mf_nnnd1_LE
VEL1_65lnn6xh_.bkp tag=LEVEL1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
starting media recovery
archive log thread 1 sequence 65 is already on disk as file /oracle/product/arch
ive1_65_721186066.dbf
archive log thread 1 sequence 66 is already on disk as file /oracle/product/arch
ive1_66_721186066.dbf
archive log thread 1 sequence 67 is already on disk as file /oracle/product/arch
ive1_67_721186066.dbf
archive log thread 1 sequence 68 is already on disk as file /oracle/product/arch
ive1_68_721186066.dbf
archive log filename=/oracle/product/archive1_65_721186066.dbf thread=1 sequence
=65
archive log filename=/oracle/product/archive1_66_721186066.dbf thread=1 sequence
=66
media recovery complete, elapsed time: 00:00:04
Finished recover at 04-AUG-10
RMAN> alter database open;
database opened

-bash-3.00$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 4 05:48:02 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn exp
Enter password:
Connected.
SQL> select * from abc;
COL
----------
1
9

////verified that all the datas are recovered using incremental.

///Here first the datafile 1 only is restored using the level 0 backup,
then while recovering the database recovered the level 1 backup and then from th
e archive logs

successfully completed my real time scenario:)