Atikh's DBA blog
  • Home
  • Oracle
  • MySQL
  • MongoDB
  • PostgreSQL
  • Snowflake
  • About Me
  • Contact Us

Oracle : Starting with RMAN Commands

 Atikh Shaikh     Backup and Recovery, oracle, Oracle 12c, RMAN     No comments   

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
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]
  • Share This:  
  •  Facebook
  •  Twitter
  •  Instagram
  •  Pin
  •  linkedin
  •  reddit
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Author

Atikh Shaikh
View my complete profile

Categories

  • MongoDB (18)
  • Oracle 12c (30)
  • Oracle12cR2 New Feature (3)
  • PostgreSQL (20)
  • RMAN (10)
  • Snowflake (8)
  • mysql (23)
  • oracle (74)

Blog Archive

  • ►  2018 (38)
    • ►  November (25)
    • ►  December (13)
  • ▼  2019 (33)
    • ▼  January (15)
      • Data Types in MongoDB
      • Oracle : RMAN Introduction
      • ORA-00265: instance recovery required, cannot set ...
      • Oracle : Starting with RMAN Commands
      • Oracle RMAN : Incremental Backups
      • MongoDB 4.0 New Features
      • Oracle RMAN : File Section for backup of large dat...
      • ORA-19804, ORA-19809: limit exceeded for recovery ...
      • Oracle RMAN: Fast Incremental Backups
      • The DUAL table in oracle
      • Oracle : Drop Pluggable Database (PDB) in 12c/19c/...
      • Oracle : The oerr Utility (Oracle Error)
      • Oracle RMAN : Incrementally Updated Backups
      • MySQL 8.0 New Features
      • Postgres spooling file and other command line options
    • ►  February (6)
    • ►  March (2)
    • ►  April (5)
    • ►  May (5)
  • ►  2020 (5)
    • ►  April (1)
    • ►  May (2)
    • ►  July (2)
  • ►  2021 (8)
    • ►  June (3)
    • ►  July (3)
    • ►  August (1)
    • ►  December (1)
  • ►  2022 (33)
    • ►  May (3)
    • ►  June (10)
    • ►  July (3)
    • ►  August (4)
    • ►  September (8)
    • ►  October (3)
    • ►  November (2)
  • ►  2023 (14)
    • ►  February (1)
    • ►  April (5)
    • ►  May (2)
    • ►  June (1)
    • ►  September (1)
    • ►  October (1)
    • ►  December (3)
  • ►  2024 (5)
    • ►  January (2)
    • ►  March (3)
  • ►  2025 (6)
    • ►  March (1)
    • ►  April (3)
    • ►  May (2)

Popular Posts

  • ORA-29283: invalid file operation: unexpected "LFI" error (1509)[29437]
    I was trying to export the schema in my windows PC, it got stuck with below error    C:\Users\shaik\Videos\technodba exp>expdp userid...
  • PostgreSQL : How to get data directory location for PostgreSQL instance
    Sometimes, you start working on a PostgreSQL instance but forget about the data directory, here we will discuss different methods to know th...
  • Oracle 23ai : Use of NOVALIDATE Constraints in IMPDP
    While performing impdp operations in the Oracle database, Oracle performs validation checks for every constraint on the imported table, that...
  • ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
    In previous articles, we have learned about user creation and grants  in MySQL in detail, but there are a few privileges called global priv...
  • Oracle Dataguard Broker Configuration (DGMGRL)
    Data Guard Broker is a command-line interface that makes managing primary and standby databases easy. DBA can use a single command to switch...

Labels

oracle Oracle 12c mysql PostgreSQL MongoDB oracle 19c Oracle23c oracle19c Orale PDB-CDB oracle12c python AWS Oracle ASM Virtualbox pluggable database storage engine

Pages

  • Disclaimer
  • Privacy Policy

Follow TechnoDBA

Copyright © Atikh's DBA blog | Powered by Blogger