Saturday, August 8, 2015

RMAN Q & A Page – 6

RMAN INTERVIEW QUESTIONS AND ANSWERS
                                                                     
                                                                       Page – 6


51. How to perform the  cancel based  recovery  from the full  database via hot backup?

CANCEL BASED RECOVERY

Cancel base recovery allows the  DBA to cancel recovery at a desired point. This situation is most likely occur if archive logfiles or redo logfiles needed for recovery are lost or damaged and cannot be restored. In this situation, you would apply all logs until you reached the missing  files and then cancel the recovery

FOLLOW THES STEPS TO EXECUTE A CANCEL BASED RECOVERY


A). If the  database  is still open, shut down the database using  the shutdown command with the ABORT  option.

B). Make a full backup of the  database, including all datafiles, a control file and  the parameter files in case an error is made during the recovery

C). Correct the problem that caused the media failure. If  the  problem  cannot be corrected, the datafiles must be restored to an  alternate location. If this is the case, the ALTER TABLESPACE RENAME DATAFILE command  must be used to change the location of the datafile in the control file .

D). If the  current  control file do not  match  the physical  structure  of the database  at the  time you want to  recover to,  restore a backup of the control file that  matches the database’s physical  file structure  at the point in time you want to recover to replace  all current control file of the database with the  one you want to use for recovery. If you do not have a backup copy  of the  control file you can create new one,

E). Restore  backups of all  data files. Make sure  the backups where  taken before the point in time you are going to recover to. Any data files added after the point  in time  you are recovering  should not be  restored.  They will not be  used in  the recovery and will have to be recreated  after recovery is complete. Any data in the datafiles  created  after  the point of recovery will be  lost.

F). Make sure  read-only tablespace  are offline  before you start  recovery so recovery  does not try to update the datafile headers.

G). Start SQL*PLUS  and  connect oracle as SYS

H). Start  the instance  and mount  the database  using STRARTUP  command  with  the MOUNT option.

I). If you restored  files to  alternative location, Change  the location now in the  control file by using the ALTER TABLESPACE RENAME DATAFILE command.

J). Use the RECOVER  DATABASE UNTIL CANCEL command to begin cancel-based recovery. If a backup of the control file is being used, make sure to specify the USING BACKUP parameter.

K). You can  check  the ALERT  file to see  if you  incomplete recovery  was actually  a complete recovery. If the recovery was a complete recovery  the message in the ALERT file is as follows

L). RESETLOGS after complete recovery through change scn. If the recovery  was incomplete, the following message is recored.

M). RESETLOGS after incomplete recovery  UNTIL CHANGE scn   
After  opening  the database  using  the  RESETLOGS option, perform a normal shutdown and a full database backup. If you do not do this, any changes made after the recovery and before the next full backup are unrecoverable . If you did not  reset the logs, the database  is still  recoverable


After  opening  the database  using  the  RESETLOGS option, perform a normal shutdown and a full database backup. If you do not do this, any changes made after the recovery and before the next full backup are unrecoverable . If you did not  reset the logs, the database  is still  recoverable.

52.Where the RMAN store the data without the catalog?

CATALOG vs NOCATALOG the  difference  in 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, controfile of target database is  responsible.

53. How to indentified the  database(s) backed-up by RMAN?

You  don’t have  any view  to identified  whether  it is backed up or not. The only  option is  connect  to the  target database  and give list backup, it will give us the backup information with data and timing.
RMAN> Show all;

54. How to  indentified  the expired, active, obsolete, backups? Which RMAN command   useful for us?

RMAN>crosscheck backup;
RMAN>crosscheck  archivelog all;
RMAN>list backup;
RMAN>list  archive  logall;

55. How do delete  old obsolete and expired oracle RMAN backup?

If you unable to delete obsolete and expired oracle DB backup from the  catalog, it will  cause some  unnecessary throw error message during backup and also  it will  take-up space at the file system level.
Also it is not recommended  to directly  remove the RMAN backup files from the file system using linux rm command
The main  parameter that decides what to delete is the retention policy. To identify  your retention policy connect using RMAN and execute “show all” command
RMAN> show all;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW FO 4 DAYS;

56. What is an obsolete  backup?

Obsolete backup means the backup pieces is still available but it is no longer needed, it depends on retention

57.How to view the backups before  delete obsolete.

Before we delete, obsolete command it is always recommend that  the  
RMAN cross check backup command  will check the  records to make sure the  accurate  the record in the RMAN cataloag.
RMAN> CROSSCHECK BACKUP;          

59. How to view the backup after delete obsolete?

RMAN>LIST BACKUP SUMMARY;

60. What is an expired backup?

Backup piece or backup set not found in the backup destination

No comments:

Post a Comment