Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

rman interviews questions and answers--1 in oracle

1.What is RMAN?

Recovery Manager (RMAN) is a utility that can manage your entire Oracle backup and recovery activities.

2.What is the difference between using recovery catalog and control file?

 When new incarnation happens, the old backup information in control file will be lost. It will be preserved in recovery catalog.

In recovery catalog we can store scripts.

 Recovery catalog is central and can have information of many databases.

3.Can we use same target database as catalog?

     No, The recovery catalog should not reside in the target database (database should be backed up), because the database can’t be
   recovered in the mounted state.

4.How do you know that how much RMAN task has been completed?

   By querying v$rman_status or v$session_longops

5.From where list & report commands will get input?

Both the commands command quering v$ and recovery catalog views. V$BACKUP_FILES or many of the recovery catalog views such as
RC_DATAFILE_COPY or RC_ARCHIVED_LOG.

6.Command to delete archive logs older than 7days?

RMAN> delete archivelog all completed before sysdate-7;

How many times does oracle ask before dropping a catalog?

7.The default is two times one for the actual command, the other for confirmation.

8.How to view the current defaults for the database.

RMAN> show all;

9.What is the use of crosscheck command in RMAN?

Crosscheck will be useful to check whether the catalog information is intact with OS level information. This command only updates
repository records with the status of the backups.

e.g. If user removes archived logs from disk with an operating system command, the repository still indicates that the logs are on
 disk, when in fact they are not.



10.What are the differences between crosscheck and validate commands?

Validate command is to examine a backup set and report whether it can be restored. RMAN scans all of the backup pieces in the specified
backup sets and looks at the checksum to verify that the contents are intact so that backup can be successfully restored if necessary.

Crosscheck command is to verify the status of backups and copies recorded in the RMAN repository against media such as disk or tape.
The crosscheck command only processes files created on the same device type as the channel running crosscheck.

11.Which one is good, differential (incremental) backup or cumulative (incremental) backup?

A differential backup, which backs up all blocks changed after the most recent incremental backup at level 1 or 0

RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE;

A cumulative backup, which backs up all blocks changed after the most recent incremental backup at level 0

RMAN> BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;

Cumulative backups are preferable to differential backups when recovery time is more important than disk space,
****because during recovery each differential backup must be applied in succession. Use cumulative incremental backups
instead of differential, if enough disk space is available to store cumulative incremental backups.

This is command for taking Level 0 backup.

RMAN> BACKUP INCREMENTAL LEVEL 0 DATABASE;

12.What is the difference between backup set and backup piece?

Backup set is logical and backup piece is physical.

13.RMAN command to backup for creating standby database

RMAN> duplicate target database

14.You loss one datafile and DB is running in ARCHIVELOG mode. You have full database backup of 1 week/day old and don’t have
backup of this (newly created) datafile. How do you restore/recover file?

Create data file and recover datafile.

SQL> alter database create datafile ‘/u01/app/oracle/oradata/xyz.dbf’ size 2G;

RMAN> recover datafile file_id;

15.What is obsolete backup & expired backup?

A status of “expired” means that the backup piece or backup set is not found in the backup destination.

A status of “obsolete” means the backup piece is still available, but it is no longer needed. The backup piece is no longer needed since
 RMAN has been configured to no longer need this piece after so many days have elapsed, or so many backups have been performed.

16.What is the difference between hot backup & RMAN backup?

For hot backup, we have to put database in begin backup mode, then take backup.
RMAN won’t put database in backup mode.



17.How to put manual/user-managed backup in RMAN (recovery catalog)?

By using catalog command.

RMAN> CATALOG START WITH ‘/tmp/backup.ctl’;

18. What are the Architectural components of RMAN?

RMAN Executables
Sercer process
Channels
Target database
Recovery catalog database (optional)
Media management Layer (optional)
Backups, backup sets and backup pieces

19.What are channels?

