Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

1. Question 1. What Is Scn?

Answer :
The SCN is an Oracle server–assigned number that indicates a committed version of the database. It’s quite possible
that different datafiles in the database might have a different SCN at any given point in time.
At checkpoint, the server will makes all database file SCNs and control file SCN consistent with respect to an identical
SCN.The datafiles will not contain any database changes beyond that common SCN. This synchronization of the SCNs
will make sure we have a consistent backup of database.
When you are doing hot backup, you may end up with backups of the various datafiles at various time points and
different SCNs and you can not open a database without synchronizing the SCN on all data files, so you will have to apply
archive logs to make the data current and synchronize the SCNs across the datafiles.
2. Question 2. What Is The Significance Of Fast_start_mttr_target Parameter?
Answer :
You use the Oracle initialization parameter fast_start_mttr_target to specify the number of seconds you want the crash
recovery to take. Oracle will try to recover the
instance as close as possible to the time that you specify for the fast_start_mttr_target parameter. The maximum value
of this parameter is 3600 seconds (1 hour).
During instance recovery, in the first roll forward operation, the database server must apply all transactions between
the last checkpoint and the end of the redo log to the datafiles. Thus, in order to tune instance recovery, you control
the gap between the checkpoint position and the end of the redo log. This is called Mean Time to Recover (MTTR).
3. Question 3. There Was A Media Failure. How Can You Find Which Files You Must Recover?
Answer :
By querying the V$RECOVER_FILE view, which lists all files that need media recovery.
4. Question 4. What Are The Benefits Of Rman Over User-managed Backup-recovery Process?
Answer :
powerful Data Recovery Advisor feature
1.simpler backup and recovery commands
2.automatically manages the backup files without DBA intervention.
3.automatically deletes unnecessary backup datafiles and archived redo log files both from disk and tape.
4.provides you with detailed reporting of backup actions
5.Easy to duplicate a database or create standby database.
6.Without actually restoring data, you can test whether you will be able to do it or not
7.Incremental backup! only RMAN can do that.
8.Active Duplication! (11g new feature), you can perform database duplication without backups by using
the network enabled database duplication feature
9. automatically detects corrupt data blocks during backups
10. Data block level recovery possible in case only few DB blocks are corrupt
11. Encrypted backups possible
12. Use RMAN with a variety of third-party storage systems easily
With so many benefits, RMAN shold be used as primary backup-recovery tool.
5. Question 5. How Important Is Database Redundancy Set And Where You Should Plan To Keep It?
Answer :
Database Redundancy Set is essential set of recovery-related files. As a DBA, you need to be well prepared for any kind
of contingency situation.
It should contain below:
o Recent backups of all datafiles & control file (duplex or triplex the control file at database level)
o All archived redo logs made after the last backup
o Current control files and online redo file copies (duplex online redo files at database level)
o Oracle database-related configuration file copies (spfile, password file, tnsnames.ora and listener.ora files
etc)
Operating system mirroring is good, but you should do database level mirroring wherever possible.
If you using ASM, try to have atleast Normal redundancy.
When setting up production systems, use at least two disk drives(one for the redundancy set and the other for the
datafiles). They should be completely separated by using different volumes, file systems, disk controllers, and RAID
devices to hold the two sets of files
You can set up FRA for keeping the redundancy set. Oracle recommends the flash recovery area as a logical candidate
to keep a copy of all the files belonging to the redundancy set (which includes the most recent database backup) on disk.
6. Question 6. What Is The Benefit Of Making Automatic Control File Backup To On?
Answer :
Remember that control file is absolutely necessary during a recovery.
Below command can be used to have automatic control file backup to be taken. This is highly recommended.
RMAN> configure controlfile autobackup on Now at the end of every RMAN backup command, RMAN automatically
backs up the control file.
Even when you make some changes via SQL*Plus( say creating a new tablespace or adding or renaming a datafile or an
online redo log member), the control file is automatically backed up.
Also, you can restore RMAN’s backup and recovery information (called RMAN’s repository), when you lose all your
control files and aren’t using the optional recovery catalog.
7. Question 7. What All You Can Store In Flash Recovery Area(fra)? Can One Fra Directory Be Used For More Than One
Database?
Answer :
Oracle can store different kind of files under FRA:
o backupset: for RMAN regular backups.
o datafile: for RMAN image copies.
o autobackup: for control file autobackups.
o flashback: If your database runs in flashback mode, you will see flashback logs in this subdirectory.
o archivelog: for Archived redo logs
o controlfile: The control file, if configured to go to the flash recovery area.
o onlinelog: Online redo logs can also be made to go to the flash recovery area
You can use the same flash recovery area for as many databases as you want. The RMAN backup process will create a
subdirectory called <SID_NAME>, the same name as the database you are backing up.
8. Question 8. Which Views Can Be Used For Checking Space Usage In The Fra?
Answer :
Check Below..
SQL> select NAME,SPACE_LIMIT/1024/1024/1024 TOTAL_GB,SPACE_USED/1024/1024/1024
USED_GB,SPACE_RECLAIMABLE,NUMBER_OF_FILES from v$recovery_file_dest;
NAME TOTAL_GB USED_GB SPACE_RECLAIMABLE NUMBER_OF_FILES
————————————————– ———- ———- —————– —————
/u01/oracle/DB11G/fast_recovery_area 16 1.13197899 0 3
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES——————– —————— —
———————- —————
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG .12 0 1
BACKUP PIECE 6.95 0 2
IMAGE COPY 0 0 0
FLASHBACK LOG 0 0 0
FOREIGN ARCHIVED LOG 0 0 0
7 rows selected.
9. Question 9. Is Putting Control File And Online Redo Logs In Flash Recovery Area (fra) Advisable?
Answer :
Control file is very important file for the database operation. Loosing a single control file will make the database unstable
and will lead to interruption in service.
So we will always try to put control file in a safe and stable place.
Similarly online logs are equally important and loosing them can also cause database to crash, incomplete recovery and
possible data loss.
CASE 1:
Usually the flash recovery area and the main database disks are located in such a way that the probability of both going
down at the same time is very slim.
And If your flash recovery area is in a storage location as reliable as the main database storage, then you should put one
control file and one redo member/log group there.
It will surely help you in quick and complete recovery.
CASE 2:
If your flash recovery area is NOT as reliable as the main database storage, the chance of failure in the flash recovery
area is greater compared to the main database disks. If the flash recovery area fails, then you lose one of the control
files and the online redo log. You will be able to start database easily by removing that control file from the control file
parameter in the initialization parameter file (copying online log from the secondary Non-FRA location) and restarting it
but you will have an interruption of production service, which is very undesirable.
Scenario A: Besides FRA, we have multiplexed Control files to two other separate location, so risk of loosing control file
(and fear of not able to do complete recovery) is minimized We won’t be putting even a single control file in the FRA.
Scenario B: Besides FRA, we have multiplexed Control files to only one other separate location, so risk of loosing control
file and (and fear of not able to do complete recovery) is more. Complete recovery of database is of primary importance
to you than the database interruption.
Here we can go and put the control file in FRA.
10. Question 10. How Can You Make Sure That Only One Of The Redo Log Member Is Created In Fra?
Answer :
If you want only one member of the group in the flash recovery area and the other one in the regular database file
location, you should define two parameters—the flash recovery area and db_create_file_dest.
SQL> Show parameter db_recovery_file_dest
NAME TYPE VALUE
———————————— ———– ——————————
db_recovery_file_dest string /u01/oracle/DB11G/fast_recovery_area
SQL> alter system set db_create_file_dest =’/u01/oracle/DB11G/oradata’;
System altered.
SQL> alter database add logfile group 4;
Database altered.
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE
3 ONLINE /u01/oracle/DB11G/oradata/brij/redo03.log NO
2 ONLINE /u01/oracle/DB11G/oradata/brij/redo02.log NO
1 ONLINE /u01/oracle/DB11G/oradata/brij/redo01.log NO
4 ONLINE /u01/oracle/DB11G/oradata/brij/BRIJ/onlinelog/o1_mf_5_9hl8zjmt_.log NO
4 ONLINE /u01/oracle/DB11G/fast_recovery_area/BRIJ/onlinelog/o1_mf_5_9hl8zjsz_.log YES
11. Question 11. How Can You Create Log Of Your Rman Activity?
Answer :
Two ways to do it
A) WHILE STARTING RMAN
$ rman log=’tmp/rman_log.log’ OR $ rman log /tmp/rman_log.log append
(use with append clause if you don’t wanna overwrite existing file)
Also If you are running RMAN interactively and you want to see output on your terminal screen as well as have it
written to a log file, use tee command:
$ rman | tee /tmp/rman.log
B) WHILE INSIDE RMAN
$rman
RMAN> spool log to ‘/tmp/rman_log.log’;
(use with append clause if you don’t wanna overwrite existing file “spool log to ‘/tmp/rman_log.log’ append.)
..
RMAN> spool log off;
** you can use any writeable directory and log file name.
12. Question 12. Can Recovery Catalog Database Also Be Shutdown From Rman Prompt Like Target Database Can Be Done?
Answer :
All the shutdown and startup commands applies only to the target database. You can’t start and stop the recovery
catalog instance from RMAN. The only way to start up and shut down the recovery catalog instance is by connecting to
the recovery catalog database as the target database and by issuing the relevant commands to start or stop the instance.
13. Question 13. How To Check The Syntax Of Rman Commands?
Answer :
Start the RMAN client with the operating system command-line argument checksyntax.
$ rman checksyntax
Recovery Manager: Release 11.2.0.4.0 – Production on Wed
RMAN> connect target /
The command has no syntax errors
RMAN> backup database;
The command has no syntax errors
You can also use the checksyntax argument to check the syntax of RMAN commands that are part of a command file.
Example:
$ rman checksyntax @/tmp/rmancmdfile
14. Question 14. Does Using Recovery Catalog Means Rman Won’t Use The Control File To Store Information?
Answer :
No. Even when you choose to use a recovery catalog, backup information will continue to be stored in the control file
as well by default.
15. Question 15. What Is The Benefit Of Using Recovery Catalog?
Answer :
1. provides larger storage capacity, thus enabling access to a longer history of backups
2. you can create and store RMAN scripts in the recovery catalog and Any client that can connect to the
recovery catalog and a target database can use these stored scripts
3. Can service many target databases
4. you can use ‘KEEP FOREVER’ clause of RMAN backup command.
5. Allows you to list the data files and tablespaces that are or were in the target database at a given time
16. Question 16. What Is The Significance Of ‘resync Catalog’ Rman Command?
Answer :
The resync catalog command is used in order to update or resynchronize a recovery catalog from the target database
control file. Since sync is done from Target database control file, so you must connect to the recovery catalog as well as
to the target database in order to perform the resynchronization.
RMAN> resync catalog;
starting full resync of recovery catalog
full resync complete
When above command is executed, RMAN will first create a snapshot control file. It’ll then compare the contents of the
recovery catalog to the contents of the snapshot control file and update the recovery catalog by adding the missing
information and modifying the changed backup and schema related records.
It means that we will keep parameter control_file_record_keep_time longer than our backup interval, so that the data
in the control file gets transferred to the recovery catalog before that data is overwritten.
When you issue certain RMAN commands such as the backup command, RMAN automatically performs a
resynchronization.
17. Question 17. You Want To Move Your Recovery Catalog From One Database To Another. How You Can Do It?
Answer :
Moving Recovery catalog to another database is simple process
o Create a new recovery catalog in the target database. You don’t need to register any database to it
o Use the import catalog command in RMAN after connecting to the target database:
$ rman
RMAN> connect catalog rman_new/rman@target_database
RMAN> import catalog rman_old/rman@source_database;
The import catalog command will import the source recovery catalog contents into the target recovery catalog.
18. Question 18. What Are The Most Important Recovery Catalog Views?
Answer :
Below are some of the frequently used views:
o RC_STORED_SCRIPT: Information about RMAN scripts stored in the recovery catalog.
o RC_UNUSABLE_BACKUPFILE_DETAILS: Lists the unusable backup files recorded in the recovery catalog.
o RC_RMAN_STATUS: Similar to V$RMAN_STATUS view and shows the status of all RMAN operations. This view
doesn’t contain information about any operations that are currently executing.
o RC_RMAN_CONFIGURATION: Information about persistent configuration settings.
o RC_DATAFILE: Shows all datafiles registered in the recovery catalog.
o RC_DATABASE: Shows the databases registered in the recovery catalog.
o RC_ARCHIVED_LOG: Provides historical information on both archived as well as unarchived redo logs.
19. Question 19. How To Check The Version Of Your Recovery Catalog?
Answer :
You can easily check the version of your recovery catalog by issuing the following command from SQL*Plus after logging
in as the recovery catalog owner:
RMAN@rmandb > select * from rcver;
VERSION
—————
11.02.00.04
20. Question 20. What All Files Can Not Be Backed Up By Rman?
Answer :
o Oracle home-related files
o External files
o Network configuration files
o Password files

