RMAN Interview Questions

Physical and Logical Backups 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 O/s Database related Files as Backup".

Backup Catalog Database
Is it possible to take Catalog Database Backup using RMAN? If Yes, How? Yes, you can perform backup of catalog database using RMAN with below steps: 1. 2. 3. 4. 5. 6. Start the RMAN with NOCATALOG option. Run the recovery catalog database in ARCHIVELOG mode. set the retention policy to a REDUNDANCY value greater than 1. Backup the database onto two separate media(disk and tape), You can use BACKUP COPIES 2. Do not use another recovery catalog as the repository for these backups. configure the controlfile autoback feature to ON.

Catalog Database Corrupted Blocks In catalog database, if some of the blocks are corrupted due to system crash, How will you recover?

Manual Backup
You have taken a manual backup of a datafile using o/s. How RMAN will know about it?
RE: Manual Backup

You have to catalog that manual backup in RMAN's repository by command RMAN> catalog datafilecopy '/DB01/BACKUP/users01.dbf'; restrictions: > Accessible on disk > A complete image copy of a single file

RMAN without Catalog
Where RMAN keeps information of backups if you are using RMAN without Catalog?
RE: RMAN without Catalog

CATALOG vs NOCATALOG the difference is only who maintains the backup records like when is the last successful backup incremental differential etc. In CATALOG mode another database (TARGET database) stores all the information. In NOCATALOG mode controlfile of Target database is responsible.

. 2). increase performance through automatic parallelization (allocating channels). Can create and store the backup and recover scripts.totalwork. After listing we can restore the datafiles or the tablespaces corresponding to a particular schema. incremental and accumulative backup.e. detection of corrupted blocks during backup. 6).RMAN Backup Information How do you see information about backups in RMAN? Use this SQL to check SQL> SELECT sid. Here give SID when back start it will show SID RMAN Backup Time How RMAN improves backup time? RE: RMAN Backup Time Add channel to improve the performance of rman but it create session on DB and I/O on disk will increase so configure channel at proper number. 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. 4). This command lists all the schemas tablespace names and the corresponding data files. less redo generation. catalog and no catalog option.sofar FROM v$session_longops WHERE sid=153. Schema restore in RMAN Can a schema be restored in oracle 9i RMAN when the schema having numerous table spaces? RE: schema restore in RMAN RMAN gives the command to find all the tablespaces and hence the datafiles belonging to different schemas as: REPORT SCHEMA. 3). RMAN backup time consumption is very less than compared to regular online backup as RMAN copies only modified blocks RMAN Utility What is the advantage of RMAN utility? Advantage over tradition backup system: 1). copies only the filled blocks i. 5).

