• Oracle Database Backup and Recovery

    Oracle Database Backup and Recovery

    When it comes to performing DBA job the most commonly concept known is taking backup of database, but it’s not as easy looks this is the most important and widely spread topic to work with, if are a part of database backup and recovery team then it’s your cream part of work in the day to day activity, and you need to be updated with each patch comes on the market and with that new features design at each client’s requirement about backup scripts and schedule type. In this article, we will discuss Oracle Database Backup and recovery.


    If you want to discuss detail one thing you firstly know the definition of that else, it’s just foolish to comment on something, so we will start with that, first, what is Backup? “A backup is an exact mirror copy of the primary data and its parameter.” Backup and recovery allude to the way toward moving down data in the event of a misfortune and setting up frameworks that permit that data recovery due to data loss. Backing up data requires copying and archiving computer data so that it is accessible in case of data deletion or corruption. Data from a prior time may just be recovered on the off chance that it has been backed up.


    There are types of backup which called Logical backup and physical backup respectively, we will look those types in details,


    Logical Backup: In more common word to mention it as Data Pump backup, a logical backup copies data, but not physical files, from one location to another. A logical backup is used to move or archive a database, tables, or schemas and to verify database structures.


    A logical export backup creates important Structured Query Language (SQL) articulations to get every single table data that is composed of a binary file. A logical export backup does not contain a database instance-related data, for example, the physical disk location, so you can restore similar data on another database machine. Periodic logical export backups (in any event week after week) are suggested on the off chance that physical backups fail or the database machine winds up inaccessible.


    Physical Backup: when it comes to take physical backup of the database there are so many ways to make it effectively done a few of those like Cold backup, Hot Backup, and now most popular and effective this day is RMAN (Recovery manager) backup, in RMAN, there are also different ways to get the backup done like Full backup, incremental, Differential, Cumulative, transactional and other comes with each update from ORACLE by then and Now and Forever.


    Offline or Cold backups are performed when the database is completely shutdown. The disadvantage of an offline backup is that it cannot be done if the database needs to be run 24/7. Additionally, you can only recover the database up to the point when the last backup was made unless the database is running in ARCHIVELOG mode. The following files need to be copied while taking cold backup:


    All the datafiles, All the tempfiles, All the controlfiles, Listener, tnsnames and sqlnet files, Pfile, spfile and password files


    After shutting down the oracle instance, copy all the above required files to a Cold Path, and then finally will start the instance again. You can query to find the required files to be copied.


    Hot backups are also referred to as online backups because the database is available during the backup procedure. RMAN is more efficient than user-managed backups and automates most tasks. Having said that, one of the best ways to gain an understanding of Oracle backup and recovery internals is to make a hot backup and then use that backup to restore and recover your database. Manually issuing the commands involved in a hot backup, followed by a restore and recovery, helps you understand the role of each type of file (control files, data files, archive redo logs, online redo logs) in a restore-and-recovery scenario.


    Oracle Recovery Manager (RMAN) is at the same time simple and complex, it's syntax can be as direct as 'backup database' to make a whole database backup, and as complex as it can be to make possible the most sophisticated and complex backup and recovery tasks.

    The RMAN environment consists of the utilities and databases that play a role in backing up our data.

    At a minimum, the environment for RMAN must include the following:

    • The target database to be backed up.
    • The RMAN client (rman executable and recover.bsq),


    Which interprets backup and recovery commands, directs server sessions to execute those commands, and records our backup and recovery activity in the target database control file.


    When it comes to updates in backup, recovery features oracle always found something new and use full to DBA work and more secure way to handle data backup some new features like Archived Log Deletion Policy Enhancements, Improved Handling of Long-Term Backups, Virtual Private Catalog, And many to count and coming in the queue.