What is RMAN and How to configure it?

RMAN is an Oracle Database client that performs backup and recovery tasks on your databases and automates the
administration of your backup strategies. It greatly simplifies the dba jobs by managing the production database’s backing
up, restoring, and recovering database files.

This tool integrates with sessions running on an Oracle database to perform a range of backup and recovery activities,
including maintaining an RMAN repository of historical data about backups. There is no additional installation required for
this tool. It’s by default get installed with the Oracle database installation. The RMAN environment consists of the utilities
and databases that play a role in backing up your data. You can access RMAN through the command line or through Oracle
Enterprise Manager.
Why to use RMAN?

RMAN gives you access to several backup and recovery techniques and features not available with user-managed backup
and recovery. The most noteworthy are the following:

 Automatic specification of files to include in a backup: Establishes the name and locations of all files to be backed up.
 Maintain backup repository: Backups are recorded in the control file, which is the main repository of RMAN metadata.
Additionally, you can store this metadata in a recovery catalog.
 Incremental backups: An incremental backup stores only blocks changed since a previous backup. Thus, they provide
more compact backups and faster recovery, thereby reducing the need to apply redo during datafile media recovery.
 Unused block compression: In unused block compression, RMAN can skip data blocks that have never been used.
 Block media recovery: You an repair a datafile with only a small number of corrupt data blocks without taking it offline