release channel t1.Uncomment and Modify tdpo.Create dsm.opt as follows DSMI_ORC_CONFIG /usr/tivoli/tsm/client/oracle/bin64/dsm. } RMAN Recovery Catalog .RMAN Encryption Option List the encryption options available with RMAN? RE: RMAN Encryption Option RMAN offers three encryption modes: transparent mode password mode and dual mode RE: RMAN Encryption Option Configure encryption for database on Configure encryption algorithm 'AES256' RMAN with NetBackup.a(very imporatant) 3. TSM Type Library What are the steps required to perform in $ORACLE_HOME for enabling the RMAN backups with netbackup or TSM tape library software? RE: RMAN with NetBackup. Now we need to Create soft link between OS to ORACLE_HOME ln -s /usr/lib/libiobk64.opt DSMI_LOG /home/tmp/oracle TDPO_NODE backup TDPO_PSWDPATH /usr/tivoli/tsm/client/oracle/bin64 4.create dsm.a $ORACLE_HOME/lib/libobk.Then take backup RMAN>run { allocate channel t1 type 'sbt_tape' parms 'ENV (TDPO_OPTFILE /usr/tivoli/tsm/client/oracle/bin64/tdpo.opt file which in /usr/tivoli/tsm/client/oracle/bin/tdpo.Once u installed the TDPO automatically one link is created from TDPO directory to /usr/lib.opt)'.Install TDPO (default path /usr/tivoli/tsm/client/oracle/) 2.opt file add an entry SErvername <Server name > 5.sys file in same path and add the entries SErvername <Server name > TCPPort 1500 passwordacess prompt nodename backup enablelanfree yes TCPSERVERADDRESS <Server Address> 5. TSM Type Library HI I can expalin what are all the steps to take a rman backup with TSM tape library as follows 1. backup database include current controlfile.

Backup Format ' D_CTLFILE_P_ U_ T_ t' Current controlfile. 5) register database. RMAN Tape Backups How do you setup the RMAN tape backups? RMAN Target / run { Allocate channel ch1 device type sbt_tape maxpiecesize 4g Format' D_ U_ T_ t'. 3) Login into RMAN with connection string a) export ORACLE_SID= b) rman target catalog @connection string 4) rman> create catalog.How do you install the RMAN recovery catalog? Steps to be followed: 1) Create connection string at catalog database. backup archivelog from time 'sysdate-7'. Hot Backup Cold Backup What is hot backup and what is cold backup? . sql 'alter system switch logfile'. create one new user or use existing user and give that user a recovery_catalog_owner privilege. 2) At catalog database. } This is backup script for Tivoli Backup Server Tape Backup Solutions What are the various tape backup solutions available in the market? RE: Tape Backup Solutions There are various Media Management Layer (MML) solutions available for Oracle. 1) 2) 3) 4) EMC's Legato Networker Module for Oracle Symantec's Netbackup Database Agent for Oracle IBM's Tivoli Storage Management (TSM) Database Agent and others in the market. release channel ch1. Backup database.

# default ENCRYPTION ALGORITHM 'AES128'.0/db_2/dbs/snapcf_dba.sql (Once you execute this script this will put all tablespaces in to begin backup mode) Now create backup of your control file in Human Readable format like alter database backup controlfile to trace as '/some/path'.sql with entry for all tablespaces remove any unnecessary lines & then execute this script into SQL like SQL>@beginbackup.' from dba_tablespaces. # default ENCRYPTION FOR DATABASE OFF.sql SQL>select 'alter tablespace ' tablespace_name ' begin backup. After datafiles are copied don't forget to end backup for all tablespace Here is the scripts . # default DEFAULT DEVICE TYPE TO DISK. # default Begin Backup Script How do you generate the begin backup script? RE: Begin Backup Script SQL>set head off SQL>spool beginbackup. You can reuse it by removing comment at beginning & replace them with connect / as sysdba Then Copy all your datafiles redo logs and control file from your database server to backup location. # default SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.Hot Backup Pre-requirements When do you recommend hot backup? What are the pre-reqs? Database must be Archivelog Mode Archive Destination must be set and LOG_ARCHIVE_START=TRUE (EARLIER VERSION BEFORE 10G) If you go through RMAN then CONFIGURE CONFIGURE CONFIGURE CONFIGURE CONFIGURE CONFIGURE CONFIGURE CONFIGURE CONFIGURE CONFIGURE CONFIGURE CONFIGURE CONFIGURE RETENTION POLICY TO REDUNDANCY 1. # default ARCHIVELOG DELETION POLICY TO NONE. CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/oracle/autobackup/%F'.f'.2. # default ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1. # default DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1. # default CONTROLFILE AUTOBACKUP ON. DEVICE TYPE DISK PARALLELISM 2BACKUP TYPE TO BACKUPSET. # default MAXSETSIZE TO UNLIMITED. SQL>spool off This will create file beginbackup. # default BACKUP OPTIMIZATION OFF.

