RMAN Backup With Some Options

Some Channel Command and Options:

 Channel Control Option or Command Functions
 MAXPIECESIZE Specifies the maximum size of each backup piece created on this channel.
 FORMAT Specifies the format to use for the names of backup pieces that are created on this channel. If you do not specify a format, RMAN uses %U by default, which guarantees a unique identifier.
 RATE Sets the maximum number of bytes (default), kilobtyes (K), megabytes (M), or gigabtyes (G) that RMAN reads on this channel. This parameter sets an upper limit for bytes read so that RMAN does not consume too much disk bandwidth and degrade performance.
 MAXOPENFILES Controls the maximum number of input files that a BACKUP command can have opens at any given time (the default is 8). Use this parameter to prevent "Too many open files" error messages when backing up a large number of files into a single backup set.

RMAN> run

{

allocate channel c1 type disk maxopenfiles 20 rate 1M maxpiecesize 50M;

allocate channel c2 type disk maxopenfiles 20 rate 1M maxpiecesize 50M;

backup database;

}

 Format Meaning
 %a Specifies the activation ID of the database.
 %c Specifies the copy number of the backup piece within a set of duplexed backup pieces.
 %d Specifies the name of the database.
 %D Specifies the current day of the month from the Gregorian calendar.
 %e Specifies the archived log sequence number.
 %f Specifies the absolute file number.
 %F Combines the database identifier (DBID), day, month, year, and sequence number into a unique and repeatable generated name.
 %h Specifies the archived redo log thread number.
 %I Specifies the DBID.
 %M Specifies the month in the Gregorian calendar in format MM.
 %N Specifies the tablespace name.
 %n Specifies the name of the database, padded on the right with n characters to a total length of eight characters.
 %p Specifies the piece number within the backup set.
 %s Specifies the backup set number.
 %t Specifies the backup set timestamp.
 %T Specifies the year, month, and day in the Gregorian calendar.
 %u Specifies an eight-character name constituted by compressed representations of the backup set or image copy number.
 %U Specifies a system-generated unique filename. (This is the default.)

RMAN> run

{

allocate channel c1 device type disk format 'c:\rman\%d%D%M%Y';

allocate channel c2 device type disk format 'c:\rman\%d%D%M%Y';

backup database;

}

 

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

 

Delete any data file.

 

SQL> startup;

ORACLE instance started.

 

Total System Global Area  167772160 bytes

Fixed Size                  1247876 bytes

Variable Size              79693180 bytes

Database Buffers           79691776 bytes

Redo Buffers                7139328 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 1 - see DBWR trace file

ORA-01110: data file 1: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\DBA20\SYSTEM01.DBF'

 

RMAN> run

{

allocate channel c1 type disk;

allocate channel c2 type disk;

allocate channel c3 type disk;

restore database;

recover database;

}

 

SQL> alter database open;

 Database altered.

Comments