article-preview

RMAN an introduction

RMAN  (Recovery Manager) recovery is based on SCN ( system change numbers) - they are an expression of linear date time expressions. They are also called technically the change vectors. which represents the time and transaction. The transaction means 

1. internal (recursive call) transactions also building metadata. 
2. application data transactions occupying the storage with the DML statements. 

article-preview

RMAN Backup Concepts

RMAN Backup Concepts (source Oracle)

Media Recovery enabled - RPO and RTO can be implemented.
Media Recovery disabled - RPO and RTO are irrelavent.

Backup can be taken using RMAN in those two states. Media Recovery Enabled (database in archivelog mode) and Media Recovery Disabled (database in noarchivelog mode).

article-preview

BackingUpTheDatabase

Backing Up the Database (Source Oracle)

Use the BACKUP command to back up all or part of your database.

Backing Up the Database: Advanced Topics to learn about more advanced topics such as backup optimization, duplexing, backup encryption, and restartable backups

Oracle Data Guard Concepts and Administration to learn how to perform RMAN backup and recovery in a Data Guard environment

article-preview

OracleFlashback

Oracle Database includes the following logical flashback features:

Oracle Database includes the following logical flashback features:

Oracle Flashback Query

You can specify a target time and run queries against a database, viewing results as they would appear at the target time. To recover from an unwanted change like an update to a table, you could choose a target time before the error and run a query to retrieve the contents of the lost rows. Oracle Database Development Guide explains how to use this feature.

article-preview

Purpose of Backup and Recovery

1. Oracle Backup and Recovery Solutions

Purpose of Backup and Recovery:

As a backup administrator, your principal duty is to devise, implement, and manage a backup and recovery strategy. In general, the purpose of a backup and recovery strategy is to protect the database against data loss and reconstruct the database after data loss. Typically, backup administration tasks include the following:

article-preview

RMAN Environment

RMAN Environment

Recovery Manager (RMAN) is an Oracle Database client that performs backup and recovery tasks on your databases and automates administration of your backup strategies. It greatly simplifies backing up, restoring, and recovering database files.

 

article-preview

Rman at work

Connecting to RMAN with "NOCATALOG" and "CATALOG"

"rman" client application can be opened directly from command prompt

c:\Oracle\bin>set ORACLE_SID=srinivas

c:\Oracle\bin>echo %ORACLE_SID%
srinivas

c:\Oracle\bin>rman

article-preview

RMAN Troubleshooting

                    Troubleshooting RMAN

Run the following command to find if RMAN sessions exist in the database instance (format the output for readability):

SELECT     p.SPID, 
    s.EVENT, 
    s.SECONDS_IN_WAIT AS SEC_WAIT, 
           sw.STATE, 
    s.CLIENT_INFO
FROM       V$SESSION_WAIT sw, 
    V$SESSION s, 
    V$PROCESS p
WHERE      sw.EVENT LIKE '%Backup%'
AND        s.SID=sw.SID
AND        s.PADDR=p.ADDR;

article-preview

Oracle SW installation

Installing the Oracle Database Software on the Destination Host

When the source and destination host are different, you must install the Oracle Database software on the destination host, so that the auxiliary instance can be created.

Note:

Ensure that you install the same release of Oracle Database software, with the same patch level, on both the source and destination host.

article-preview

Duplicating database prerequisites

                    Naming Duplicate Database Files

When you duplicate a database, RMAN generates names for the database files in the duplicate database. This includes the control files, data files, temp files, and online redo log files.

Depending on your duplication scenario, you can name the duplicate database files by using one of the following techniques:

a. Using the Same Names for Database Files in the Source Database and Duplicate Database
b. Using Different Names for the Database Files in the Source Database and Duplicate Database

article-preview

Naming Duplicate datafile names

                    Naming Duplicate Database Files

When you duplicate a database, RMAN generates names for the database files in the duplicate database. This includes the control files, data files, temp files, and online redo log files.

Depending on your duplication scenario, you can name the duplicate database files by using one of the following techniques:

a. Using the Same Names for Database Files in the Source Database and Duplicate Database
b. Using Different Names for the Database Files in the Source Database and Duplicate Database

article-preview

Example scripts for duplicate