encrypt backups RMAN Parallel Backups What is Channel? How do you enable the parallel backups with RMAN? RE: RMAN Parallel Backups Channel is a link that RMAN requires to link to target database.sql with entry for all tablespaces remove any unnecessary lines & then execute this script into SQL like SQL>@endbackup. -. -.' from dba_tablespaces.SQL>set head off SQL>spool endbackup.sql (Once you execute this script this will put all tablespaces in to end backup mode) Backup Set What is backup set? RE: Backup Set RMAN can also store its backups in an RMAN-exclusive format which is called backup set.sql SQL>select 'alter tablespace ' tablespace_name ' end backup. . SQL>spool off This will create file endbackup.use 256 bit encryption RMAN> CONFIGURE ENCRYPTION FOR DATABASE ON. RMAN Backup Encryption How do you enable the encryption for RMAN backups? If you wish to modify your existing backup environment so that all RMAN backups are encrypted perform the following steps: Set up the Oracle Encryption Wallet Issue the following RMAN command: RMAN> CONFIGURE ENCRYPTION ALGORITHM 'AES256'. This channel can be allocated manually or can be preconfigured by using automatic channel allocation. A backup set is a collection of backup pieces each of which may contain one or more datafile backups. This link is required when backup and recovery operations are performed and recorded.

ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK. } DBID in Cloned Environment Outline the steps for changing the DBID in a cloned environment? RE: DBID in Cloned Environment Note: Mount the databse $export ORACLE_SID test $ nid target system/manager It will change and automaticaly generate new id and assign it to the database. DUPLICATE TARGET DATABASE TO dupdb. When a Duplicate Database created or tablespace point in time recovery is performed Auxiliary database is used. . For example if you allocate 4 channels for a backup operation 4 background processes for the operation can run concurrently. RMAN Auxiliary Channel What is auxiliary channel in RMAN? When do you need this? An auxiliary channel is a link to auxiliary instance. . RMAN> CONFIGURE DEVICE TYPE PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET. . this database can either on the same host or a different host. 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. RUN { ALLOCATE AUXILIARY CHANNEL ch1 DEVICE TYPE sbt.The number of allocated channels determines the maximum degree of parallelism that is used during backup restore or recovery. ALLOCATE AUXILIARY CHANNEL aux3 DEVICE TYPE DISK. . ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK. Parallelization of backup sets allocates multiple channels and assigns files to specific channels. You can configure parallel backups by setting a PARALLELISM option of the CONFIGURE command to a value greater than 1 or by manually allocating multiple channels.

Any parent of an ancestor incarnation is also an ancestor incarnation. ii) Parent Incarnation: The database incarnation from which the current incarnation branched following an OPEN RESETLOGS operation. iv) Sibling Incarnation: Two incarnations that share a common ancestor are sibling incarnations if neither one is an ancestor of the other. If you run the RMAN command ALTER DATABASE OPEN RESETLOGS then RMAN resets the target database automatically so that you do not have to run RESET DATABASE.”. Database incarnation falls into following category Current Parent Ancestor and Sibling i) Current Incarnation: The database incarnation in which the database is currently generating redo. There is possibility that incarnation may be different of your database. Incunation means: Database incarnation is effectively a new “version” of the database that happens when you reset the online redo logs using “alter database open resetlogs. By resetting the database RMAN considers the new incarnation as the current incarnation of the database. So it is advised to reset to match with the current incarnation. You have to set this before you do any restore operation from RMAN. Ability to perform INCREMENTAL backups 2. RE: DBID and Incarnation DBID means database id. RMAN Backup Advantages List atleast 6 advantages of RMAN backups compare to traditional hot backups? RMAN has the following advantages over Traditional backups: 1. Ability to Recover one block of datafile .DBID and Incarnation What is the significance of incarnation and DBID in the RMAN backups? RE: DBID and Incarnation When you have multiple databases you have to set your DBID (Database Id) which is unique to each database. iii) Ancestor Incarnation: The parent of the parent incarnation is an ancestor incarnation.