A channel is an RMAN server process started when there is a need to communicate with an I/O device, such as a disk or a tape.
A channel is what reads and writes RMAN backup files. It is through the allocation of channels that you govern I/O characteristics:

Type of I/O device being read or written to, either a disk or an sbt_tape
Number of processes simultaneously accessing an I/O device
Maximize size of files created on I/O devices
Maximize rate at which database files are read
Maximize number of files open at a time

20.Why is the catalog optional?

Because RMAN manages backup and recovery operations, it requires a place to store necessary information about the database.
RMAN always stores this information in the target database control file. You can also store RMAN metadata in a recovery catalog schema
contained in a separate database. The recovery catalog schema must be stored in a database other than the target database.

21.What is a Backup set?

A logical grouping of backup files — the backup pieces — that are created when you issue an RMAN backup command. A backup set is RMAN’s
 name for a collection of files associated with a backup. A backup set is composed of one or more backup pieces.

22.What are the benefits of using RMAN?

Incremental backups that only copy data blocks that have changed since the last backup.
Tablespaces are not put in backup mode, thus there is noextra redo log generation during online backups.
Detection of corrupt blocks during backups.
Parallelization of I/O operations.
Automatic logging of all backup and recovery operations.
Built-in reporting and listing commands.

23.What are the various reports available with RMAN

RMAN>list backup;

RMAN> list archive;

24.In catalog database, if some of the blocks are corrupted due to system crash, How will you recover?

using RMAN BLOCK RECOVER command

25.How do you enable the autobackup for the controlfile using RMAN?

Issue command at RMAN prompt.

RMAN> configure controlfile autobackup on;

Also we can configure controlfile backup format.

RMAN> configure controlfile autobackup format for device type disk to

2> ‘$HOME/BACKUP/RMAN/ F.bkp’;

26.How do you identify what are the all the target databases that are being backed-up with RMAN database?

You don’t have any view to identify whether it is backed up or not. The only option is connect to the target database and
give list backup this will give you the backup information with date and timing.

27.How do you identify the block corruption in RMAN database? How do you fix it?

Using v$block_corruption view you can find which blocks corrupted.

RMAN> blockrecover datafile <fileid> block <blockid>;

Using the above statement You recover the corrupted blocks. First check whether the block is corrupted or not by using this command

SQL>select file# block# from v$database_block_corruption;

file# block

2 507

the above block is corrupted…

conn to Rman

To recover the block use this command…

RMAN>blockrecover datafile 2 block 507;

the above command recover the block 507

Now just verify it…..

Rman>blockrecover corruption list;

28.How do you clone the database using RMAN software? Give brief steps? When do you use crosscheck command?

Check whether backup pieces proxy copies or disk copies still exist.

Two commands available in RMAN to clone database:

1) Duplicate

2) Restore.

29.List some of the RMAN catalog view names which contain the catalog information?

RC_DATABASE_INCARNATION
RC_BACKUP_COPY_DETAILS

RC_BACKUP_CORRUPTION

RC_BACKUP-DATAFILE_SUMMARY

30.How do you install the RMAN recovery catalog?

Steps to be followed:

1) Create connection string at catalog database.

2) At catalog database create one new user or use existing user and give that user a recovery_catalog_owner privilege.

3) Login into RMAN with connection string

a) export ORACLE_SID

b) rman target catalog @connection string

4) rman> create catalog;

5) register database;

31.What is the difference between physical and logical backups?

In Oracle Logical Backup is “which is taken using either Traditional Export/Import or Latest Data Pump”. Where as Physical backup is known
“when you take Physical Os Database related Files as Backup”.

32.What is RAID? What is RAID0? What is RAID1? What is RAID 10?

RAID: It is a redundant array of independent disk

RAID0: Concatenation and stripping

RAID1: Mirroring

33.How to enable Fast Incremental Backup to backup only those data blocks that have changed?

SQL> ALTER DATABASE enable BLOCK CHANGE TRACKING;

34.How do you set the flash recovery area?