or restoring it from backup.
 Binary compression: A binary compression mechanism integrated into Oracle Database reduces the size of backups.
 Encrypted backups: RMAN uses backup encryption capabilities integrated into Oracle Database to store backup sets
in an encrypted format.
 Corrupt block detection: RMAN checks for the block corruption before taking its backup.

How RMAN works?

RMAN backup and recovery operation for a target database is managed by RMAN client. RMAN uses the target database
control file to gather metadata about the target database and to store information about its own operations. The RMAN
client itself does not perform a backup, restore, or recovery operations. When you connect the RMAN client to a target
database, RMAN allocates server sessions on the target instance and directs them to perform the operations. The work of
backup and recovery is performed by server sessions running on the target database. A channel establishes a connection
from the RMAN client to a target or auxiliary database instance by starting a server session on the instance. The channel
reads data into memory, processes it, and writes it to the output device.

When you take a database backup using RMAN, you need to connect to the target database using RMAN Client. The RMAN
client can use Oracle Net to connect to a target database, so it can be located on any host that is connected to the target
host through Oracle Net. For backup, you need to allocate an explicit or implicit channel to the target database. An RMAN
channel represents one stream of data to a device and corresponds to one database server session. This session dynamically
collects information of the files from the target database control file before taking the backup or while restoring.