RMAN> configure controlfile autobackup on. Active. Much faster when compared to other TRADITIONAL backup strategies.. without starting from beginning. Rman > list archive logall. 7. Ability to report the files needed for the backup. Identify target database How do you identify what are the all the target databases that are being backed-up with RMAN database? RE: Identify target database You dont have any view to identifiy whether it is backed up or not . 5. Active.... Ability to delete the older ARCHIVE REDOLOG files. The only option is connect to the target database and give list backup this will give you the backup information with date and timining. Ability to perform backup and restore with parallelism. Cumulative and Differential Incremental Backups What is the difference between cumulative incremental and differential incremental backups? . also we can configure controlfile backup format.. 6.. Ability to automatically backup CONTROLFILE and SPFILE 4. with the new one's automatically. Ability to RESTART the failed backup. 8. $HOME/BACKUP/RMAN/ this can be any desired location. Obsolete Backups You can check by using following command Expired Backup: List Expired Then use report obsolete command it show the backup that you dont need it and after that use Delete obsolete command It will delete the backup that you dont need it. Control File Auto Backup How do you enable the autobackup for the controlfile using RMAN? issue command at rman prompt. Active. RE: Identify Expired. obsolete backups? Which RMAN command you use? RE: Identify Expired. Obsolete Backups Use command: Rman > crosscheck backup. Rman > crosscheck archivelog all..bkp'. Obsolete Backups How do you identify the expired.. Identify Expired. RMAN> configure controlfile autobackup format for device type disk to 2> '$HOME/BACKUP/RMAN/%F. Rman > list backup.3. active..

4. CONFIGURE BACKUP OPTIMIZATION OFF. Cumulative backup: Backup all blocks changed after the most recent backup at level n-1 or lower. CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'I:Oracle_Backups d_ s_ p. CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'E:ORACLEORA92DATABASESNCFTEST. RMAN Physical Standby database Explain how to setup the physical stand by database with RMAN? RE: RMAN Physical Standby database $ Export ORACLE_SID TEST $ rman target / RMAN> show all. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1.rman'. CONFIGURE DEVICE TYPE DISK PARALLELISM 1.RE: Cumulative and Differential Incremental Backups Differencial backup: This is the default type of incremental backup which backs up all blocks changed after the most recent backup at level n or lower. Using target database controlfile instead of recovery catalog RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS. CONFIGURE CONTROLFILE AUTOBACKUP ON. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'I:Oracle_Backups d_ F. Backup the current production database to create a standby database: RMAN> backup database include current controlfile for standby plus archivelog. On the DR Server start up the TEST database in nomount mode: $ set ORACLE_SID TEST $ sqlplus /nolog SQL> connect / as sysdba SQL> startup nomount SQL> exit . Manually copy the backup sets from I:Oracle_Backups on the production server to I:Oracle_Backups on the DR Server (location of backups must match on both production and DR). 2. 3. CONFIGURE DEFAULT DEVICE TYPE TO DISK.ORA'. CONFIGURE MAXSETSIZE TO UNLIMITED.rman'. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1.

