You are on page 1of 11

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:

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.

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';
> 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

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.

RMAN Backup Information
How do you see information about backups in RMAN?
Use this SQL to check
SQL> SELECT sid,totalwork,sofar FROM v$session_longops WHERE sid=153;
Here give SID when back start it will show SID

RMAN Backup Time
How RMAN improves backup time?

4).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. catalog and no catalog option. 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 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). incremental and accumulative backup.e. 6). copies only the filled blocks i. 3). After listing we can restore the datafiles or the tablespaces corresponding to a particular schema. 2). 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. Can create and store the backup and recover scripts. This command lists all the schemas tablespace names and the corresponding data files. detection of corrupted blocks during backup. less redo generation. increase performance through automatic parallelization (allocating channels). 5).

opt as follows DSMI_ORC_CONFIG /usr/tivoli/tsm/client/oracle/bin64/dsm. backup database include current controlfile.Then take backup RMAN>run { allocate channel t1 type 'sbt_tape' parms 'ENV (TDPO_OPTFILE /usr/tivoli/tsm/client/oracle/bin64/tdpo. Now we need to Create soft link between OS to ORACLE_HOME ln -s /usr/lib/libiobk64.create dsm.a $ORACLE_HOME/lib/libobk.Install TDPO (default path /usr/tivoli/tsm/client/oracle/) 2.opt DSMI_LOG /home/tmp/oracle TDPO_NODE backup TDPO_PSWDPATH /usr/tivoli/tsm/client/oracle/bin64 4.a(very imporatant) 3.opt file which in /usr/tivoli/tsm/client/oracle/bin/tdpo. 2) At catalog database.sys file in same path and add the entries SErvername <Server name > TCPPort 1500 passwordacess prompt nodename backup enablelanfree yes TCPSERVERADDRESS <Server Address> 5.Create dsm. create one new user or use existing user and give that user a recovery_catalog_owner privilege.Uncomment and Modify tdpo. TSM Type Library HI I can expalin what are all the steps to take a rman backup with TSM tape library as follows 1. 3) Login into RMAN with connection string a) export ORACLE_SID= b) rman target catalog @connection string 4) rman> create catalog. .Once u installed the TDPO automatically one link is created from TDPO directory to /usr/lib.RMAN with NetBackup. 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. release channel t1.opt)'.opt file add an entry SErvername <Server name > 5. } RMAN Recovery Catalog How do you install the RMAN recovery catalog? Steps to be followed: 1) Create connection string at catalog database.

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.5) register database. Backup database. Hot Backup Cold Backup What is hot backup and what is cold backup? 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 . 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'. } 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. release channel ch1. backup archivelog from time 'sysdate-7'. Backup Format ' D_CTLFILE_P_ U_ T_ t' Current controlfile. sql 'alter system switch logfile'.

# default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1.sql SQL>select 'alter tablespace ' tablespace_name ' end backup.CONFIGURE RETENTION POLICY TO REDUNDANCY 1. # default CONFIGURE DEFAULT DEVICE TYPE TO DISK. # default CONFIGURE BACKUP OPTIMIZATION OFF. # default CONFIGURE CONTROLFILE AUTOBACKUP ON. # default CONFIGURE MAXSETSIZE TO UNLIMITED. # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10. SQL>spool off This will create file endbackup.' from dba_tablespaces.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 . CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/oracle/autobackup/%F'. # default Begin Backup Script How do you generate the begin backup script? RE: Begin Backup Script SQL>set head off SQL>spool beginbackup.2.f'.sql SQL>select 'alter tablespace ' tablespace_name ' begin backup. # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1. After datafiles are copied don't forget to end backup for all tablespace Here is the scripts SQL>set head off SQL>spool endbackup. # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'. SQL>spool off This will create file beginbackup.sql with entry for all tablespaces remove any unnecessary lines & then execute this script into SQL like SQL>@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 CONFIGURE ARCHIVELOG DELETION POLICY TO NONE. # default CONFIGURE ENCRYPTION FOR DATABASE OFF.' from dba_tablespaces.0/db_2/dbs/snapcf_dba. CONFIGURE DEVICE TYPE DISK PARALLELISM 2BACKUP TYPE TO BACKUPSET.

SQL>@endbackup. The number of allocated channels determines the maximum degree of parallelism that is used during backup restore or recovery. . For example if you allocate 4 channels for a backup operation 4 background processes for the operation can run concurrently. 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.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. -. Parallelization of backup sets allocates multiple channels and assigns files to specific channels. -.use 256 bit encryption RMAN> CONFIGURE ENCRYPTION FOR DATABASE ON. A backup set is a collection of backup pieces each of which may contain one or more datafile backups. 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'.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. This link is required when backup and recovery operations are performed and recorded. This channel can be allocated manually or can be preconfigured by using automatic channel allocation.