For example, If you give ‘Backup database’ from RMAN, it will first get all the datafiles information from the controlfile.
Then it will divide all the data files among the allocated channels. ( roughly equal size of work as per the datafile size ). Then
it takes the backup in 2 steps. In the first step, the channel will read all the Blocks of the entire data file to find out all the
formatted blocks to backup. Note: RMAN does not take the backup of the unformatted blocks. In the second step, it takes
the backup of the formatted blocks. This is the best advantage of using RMAN as it only takes the backup of the required
blocks. Let’s say in a data file of 100 MB size, there may be only 10 MB of use full data and rest 90 MB is free then RMAN
will only take the backup of those 10 MB.

What O/S and oracle user privilege required to use RMAN?

RMAN always connect to the target or auxiliary database using the SYSDBA privilege. In fact, the SYSDBA keywords are
implied and cannot be explicitly specified. Its connections to a database are specified and authenticated in the same way
as SQL*Plus connections to a database.

The O/S user should be part of the DBA group. For remote connection, it needs the password file Authentication. Target
database should have the initialization parameter REMOTE_LOGIN_PASSWORDFILE set to EXCLUSIVE or SHARED.
RMAN terminology

A target database: An Oracle database to which RMAN is connected with the TARGET keyword. A target database is a
database on which RMAN is performing backup and recovery operations. RMAN always maintains metadata about its
operations on a database in the control file of the database.

A recovery Catalog: A separate database schema used to record RMAN activity against one or more target databases. A
recovery catalog preserves RMAN repository metadata if the control file is lost, making it much easier to restore and recover
following the loss of the control file. The database may overwrite older records in the control file, but RMAN maintains
records forever in the catalog unless deleted by the user.

Backup sets: RMAN can store backup data in a logical structure called a backup set, which is the smallest unit of an RMAN
backup. One backup set contains one or more datafiles a section of datafile or archivelogs.

Backup Piece: A backup set contains one or more binary files in an RMAN-specific format. This file is known as a backup
piece. Each backup piece is a single output file. The size of a backup piece can be restricted; if the size is not restricted, the
backup set will comprise one backup piece. Backup piece size should be restricted to no larger than the maximum file size
that your filesystem will support.

Image copies: An image copy is a copy of a single file (datafile, archivelog, or controlfile). It is very similar to an O/S copy of
the file. It is not a backupset or a backup piece. No compression is performed.

Snapshot Controlfile: When RMAN needs to resynchronize from a read-consistent version of the control file, it creates a
temporary snapshot control file. The default name for the snapshot control file is port-specific.

Database Incarnation: Whenever you perform incomplete recovery or perform the recovery using a backup control file, you
must reset the online redo logs when you open the database. The new version of the reset database is called a new
incarnation. The reset database command directs RMAN to create a new database incarnation record in the recovery
catalog. This new incarnation record indicates the current incarnation.

RMAN Configuration
What is RMAN Configuration and how to Configure it?

The RMAN backup and recovery environment is preconfigured for each target database. The configuration is persistent and
applies to all subsequent operations on this target database, even if you exit and restart RMAN. RMAN configured settings
can specify backup devices, configure a connection to a backup device, policies affecting backup strategy, encryption
algorithm, snapshot controlfile location, and others.

By default there are some default configurations are set when you login to RMAN. You can customize them as per your
requirement. Any time you can check the current setting by using the “show all” command. CONFIGURE command is used
to create persistent settings in the RMAN environment, which apply to all subsequent operations, even if you exit and
restart RMAN.

How to check RMAN Configuration?

RMAN>Show all;
How to Reset to default Configuration?

To reset the default configuration setting use:

– Connect to the target database from sqlplus and run:

SQL> connect @target_database;


SQL> execute dbms_backup_restore.resetConfig;
RMAN Catalog Database
What is Catalog database and How to Configure it?

This is a separate database which contains catalog schema. You can use the same target database as the catalog database
but its not at all recommended. For more details on Recovery catalog kindly refer the Note 452529.1: Recovery catalog for
RMAN backup.

How Many catalog database I can have?

You can have multiple catalog database for the same target database. But at a time you can connect to only 1 catalog
database via RMAN. It’s not recommended to have multiple catalog database.