The configuration of Dataguard is now complete.5. 7. Once the DR database is created. new RMAN configuration parameters: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 15 DAYS. SQL> alter tablespace temp add tempfile ‘F:Oracle-DatabasesTESTTEMP01. SQL> alter database recover managed standby database disconnect. new RMAN configuration parameters are successfully store 3. you will need to manually add a tempfile: SQL> alter database open read only. CROSSCHECK BACKUP. DELETE NOPROMPT OBSOLETE. Target Database RMAN Backup List the steps required to enable the RMAN backup for a target database? RE: Target Database RMAN Backup 1. 6. $ rman target / 2. Put the DR database into managed standby mode: SQL> shutdown immediate SQL> startup nomount SQL> alter database mount standby database. On the production database switch logs to initiate replication: SQL> alter system switch logfile. old RMAN configuration parameters: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS.DBF’ size 500M. Configure the persistent parameter of RMAN eg : RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 15 DAYS. 8. } Verify integrity of image copy How do you verify the integrity of the image copy in RMAN environment? . Script to take backup RMAN> run { BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT. Create the standby database using RMAN (This assumes the database file structures will be identical on both servers): $ RMAN target ‘sys/fluffy@STTEST’ auxiliary / RMAN> duplicate target database for standby nofilenamecheck dorecover.

conn to Rman To recover the block use this command. the above command recover the block 507 Now just verify it. Rman>blockrecover datafile 2 block 507.. Using the above statement u recover the corrupted blocks. RE: RMAN Block Corruption First check whether the block is corrupted or not by using this command sql>select file# block# from v$database_block_corruption.dbf'.dbf'.. SQL> SELECT * FROM v$database_block_corruption.. Rman>blockrecover corruption list... .RE: Verify integrity of image copy Use below commands : rman> catalog datafilecopy 'f:testsystem. file# block 2 507 the above block is corrupted. rman> backup validate check logical datafile 'f:testsystem... SCN based hot backup recovery Outline the steps involved in SCN based recovery from the full database from hot backup? Cancel based hot backup recovery Outline the steps involved in CANCEL based recovery from the full database from hot backup? TIME based hot backup recovery Outline the steps involved in TIME based recovery from the full database from hot backup? RMAN Block Corruption How do you identify the block corruption in RMAN database? How do you fix it? RE: RMAN Block Corruption using v$block_corruption view u can find which blocks corrupted. Rman>> block recover datafile <fileid> block <blockid>..

how? Point in Time Recovery Explain the steps to perform the point in time recovery with a backup which is taken before the resetlogs of the db? RE: Point in Time Recovery RMAN can perform recovery of the whole database to a specified past time SCN or log sequence number. # SET UNTIL SCN 1000. # alternatively specify SCN # SET UNTIL SEQUENCE 9923.Clone database using RMAN How do you clone the database using RMAN software? Give brief steps? When do you use crosscheck command? RMAN Duplicate Is it possible to specific tables when using RMAN DUPLICATE feature? If yes. Rman> RUN{ SET UNTIL TIME 'Nov 15 2002 09:00:00'. RECOVER DATABASE. This type of recovery is sometimes called incomplete recovery because it does not completely use all of the available redo. 1. Incomplete recovery of the whole database is also called database point-in-time recovery (DBPITR)." RMAN Catalog View List some of the RMAN catalog view names which contain the catalog information? RE: RMAN Catalog View RC_DATABASE_INCARNATION RC_BACKUP_COPY_DETAILS RC_BACKUP_CORRUPTION RC_BACKUP-DATAFILE_SUMMARY to name a few What is FRA What is FRA? When do you use this? .} Recover Full Database from Cold Backup Outline the steps for recovering the full database from cold backup? database should be in MOUNT mode rman> restore database rman> recover database. In short obsolete means "not needed” whereas expired means "not found. # alternatively specify log sequence number RESTORE DATABASE. Obsolete and Expired RMAN backups What is the difference between obsolete RMAN backups and expired RMAN backups? RE: Obsolete and Expired RMAN backups The term obsolete does not mean the same as expired.

In this case oracle at first create and empty datafile and then apply all archived redo logs and online redo logs on the tablespace up to the current time.RE: What is FRA A flash recovery area a disk location in which the database can store and manage files related to backup and recovery. The flash recovery area simplifies backup operations and it increases the availability of the database because many backup and recovery operations using the flash recovery area can be performed when the database is open and available to users. If no files can be deleted and the recovery area used space is at 85 percent a warning message is issued. Perform Restore and Recover of The tablespace. A message is written to the alert log in other circumstances. RMAN> sql 'ALTER TABLESPACE DATA ONLINE'. Flash recovery area where you can store not only the traditional components found in a backup strategy such as control files archived log files and Recovery Manager (RMAN) datafile copies but also a number of other file components such as flashback logs. If it is missing and you have a backup then restore the backup and apply the log. These warnings are recorded in the alert log file are viewable in the data dictionary view DBA_OUTSTANDING_ALERTS and are available to you on the main page of the EM Database Control Missing data file Outline the steps for recovery of missing data file? RE: Missing data file Connect to RMAN and make the affected Tablespace offline immediate. Alternate way without using RMAN : SQL> ALTER DATABASE CREATE DATAFILE 'c:oracleoradatarheacc_capture SIZE 2048m AS datafile_file51_spec. If you did then check to see whether the log is missing from the operating system. Each time a file is deleted from the flash recovery area a message is written to the alert log. RMAN> RECOVER TABLESPACE DATA. Make the status online of the tablespace. When the space used is at 97 percent a critical warning is issued. RMAN> RESTORE TABLESPACE DATA. . If you do not have a backup then if possible perform incomplete recovery up to the point of the missing log. SQL> !rman target / RMAN> sql 'ALTER TABLESPACE DATA OFFLINE IMMEDIATE'. Because the space in the flash recovery area is limited by the initialization parameter DB_RECOVERY_FILE_DEST_SIZE the Oracle database keeps track of which files are no longer needed on disk so that they can be deleted when there is not enough free space for new files. Determine whether you entered the correct filename.

and MTTR? RE: RTO MTBF and MTTR RTO: Recovery Time objective-is the maximum amount of time that the database can be unavailable and still satisfy . At the same time it keeps as many backups on the disks a the space limits to minimize the restoration and recovery time consumed during data recovery operations.Missing archived redo logs Outline steps for recovery with missing archived redo logs? RE: Missing archived redo logs If the database is operating in ARCHIVELOG mode and if the only copy of an archived redo log file is damaged then the damaged file does not affect the present operation of the database. RAID0. DB Recovery File Dest What is db_recovery_file_dest ? When do you need to set this value? RE: DB Recovery File Dest db_recovery_file_dest and db_recovery_file_dest_size are used to specify the location and size of the Flash Recovery Area. The following situations can arise however depending on when the redo log was written and when you backed up the datafile. 2) If you backed up A specific datafile before the filled online redo log group was written then If the corresponding datafile is damaged by a permanent media failure use the most recent backup of the damaged datafile and perform incomplete recovery of the tablespace containing the damaged datafile up to the damaged log. RAID0. 1) If you backed up All datafiles after the filled online redo log group (which is now archived) was written then The archived version of the filled online redo log group is not required for complete media recovery operation. These database intilization parameters help RMAN to manage the backup storage and delete the obsolete backups and the backups that have already been copied to a tape. Note: If you know that an archived redo log group has been damaged immediately back up all datafiles so that you will have a whole database backup that does not require the damaged archived redo log. RAID1 and RAID10 What is RAID? What is RAID0? What is RAID1? What is RAID 10? RE: RAID. MTBF. RAID. RAID1 and RAID10 RAID: It is a redundant array of independent disk RAID0: Concatenation and stripping RAID1: Mirroring RTO MTBF and MTTR What are RTO.

In this case you should consider the following: 1. So far this is all I could think of. 5. 3. Schedule your backup on the time where there is least database activity this is to avoid resource huggling.fast recovery solutions Backup Strategy What are things which play major role in designing the backup strategy? I believe in designing a good backup strategy it will not only be simply backup but also a contingency plan. .If short. How long is the allowable down time during recovery? . Retention period should also be considered. 6. 2. How long is the backup period? . 4. 7. I would advise to use RMAN instead of user managed backup. Try keeping atleast 2 full backups.If short. (current and previous backup). This way operators would never miss a backup period. If the database is large you could consider doing full rman backups on a weekend and do a incremental backup on a weekday. Backup script should always be automized via scheduled jobs.SLA's MTBF (Meant time Between Failure)MTTR (Mean time to recover). you could consider using dataguard. If limited disk space for backup never use user managed backup.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.