. . RMAN Auxiliary Channel What is auxiliary channel in RMAN? When do you need this? An auxiliary channel is a link to auxiliary instance. this database can either on the same host or a different host. When a Duplicate Database created or tablespace point in time recovery is performed Auxiliary database is used. . ALLOCATE AUXILIARY CHANNEL aux3 DEVICE TYPE DISK. ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK. RUN { ALLOCATE AUXILIARY CHANNEL ch1 DEVICE TYPE sbt. . 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. } 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. ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK.RMAN> CONFIGURE DEVICE TYPE PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET. DUPLICATE TARGET DATABASE TO dupdb.

RE: DBID and Incarnation DBID means database id. iv) Sibling Incarnation: Two incarnations that share a common ancestor are sibling incarnations if neither one is an ancestor of the other.”. You have to set this before you do any restore operation from RMAN. Any parent of an ancestor incarnation is also an ancestor incarnation. 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. 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. iii) Ancestor Incarnation: The parent of the parent incarnation is an ancestor incarnation. 6. Ability to Recover one block of datafile 3.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. ii) Parent Incarnation: The database incarnation from which the current incarnation branched following an OPEN RESETLOGS operation. So it is advised to reset to match with the current incarnation. 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. Ability to delete the older ARCHIVE REDOLOG files. By resetting the database RMAN considers the new incarnation as the current incarnation of the database. Ability to perform backup and restore with parallelism. Ability to perform INCREMENTAL backups 2. 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 report the files needed for the backup. with the new one's automatically. 5. . There is possibility that incarnation may be different of your database. Ability to automatically backup CONTROLFILE and SPFILE 4.

Cumulative and Differential Incremental Backups What is the difference between cumulative incremental and differential incremental backups? RE: Cumulative and Differential Incremental Backups . Obsolete Backups How do you identify the expired. Rman > list archive logall.. 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 . Ability to RESTART the failed backup. Active..7. Rman > crosscheck archivelog all. Rman > list backup. also we can configure controlfile backup format. Active.. 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. Obsolete Backups Use command: Rman > crosscheck backup.... without starting from beginning.bkp'. $HOME/BACKUP/RMAN/ this can be any desired location. active. 8. Much faster when compared to other TRADITIONAL backup strategies.. RMAN> configure controlfile autobackup format for device type disk to 2> '$HOME/BACKUP/RMAN/%F.. The only option is connect to the target database and give list backup this will give you the backup information with date and timining. obsolete backups? Which RMAN command you use? RE: Identify Expired. RMAN> configure controlfile autobackup on.. Active. Control File Auto Backup How do you enable the autobackup for the controlfile using RMAN? issue command at rman prompt. Identify Expired. RE: Identify Expired.

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 CONTROLFILE AUTOBACKUP ON. 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).rman'. Create the standby database using RMAN (This assumes the database file structures will be identical on both servers): . Using target database controlfile instead of recovery catalog RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS.rman'. Backup the current production database to create a standby database: RMAN> backup database include current controlfile for standby plus archivelog. CONFIGURE MAXSETSIZE TO UNLIMITED. CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'I:Oracle_Backups d_ s_ p. CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'E:ORACLEORA92DATABASESNCFTEST. 2. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'I:Oracle_Backups d_ F.ORA'. 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 5. CONFIGURE DEFAULT DEVICE TYPE TO DISK.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. 4. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1. Cumulative backup: Backup all blocks changed after the most recent backup at level n-1 or lower. 3. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1. CONFIGURE DEVICE TYPE DISK PARALLELISM 1. CONFIGURE BACKUP OPTIMIZATION OFF.

SQL> alter database recover managed standby database disconnect. 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 . 7. you will need to manually add a tempfile: SQL> alter database open read only. 8. Once the DR database is created.$ RMAN target ‘sys/fluffy@STTEST’ auxiliary / RMAN> duplicate target database for standby nofilenamecheck dorecover. SQL> alter tablespace temp add tempfile ‘F:Oracle-DatabasesTESTTEMP01. The configuration of Dataguard is now complete. On the production database switch logs to initiate replication: SQL> alter system switch logfile. Put the DR database into managed standby mode: SQL> shutdown immediate SQL> startup nomount SQL> alter database mount standby database.DBF’ size 500M. 6.