Is this mandatory to use catalog database?

No! its a optional one.

What is the advantage of catalog database?

Catalog database is secondary storage of backup metadata. It’s very useful in case you lost the current controlfile, as all the
backup information are there in the catalog schema. Secondly from contolfile the older backup information are aged out
depending upon the control_file_record_keep_time. RMAN catalog database maintains the history of data.

What is the difference between catalog database & catalog schema?

Catalog database is like any other database which contains the RMAN catalog user’s schema.

Q. What happens if catalog database lost?

Since the catalog database is an option one there is no direct effect of loss of catalog database. Create a new catalog
database and register the target database with the newly created catalog one. All the backup information from the target
database current controlfile will be updated to the catalog schema. If any backup information which is aged out from the
target database then you need to manually catalog those backup pieces.

RMAN backup
What are the database file’s that RMAN can backup?

RMAN can backup Controlfile, Datafiles, Archive logs, standby database controfile, Spfile.
What are the database file’s that RMAN can not backup?

RMAN can not take the backup of the pfile, Redo logs, network configuration files, password files, external tables and the
contents of the Oracle home files.

Can I have archivelogs and datafile backup in a single backupset?

No. we can not put datafiles and archive logs in the same backupset.

Can I have datafiles and contolfile backup in a single backup set?

Yes. If the controlfile autobackup is not ON then RMAN takes the backup of controlfile along with the datafile 1, whenever
you take the backup of the database or System Tablespace.

Can I regulate the size of backup piece and backupset?

Yes! You can set the max size of the backupset as well as the backup piece. By default one RMAN channel creates a single
backupset with one backup piece in it. You can use the MAXPIECESIZE channel parameter to set limits on the size of backup
pieces. You can also use the MAXSETSIZE parameter on the BACKUP and CONFIGURE commands to set a limit for the size
of backup sets.

What is the difference between backup set backup and Image copy backup?

A backup set is an RMAN-specific proprietary format, whereas an image copy is a bit-for-bit copy of a file. By default, RMAN
creates backup sets.

What is RMAN consistent backup and inconsistent backup?

A consistent backup occurs when the database is in a consistent state. That means backup of the database taken after
shutdown immediate, shutdown normal or shutdown transactional. If the database is shut down with abort option then its
not a consistent backup. A backup taken when the database is Up and running is called an inconsistent backup. When a
database is restored from an inconsistent backup, Oracle must perform media recovery before the database can be opened,
applying any pending changes from the redo logs. You can not take an inconsistent backup when the database is in
noarchivelog mode.

Can I take RMAN backup when the database is Down?

No ! You can take RMAN backup only when the target database is Open or in Mount stage. Its because RMAN keeps the
backup metadata in controlfile. Only in open or mount mode controlfile is accessible.

Do I need to place the database in begin backup mode while taking RMAN inconsistent backup?

RMAN does not require extra logging or backup mode because it knows the format of data blocks. RMAN is guaranteed not
to back up fractured blocks.No extra redo is generated during RMAN backup.

Can I compress RMAN backups?


RMAN supports binary compression of backup sets. The supported algorithms are BZIP2 (default) and ZLIB. It’s not
recommended to compress the RMAN backup using any other OS or third-party utility.

Note: RMAN compressed backup with BZIP2 provides great compression but is CPU intensive. Using ZLIB compression
requires the Oracle Database 11g Advanced Compression Option and is only supported with an 11g database. The feature
is not backward compatible with 10g databases.
Can I encrypt RMAN backup?

RMAN supports backup encryption for backup sets. You can use wallet-based transparent encryption, password-based
encryption, or both. You can use the CONFIGURE ENCRYPTION command to configure persistent transparent encryption.
Use the SET ENCRYPTION, command at the RMAN session level to specify password-based encryption.

Miscellaneous
Can RMAN take backup to Tape?

Yes! you can use RMAN for the tape backup. But RMAN can not able to write directly to tape. You need to have third-party
Media Management Software installed. Oracle has published an API specification which Media Management Vendor’s who
are members of Oracle’s Backup Solutions Partner program have access to. Media Management Vendors (MMVs) then
write an interface library which the Oracle server uses to write and read to and from tape.

How RMAN Interact with Media manager

Before performing a backup or restore to a media manager, you must allocate one or more channels or configure default
channels for use with the media manager to handle the communication with the media manager. RMAN does not issue
specific commands to load, label, or unload tapes. When backing up, RMAN gives the media manager a stream of bytes and
associates a unique name with this stream. When RMAN needs to restore the backup, it asks the media manager to retrieve
the byte stream. All details of how and where that stream is stored are handled entirely by the media manager.

What is Proxy copy backup to tape?

A proxy copy is a functionality, supported by a few media manager in which they handle the entire data movement between
datafiles and the backup devices. Such products may use technologies such as high-speed connections between storage
and media subsystems to reduce the load on the primary database server. RMAN provides a list of files requiring backup or
restore to the media manager, which in turn makes all decisions regarding how and when to move the data.

