A simple RMAN backup scripts for Windows Env

posted Jun 5, 2012, 3:28 PM by Sachchida Ojha   [ updated Jun 5, 2012, 3:35 PM ]

C:\Users\snojha>rman target=sys/<password>@orcl

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Jun 5 18:13:01 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1312789174)

RMAN> connect catalog rman/<password>@rcat

connected to recovery catalog database

RMAN> configure controlfile autobackup format for device type disk to 'c:/rmanbackup/%F';
RMAN> configure controlfile autobackup on;

RMAN> run{
allocate channel d1 type disk;
allocate channel d2 type disk;
allocate channel d3 type disk;
allocate channel d4 type disk;
backup tag FULL_DB format 'c:/rmanbackup/db_%t_%s.bk' (database);
release channel d1;
release channel d2;
release channel d3;
release channel d4;
}

Screen output
==========================================================================================
allocated channel: d1
channel d1: SID=37 device type=DISK

allocated channel: d2
channel d2: SID=193 device type=DISK

allocated channel: d3
channel d3: SID=226 device type=DISK

allocated channel: d4
channel d4: SID=34 device type=DISK

Starting backup at 05-JUN-12
channel d1: starting full datafile backup set
channel d1: specifying datafile(s) in backup set
input datafile file number=00006 name=C:\APP\ORACLE\ORADATA\ORCL\APP_DATA01
input datafile file number=00005 name=C:\APP\ORACLE\ORADATA\ORCL\EXAMPLE01.DBF
input datafile file number=00004 name=C:\APP\ORACLE\ORADATA\ORCL\USERS01.DBF
channel d1: starting piece 1 at 05-JUN-12
channel d2: starting full datafile backup set
channel d2: specifying datafile(s) in backup set
input datafile file number=00003 name=C:\APP\ORACLE\ORADATA\ORCL\UNDOTBS01.DBF
input datafile file number=00014 name=C:\APP\ORACLE\ORADATA\ORCL\PART_IDX03
input datafile file number=00001 name=C:\APP\ORACLE\ORADATA\ORCL\SYSTEM01.DBF
input datafile file number=00002 name=C:\APP\ORACLE\ORADATA\ORCL\SYSAUX01.DBF
channel d2: starting piece 1 at 05-JUN-12
channel d3: starting full datafile backup set
channel d3: specifying datafile(s) in backup set
input datafile file number=00007 name=C:\APP\ORACLE\ORADATA\ORCL\APP_IDX01
input datafile file number=00010 name=C:\APP\ORACLE\ORADATA\ORCL\PART_DATA03
input datafile file number=00012 name=C:\APP\ORACLE\ORADATA\ORCL\PART_IDX01
input datafile file number=00015 name=C:\APP\ORACLE\ORADATA\ORCL\PART_IDX04
channel d3: starting piece 1 at 05-JUN-12
channel d4: starting full datafile backup set
channel d4: specifying datafile(s) in backup set
input datafile file number=00008 name=C:\APP\ORACLE\ORADATA\ORCL\PART_DATA01
input datafile file number=00009 name=C:\APP\ORACLE\ORADATA\ORCL\PART_DATA02
input datafile file number=00011 name=C:\APP\ORACLE\ORADATA\ORCL\PART_DATA04
input datafile file number=00013 name=C:\APP\ORACLE\ORADATA\ORCL\PART_IDX02
channel d4: starting piece 1 at 05-JUN-12
channel d3: finished piece 1 at 05-JUN-12
piece handle=C:\RMANBACKUP\DB_785183133_23.BK tag=FULL_DB comment=NONE
channel d3: backup set complete, elapsed time: 00:00:20
channel d4: finished piece 1 at 05-JUN-12
piece handle=C:\RMANBACKUP\DB_785183143_24.BK tag=FULL_DB comment=NONE
channel d4: backup set complete, elapsed time: 00:00:25
channel d2: finished piece 1 at 05-JUN-12
piece handle=C:\RMANBACKUP\DB_785183130_22.BK tag=FULL_DB comment=NONE
channel d2: backup set complete, elapsed time: 00:01:32
channel d1: finished piece 1 at 05-JUN-12
piece handle=C:\RMANBACKUP\DB_785183129_21.BK tag=FULL_DB comment=NONE
channel d1: backup set complete, elapsed time: 00:06:54
Finished backup at 05-JUN-12

Starting Control File and SPFILE Autobackup at 05-JUN-12
piece handle=C:\RMANBACKUP\C-1312789174-20120605-01 comment=NONE
Finished Control File and SPFILE Autobackup at 05-JUN-12

released channel: d1
released channel: d2
released channel: d3
released channel: d4

RMAN>
==========================================================================================
Comments