In previous article we have discussed introduction to RMAN, Now will learn RMAN commands and taking backup of database and understanding its output.
RMAN is very easy tool to interact with, it understand simple English language. If we want to take backup then just type backup in RMAN prompt along with whether backup of database or tablespace, so we want to take backup of database then backup database will do the needful.
RUN Block
In order to execute number of RMAN commands together like restore, recover and open then we need to use RUN block. This will run commands sequentially.
for example
This run block first restore the database, then recover database and at last it will open database.
Taking First Full Backup
Now will take full database backup and explain each line in details. Backup of database will get started on disk at FRA (Fast Recovery Area) location. Those who do not know FRA, I will write another post but for here understand it is defined with bellow two parameters
DB_RECOVERY_FILE_DEST
DB_RECOVERY_FILE_DEST_SIZE
Now invoke RMAN client and execute below command to start backup
This is command to start database backup with archive log
This is finish of complete database backup
[Also read : RMAN introduction, User Managed Backups, RMAN Disk backup]
RMAN is very easy tool to interact with, it understand simple English language. If we want to take backup then just type backup in RMAN prompt along with whether backup of database or tablespace, so we want to take backup of database then backup database will do the needful.
RUN Block
In order to execute number of RMAN commands together like restore, recover and open then we need to use RUN block. This will run commands sequentially.
for example
RMAN> run
2>
{
3>
restore database;
4>
recover database;
5>
alter database open;
6>
}
This run block first restore the database, then recover database and at last it will open database.
Taking First Full Backup
Now will take full database backup and explain each line in details. Backup of database will get started on disk at FRA (Fast Recovery Area) location. Those who do not know FRA, I will write another post but for here understand it is defined with bellow two parameters
DB_RECOVERY_FILE_DEST
DB_RECOVERY_FILE_DEST_SIZE
Now invoke RMAN client and execute below command to start backup
RMAN> backup database plus
archivelog;
This is command to start database backup with archive log
Starting backup at 03-JAN-19
This indicates, backup starting at mentioned date
current log archived
This line shows current log is archived
using target database control file
instead of recovery catalog
This line indicates, RMAN is using target control file and not recovery catalog
allocated channel: ORA_DISK_1
This indicates, we are using disk channel
channel ORA_DISK_1: sid=21 devtype=DISK
channel
ORA_DISK_1: starting archive log backupset
This indicates starting of archived log backup set, its list and sequence is shown in subsequent below lines
channel ORA_DISK_1: specifying archive
log(s) in backup set
input
archive log thread=1 sequence=2 recid=1 stamp=992908371
input
archive log thread=1 sequence=36 recid=2 stamp=996615449
channel
ORA_DISK_1: starting piece 1 at 03-JAN-19
channel
ORA_DISK_1: finished piece 1 at 03-JAN-19
piece
handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2019_01_03\O1_MF_ANNNN_TAG20190
103T213732_G2WDT5NH_.BKP
tag=TAG20190103T213732 comment=NONE
channel
ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished
backup at 03-JAN-19
This indicates backup of archived log is finished, it automatically generates tag, format for tag is TAGYYYYMMDDTHHMMSS
Starting backup at 03-JAN-19
using
channel ORA_DISK_1
This is start of full database backup, its take single disk channel as we have not mentioned any.
channel ORA_DISK_1: starting full
datafile backupset
channel
ORA_DISK_1: specifying datafile(s) in backupset
input
datafile fno=00003 name=C:\ORACLEXE\ORADATA\XE\SYSAUX.DBF
input
datafile fno=00001 name=C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
input
datafile fno=00004 name=C:\ORACLEXE\ORADATA\XE\USERS.DBF
input
datafile fno=00005 name=C:\ORACLEXE\ORADATA\XE\TECHON_TBS.DBF
input
datafile fno=00002 name=C:\ORACLEXE\ORADATA\XE\UNDO.DBF
This are the datafiles which are getting backup
channel ORA_DISK_1: starting piece 1 at
03-JAN-19
channel
ORA_DISK_1: finished piece 1 at 03-JAN-19
piece
handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2019_01_03\O1_MF_NNNDF_TAG20190
103T213734_G2WDT7CR_.BKP
tag=TAG20190103T213734 comment=NONE
channel
ORA_DISK_1: backup set complete, elapsed time: 00:00:45
At this point creation of backup set for full database is complete
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 03-JAN-19
channel
ORA_DISK_1: finished piece 1 at 03-JAN-19
piece
handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2019_01_03\O1_MF_NCSNF_TAG20190
103T213734_G2WDVOWG_.BKP
tag=TAG20190103T213734 comment=NONE
channel
ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished
backup at 03-JAN-19
control file and spfile are being backed up here. This will automatically gets backed up.
Starting backup at 03-JAN-19
current
log archived
using
channel ORA_DISK_1
channel
ORA_DISK_1: starting archive log backupset
channel
ORA_DISK_1: specifying archive log(s) in backup set
input
archive log thread=1 sequence=37 recid=3 stamp=996615503
channel
ORA_DISK_1: starting piece 1 at 03-JAN-19
channel
ORA_DISK_1: finished piece 1 at 03-JAN-19
piece
handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2019_01_03\O1_MF_ANNNN_TAG20190
103T213823_G2WDVRL6_.BKP
tag=TAG20190103T213823 comment=NONE
channel
ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished
backup at 03-JAN-19
Current redo log is archived and backed up it as well.This is finish of complete database backup
[Also read : RMAN introduction, User Managed Backups, RMAN Disk backup]
0 comments:
Post a Comment