What is Oracle Secure backup?

Oracle Secure Backup is a media manager provided by oracle that provides reliable and secure data protection through file
system backup to tape. All major tape drives and tape libraries in SAN, Gigabit Ethernet, and SCSI environments are
supported.

What are the advantages of RMAN?


1. Validation of the backup
2. Parallelism
3. Block level backup
4. Incremental backup
5. Recovery catalog etc

Explain how RMAN performs the backup?


a. When RMAN is initiated, it will start reading datafile headers for used block information. It will get that from bitmap
blocks
b. With that information, RMAN will copy blocks to the backup piece

During RMAN backup we are getting “failed to create sequential file” error. What is the reason?
a. The reason would be lost of contact with tape drive, so we need to check with backup team

We are getting “control file enqueue” error in RMAN backup log file, what action you will take?
a. It means two backups on same database are trying to take controlfile backup and one of the backup is placed in
queue until first one completes

What is your backup strategy?


a. Daily we will take full RMAN backup for all prod databases and will take structural export backup. For dev and other
environments, it is a weekly twice procedure. Apart from this, we have archive backup scheduled for all prod databases
every 30min
If you have a 2 TB database and need to design a backup policy, how you will do that?
a. We need to choose RMAN incremental level 1 backup as it will complete faster. Weekend we will take full RMAN
level 0 backup

What is your backup retention policy is set to?


a. 90 days

What is the need of BACKUP OPTIMIZATION parameter in RMAN?


a. It will help in avoiding to take backup of a datafile which is not changed when we are performing image copy of
database through RMAN

Why RMAN is best over other backup methods?


a. Because it uses block level backup which reduces backup size and time

What are the new features of oracle 10g RMAN?


a. We have encryption of backup, using archive deletion policy etc

What are the new features of Oracle 11g RMAN?


a. We have some new commands like list failure, validate database etc and also we can now use virtual private
recovery catalog

What is the need of recovery catalog?


a. Generally RMAN backup information will be stored in target database controlfile. In case we lost all controlfiles, it
will be a problem in using existing backups. So recovery catalog is another database that to be configured, so that all
the target RMAN backup information will now be stored in that

Suppose we lost datafiles in recovery catalog, how to recover them?


a. As recovery catalog is also a database, we will be performing backup for the same. Sowe can restore and recover
from that backup

What is mean by channel allocation in RMAN?


a. It is allocating a medium to send backup to backup device

If we don’t use recovery catalog, where the backup information is stored and till how many days?
a. It will be stored in controlfiles and no of days are dependent on CONTROLFILE_RECORD_KEEP_TIME
parameter. Generally it is 7 days
How many recovery catalogs you will create for 100 prod databases?
Only one is enough

What are the advantages of differential and cumulative incremental backups?


Differential will take incremental backup in a daily fashion where as cumulative will take backup so that it includes all the
other day changes also

If you are the DBA, will you choose differential or cumulative and why?
I will choose differential because it will complete faster

How RMAN performs incremental backup of database?


1. RMAN will first gets block information from bitmap block
2. It will start comparing block SCN with the last level 0 backup
3. If block is changed, SCN will differ in which case RMAN will take backup otherwise not

What is the difference between full backup and level 0 backup?


Level 0 backup will try to compare the block SCN with last backup, it will fail and then performs backup where as full
backup no comparison is required

How can I make incremental backup faster?


Using change tracking file in 10g

I have a image copy of database, can we apply level 1 incremental backup on that and recover the database?
Yes we can apply

Which process is responsible in writing latest SCN to controlfiles which are re- created?
Server process

What is the difference between cold and hot backup?


COLD backup will be taken by shutting down the database, where as HOT backup will be taken while database is up and
running

What happens when a database or tablespace is placed in begin backup mode?


a. Datafile header will get freezed i.e CKPT will not update latest SCN
b. DBWR still will write data into datafiles
c. When end backup, CKPT will update the latest SCN to datafile header

Why more redo will generate during hot backup?


It is to avoid fractured block as oracle will copy entire block as redo entry

What is fractured block?


a. A block which might contain inconsistent data. This happens because the speed of DBWR is different than OS copy during
hot backup

What is the difference between complete and incomplete recovery?


a. No data loss in complete recovery whereas some data loss is observed in incomplete recovery

What will happen if we use resetlogs?


a. It will create new redolog files (if not already there)
b. It will reset log sequence number to 1,2…etc

Out of 100 datafiles, I lost 29 files. How you will identify which files to recover?
Using the view v$recovery_file

How to check if incomplete recovery is performed in the database?


a. SQL> select RESETLOGS_TIME,RESETLOGS_CHANGE from v$database;

I placed a tablespace in hot backup mode and datafile which is being backup is lost. How you will recover it?
We can restore from old backup and apply all the archives till now

Yesterday night backup is successful. Today morning we added a datafile at 11 AM. After noon 3’o clock the newly added
datafile is lost. Can I recover that datafile? If so, how?
Yes we can recover it. We need to create that datafile using “alter database create datafile ‘path’;” command and then
apply all the archives