SQL> ALTER SYSTEM SET db_recovery_file_dest = ‘/u10/oradata/school’;
SQL> ALTER SYSTEM SET db_recovery_file_dest_size = 100G;

35.What is auxiliary channel in RMAN? When do you need this?

An auxiliary channel is a link to auxiliary instance. If you do not have automatic channels configured, then
before issuing the DUPLICATE command, manually allocate at least one auxiliary channel within the same RUN command.

36.How do you use the V$RECOVERY_FILE_DEST view to display information regarding the flashrecovery area?

SQL> SELECT name, space_limit, space_used,space_reclaimable, number_of_filesFROM v$recovery_file_dest;

37.How can you display warning messages?

SQL> SELECT object_type, message_type,message_level, reason, suggested_actionFROM dba_outstanding_alerts;

38.How do you backup the entire database?

RMAN> BACKUP DATABASE;

39.How do you backup an individual tablespaces?

RMAN> CONFIGURE DEFAULT DEVICE TYPE TO DISK;

RMAN> BACKUP TABLESPACE system;

40.How do you backup datafiles and control files?

RMAN> BACKUP DATAFILE 3;

RMAN> BACKUP CURRENT CONTROLFILE;
41. What is the difference between to back up the current control file and to backup up control file copy?  
                                                                         If you backup “current control file” you backup control file which is currently open by an instance where as If you backup “controlfile file
copy" you backup the copy of control file which is created either with SVRMGRL command "alter system backup controlfile to .." or with
RMAN command "copy current controlfile to ...".
In the other words, the control file copy is not current controlfile backup current controlfile creates a BACKUPSET containing controlfile.
You don't have to give the FILENAME where as backup controlfile copy creates a BACKUPSET from a copy of controlfile.
You have to give the FILENAME.                                                                                                                                                                                                                      

42. How much of overhead in running BACKUP VALIDATE DATABASE and RESTORE VALIDATE DATABASE commands to check for block corruptions using RMAN?
Can I run these commands anytime?      
Backup validate works against the backups not against the live database so no impact on the live database, same for restore validate
they do not impact the real thing (it is reading the files there only).                                                                                                                          

43. Is there a way to force rman to use these obsolete backups or once it is marked obsolete?                                                        
As per my understanding it is just a report, they are still there until you delete them.
                                                                       
44. Can I use the same snapshot controlfile to backup multiple databases(one after another) running on the same server?      
This file is only use temporarily like a scratch file.  Only one rman session can access the snapshot controlfile at any time so
this would tend to serialize your backups if you do that.        

45. Why does not oracle keep RMAN info after recreating the controlfile?
  Creating the new controlfile from scratch how do you expect the create controlfile to "make up" the missing data?
 that would be like saying similarly we have drop and recreated my table and now it is empty similarly here recreating from the
  scratch means the contents there will be naturally will be gone.
  Use the rman catalog to deal this situation. It is just a suggestion.
                                       
46 What is the advantage of using PIPE in rman backups? In what circumstances one would use PIPE to backup and restore?  
                                                                                                                                                                                   
It lets 3rd parties (anyone really) build an alternative interface to RMAN as it permits anyone                                                                
that can connect to an Oracle instance to control RMAN programmatically.
                                                                                                                                                                                                                       
47. How To turn Debug Feature on in rman?                                                                                                                                  

run {                                                                                                                                                            
allocate channel c1 type disk;                                                                                                                                            
debug on;                                                                                                                                                                              
}                                                                                                                                                                              
rman>list backup of database;                                                                                                                                    
now you will see a output                                                                                                                                  
You can always turn debug off by issuing                                                                                                                              
rman>debug off;     

Comments

Popular posts from this blog

PostgreSQL pgBadger

ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated ORA-01262: Stat failed on a file destination directory Linux-x86_64 Error: 2: No such file or directory

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

PostgreSQL Pgbadger Installation On Linux

PostgreSQL Database startup / shutdown /restart