edit tnsnames.ora on the remote host where binaries were cloned and network assistant configured listener is configured. 

dupdb = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dup.example.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dup)))
srcdb = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=src.example.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=src)))

article-preview

RMAN Choosing A Duplication Technique

Choosing a Duplication Technique

Your business requirements and the database environment determine which duplication technique is best for your situation.

article-preview

RMAN Preparing The Auxiliary Instance

Preparing the Auxiliary Instance

RMAN uses an auxiliary instance to create the duplicate database. You must prepare the auxiliary instance before you begin the duplication.

Depending on your duplication scenario, you need to perform either some or the tasks that are described in this section. Preparing the auxiliary instance includes the following tasks....

article-preview

RMAN Duplicating The Whole Database

Choosing a Duplication Technique

Your business requirements and the database environment determine which duplication technique is best for your situation.

article-preview

RMAN Duplicating CDBs And PDBs

Duplicating CDBs and PDBs
(source Oracle Docs)

Use the DUPLICATE command to duplicate CDBs, one or more PDBs, sparse CDBs, and sparse PDBs. The steps to duplicate CDBs and PDBs are similar to those of duplicating non-CDBs with minor variations to the procedure for duplicating a non-CDB. This section describes how to duplicate CDBs and PDBs.

article-preview

RMAN Duplicating Sparse PDBs

                Duplicating CDBs and PDBs
                  (source Oracle Docs)

Use the DUPLICATE command to duplicate CDBs, one or more PDBs, sparse CDBs, and sparse PDBs. The steps to duplicate CDBs and PDBs are similar to those of duplicating non-CDBs with minor variations to the procedure for duplicating a non-CDB. This section describes how to duplicate CDBs and PDBs.

article-preview

RMAN Duplicating Databases To OracleCloud

Duplicating Databases to Oracle Cloud
(Source: Oracle Docs)

Use the DUPLICATE command to duplicate an on-premise database to Oracle Cloud. 
Both backup-based and active duplication are supported.

Oracle databases on Oracle Cloud are always encrypted.

article-preview

 Duplicating an Oracle Cloud Database as an On-premise Database

 Duplicating an Oracle Cloud Database as an On-premise Database
 (Source: Oracle Docs)

Use the DUPLICATE command to duplicate an Oracle Cloud Database as an on-premise database. Both backup-based and active duplication are supported.

article-preview

RMAN Restarting DUPLICATE After A Failure

Restarting DUPLICATE After a Failure
(Source: Oracle Docs)

RMAN automatically optimizes a DUPLICATE command that is a repeat of a previously failed DUPLICATE command.
The repeat DUPLICATE command notices which data files were successfully copied earlier and does not copy them again...

article-preview

RMAN Duplicating Databases

Duplicating Databases
=====================

This chapter contains the following topics:

Specifying Alternative Names for Duplicate Database Files

Making Disk Backups Accessible Without Shared Disk....

article-preview

RMAN Creating Transportable Tablespace Sets

Overview of Creating Transportable Tablespace Sets
(Source: Oracle Docs)

We can use RMAN or the transportable tablespaces feature to create transportable tablespace sets.

Purpose of Creating Transportable Tablespace Sets...

article-preview

RMAN ENHANCEMENTS

RMAN ENHANCEMENTS
 Oracle 12c New Features 07 – RMAN Enhancements

SrinivasMaddali

RMAN Enhancements

The following sections describe improvements to Recovery Manager (RMAN).

article-preview

RMAN LIST COMMAND USAGE

RMAN LIST COMMAND USAGE
 The LIST command allows the backup data to be listed in the RMAN utility

Database

To list all existing backups use:

LIST BACKUP

article-preview

CONNECTIVITY

CONNECTIVITY

 RMAN Connectivity and default database backup

Connect to RMAN take backup.

Using NOCATALOG, which is the default method of connecting to RMAN, one can connect using operating system authentication or Oracle Net Authentication.

article-preview

RMAN RECOVER MANAGER ORACLE

 RMAN (Recovery Manager) is a backup and recovery manager supplied for Oracle databases (from version 8) created by the Oracle Corporation. It provides database backup, restore, and recovery capabilities addressing high availability and disaster recovery concerns.