What is the importance of archives during recovery process?


As they will store all the changes happened in the database, always we can do complete recovery if we have a perfect
backup

How you will recover database when all copies of control file are lost?
We can do a complete recovery if we have a latest trace of it. Or else, we need to do incomplete recovery by restoring
controlfile from last successful backup

Application team informed that an important table is dropped. How you will recover it?
We can recover it by doing until time recovery. But this will affect other user transactions, so we need to get approval
for this first

What are the pre-requisite factors you will consider before performing until time recovery?
We need to see if other users are not getting any affect by doing this

You need to restore the database and then realized there are no control files. How you will proceed?
Either we can resotre controlfiles first and do recovery (but a data loss is there as its incomplete recovery) or we can
create new controlfile if we have a latest trace

1. Which types of backups you can take in Oracle?


Ans:- cold backup and hot backup(online backup)

2. A database is running in NOARCHIVELOG mode then which type of backups you can take?
Ans :- only cold backup (consistence backup)

3. Can you take partial backups if the Database is running in NOARCHIVELOG mode?
Ans:- No, Partial backup cannot take while database is not in archive log mode.
Partial backup will not be synchronized with the rest of the database. It is a copy of just part of the database, at a particular
moment in time.

4. Can you take Online Backups if the the database is running in NOARCHIVELOG mode?
Ans :- No, we can’t take online backup while database is running in no archive log mode.A datafile that is backed up online
will not be synchronized with any particular SCN, nor it will be synchronized with other data fileor the control files.
5. How do you bring the database in ARCHIVELOG mode from NOARCHIVELOG mode?
Ans: – Sql> select log_mode from v$database;
LOG_MODE
————
ARCHIVELOG
Sql> shut down immediate;
Sql> startup mount;
sql> alter database noarchivelog;
sql> select log_mode from v$database;
LOG_MODE
————
NOARCHIVELOGNo Archive log mode to archive log mode
Sql> select log_mode from v$database;
LOG_MODE
————
NOARCHIVELOG
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 14
Current log sequence 17
SQL> shutdown immediate;
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 369098752 bytes


Fixed Size 1249056 bytes
Variable Size 201326816 bytes
Database Buffers 163577856 bytes
Redo Buffers 2945024 bytes
Database mounted.
SQL> select log_mode from v$database;

LOG_MODE
————
NOARCHIVELOG
SQL> alter database archivelog;
Database altered.
SQL> select log_mode from v$database;
LOG_MODE
————
ARCHIVELOG
SQL> select log_mode from v$database;
LOG_MODE
————
ARCHIVELOG

SQL> archive log list;


Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 14
Next log sequence to archive 17
Current log sequence 17
SQL>

6. You cannot shutdown the database for even some minutes, then in which mode you should run the database?
Ans:- Database must be running in Archive log mode.
Differences concerning backups
No archive log
Archive log
Must backup entire database.
In case of a failure, all changes sinces the last backup will be lost

7. Where should you place Archive logfiles, in the same disk where DB is or another disk?
Ans:- For the database performance reason and disk failure , we should store the archive log file at another disk .

8. Can you take online backup of a Control file if yes, how?


Ans:- alter database backup controlfile to trace;
The control file creation sql script will be created in user_dump_dest (udump) directory.
Ther trace file will be having sql script to create the control file.
Or
2. RMAN is another technique by that we can take the online backup of control file, but database must be in mount mode,
else RAMN will not be able to connect with database and do the required operation
Rman> backup current controlfile;
Rman> backup current controlfile to ‘/backup/ctrlfile.copy’;
Rman> configure controlfile autobackup on;

What is a Logical Backup?


Ans :- Logical backup is the way to take the backup of data using sql commands in binary format file and import the same
to the other database.
It’s a logical backup why because we used to take the objects(data) backup from one database and to restore to other
database.
Traditional import/export and Datapump is the technique to perform the logical backup.Example of logical backup are:
Table backup, tablespace backup, schema backup, full database backup

10. Should you take the backup of Logfiles if the database is running in ARCHIVELOG mode?
Ans:- No, there is no need to take the backup of online redo log file while our database is running in no archivelog mode,
why because whatever information is containg by redo log jhas already been moved to archived redo log file before
switching to next redo. So there is no benefit to take up the backup of online redo log files.

11. Why do you take tablespaces in Backup mode?


Ans :- The goal of ALTER TABLESPACE BEGIN BACKUP and END BACKUP is to set special actions in the current database files
in order to make their copy usable , without affecting the current operations. Sql> alter tablespace begin backup;
While putting the tablespace in backup mode,

12. What is the advantage of RMAN utility?


Ans :- RMAN backup time consumption is very less than compared to regular online backup as RMAN copies only modified
blocks

What is the advantage of RMAN utility?


Central Repository
Incremental Backup
Corruption Detection
Advantage over tradition backup system:

1). copies only the filled blocks i.e. even if 1000 blocks is allocated to datafile but 500 are filled with data then RMAN will
only create a backup for that 500 filled blocks.

2). incremental and accumulative backup.

3). catalog and no catalog option.

4). detection of corrupted blocks during backup;

5). can create and store the backup and recover scripts.

6). increase performance through automatic parallelization( allocating channels) less redo generation.

13. How RMAN improves backup time?


Ans:- RMAN backup time consumption is very less than compared to regular online backup as RMAN copies only modified
blocks

14. Can you take Offline backups using RMAN?


Ansà RMAN can be used for offline backups regardless if the database is in ARCHIVELOG or NOARCHIVELOG mode.
SQL> select LOG_MODE from v$database;
LOG_MODE
————
NOARCHIVELOG
1 row selected.
Shutdown the database and start the instance in mount mode:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 209715200 bytes
Fixed Size 1289748 bytes
Variable Size 138412524 bytes
Database Buffers 67108864 bytes
Redo Buffers 2904064 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining options
Use RMAN to backup[edit]
Now, let’s use RMAN to backup the database:
$ rman target /
Recovery Manager: Release 10.2.0.1.0 – Production on Wed May 30 20:23:56 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: O10GR2 (DBID=1094333359, not open)
RMAN> backup database;
Starting backup at 30-MAY-07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/app/oracle/product/10.2.0/db_1/oradata/o10gr2/system01.dbf
input datafile fno=00003 name=/app/oracle/product/10.2.0/db_1/oradata/o10gr2/sysaux01.dbf
input datafile fno=00005 name=/app/oracle/product/10.2.0/db_1/oradata/o10gr2/example01.dbf
input datafile fno=00004 name=/app/oracle/product/10.2.0/db_1/oradata/o10gr2/users01.dbf
input datafile fno=00002 name=/app/oracle/product/10.2.0/db_1/oradata/o10gr2/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 30-MAY-07
channel ORA_DISK_1: finished piece 1 at 30-MAY-07
piece
handle=/app/oracle/product/10.2.0/db_1/flash_recovery_area/O10GR2/backupset/2007_05_30/o1_mf_nnndf_TAG2007
0530T202407_35vjb7cs_.bkp tag=TAG20070530T202407 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
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 30-MAY-07
channel ORA_DISK_1: finished piece 1 at 30-MAY-07
16. What is a Recovery Catalog?
Ans:- A recovery catalog is a database schema used by RMAN to store metadata about one or more Oracle databases.
Typically, you store the catalog in a dedicated database.
17. Should you place Recovery Catalog in the Same DB?
Ans:- No ,Recovery catalog should be place in separated database
for security reason as recommended by oracle.
18. Can you use RMAN without Recovery catalog?
Ansà
19. Can you take Image Backups using RMAN?
Ans:- yes,by using following commands
[oracle@ora1 ~]$ rman
RMAN> show all;
RMAN> backup as copy database;
20. Can you use Backupsets created by RMAN with any other utility?
Ansàyes
21. Where RMAN keeps information of backups if you are using RMAN without Catalog?
Ansà RMAN keeps backup information in the control file of the target database(the database which will be backed up)
22. Can you start and shutdown DB using RMAN?
rman TARGET /
RMAN> SHUTDOWN IMMEDIATE # closes database consistently
RMAN> STARTUP MOUNT
To change the state of a target database that is in NOMOUNT or MOUNT state, you must either use SQL*Plus or use the
RMAN SQL command to issue a SQL statement, as shown in these examples:
RMAN> SQL ‘ALTER DATABASE OPEN’;
RMAN> SQL ‘ALTER DATABASE OPEN’;
RMAN> SQL ‘ALTER DATABASE OPEN’;
7
15. How do you see information about backups in RMAN?
Ans à
16. What is a Recovery Catalog?
Ansà A recovery catalog is a database schema used by RMAN to store metadata about one or more Oracle databases.
Typically, you store the catalog in a dedicated database.
17. Should you place Recovery Catalog in the Same DB?
Ansà No ,Recovery catalog should be place in separated database
for security reason as recommended by oracle.
18. Can you use RMAN without Recovery catalog?
Ansà
19. Can you take Image Backups using RMAN?
Ansàyes,by using following commands
[oracle@ora1 ~]$ rman
RMAN> show all;
RMAN> backup as copy database;
20. Can you use Backupsets created by RMAN with any other utility?
Ansàyes
21. Where RMAN keeps information of backups if you are using RMAN without Catalog?
Ansà RMAN keeps backup information in the control file of the target database(the database which will be backed up)
22. Can you start and shutdown DB using RMAN?
rman TARGET /
RMAN> SHUTDOWN IMMEDIATE # closes database consistently
RMAN> STARTUP MOUNT
To change the state of a target database that is in NOMOUNT or MOUNT state, you must either use SQL*Plus or use the
RMAN SQL command to issue a SQL statement, as shown in these examples:
RMAN> SQL ‘ALTER DATABASE OPEN’;
RMAN> SQL ‘ALTER DATABASE OPEN’;
RMAN> SQL ‘ALTER DATABASE OPEN’;

You might also like