This discussion is archived
5 Replies Latest reply: May 15, 2013 7:12 PM by Hemant K Chitale RSS

Doubt regarding internal  activity about snapshot controlfile

sandy121 Newbie
Currently Being Moderated
We knows that to maintain Read consistency, RMAN create a duplicate read consistent version of current control file known as snapshot control file. Now from docs, it has been mentioned that “RMAN needs a snapshot control file only when resynchronizing with the recovery catalog or when making a backup of the current control file”. I have a RMAN backup script where after allocating channels it is first taking whole database backup and then archivelog backup is taken once whole database backup is complete. In the end, it is taking current control file backup, now two doubts here:
1) We know that at the start of backup rman needs to resysnc recovery catalog with current control file - so a snapshot control is created before initiating full backup of the database?
2) Now in the end once when the whole database backup & archivelog backup is complete , while taking current controlfile backup as per written script, does it again create a new snapshot controlfile or just the snapshot controlfile is accessed and does the snapshot controlfile remains in locked state(read only) during entire backup operation ?

Any explanation behind these internals will be highly appreciated.

Edited by: 918868 on May 14, 2013 9:27 AM
  • 1. Re: Doubt regarding internal  activity about snapshot controlfile
    rarain Explorer
    Currently Being Moderated
    Hi,


    1) We know that at the start of backup rman needs to resysnc recovery catalog with current control file - so a snapshot control is created before initiating full backup of the database?

    I think snapshot controlfile is not created before initiating the backup because RMAN synchronize the recovery catalog with controlfile at the end of backup operation so that latest backup information also gets update to the recovery catalog.

    2) Now in the end once when the whole database backup & archivelog backup is complete , while taking current controlfile backup as per written script, does it again create a new snapshot controlfile or just the snapshot controlfile is accessed and does the snapshot controlfile remains in locked state(read only) during entire backup operation ?


    Yes snapshot controlfile is created while taking controlfile backup.

    Thanks
  • 2. Re: Doubt regarding internal  activity about snapshot controlfile
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    Although you might have one backup script, you do have two separate BACKUP commands. I doubt if the snapshot controlfile created by the first BACKUP command would persist into the second BACKUP command.

    Hemant K Chitale
  • 3. Re: Doubt regarding internal  activity about snapshot controlfile
    sandy121 Newbie
    Currently Being Moderated
    Does that mean control file is never syncronized(partial sync) with recovery catalog before initiating the backup , so as there are two backup commands in the scripts, will a new version of snapshot controlfile created, if so what is the significance of read consistency ?

    Thanks in advance.
  • 4. Re: Doubt regarding internal  activity about snapshot controlfile
    Dude! Guru
    Currently Being Moderated
    RMAN makes a copy of the controlfile to read the physical structure of the database. It's an intermediate copy of the control file for integrity reasons. A snapshot control file is created when RMAN synchronizes the backups recorded in the control file with the RMAN catalog or when backing up the control file. Keep in mind that RMAN always updates the current controlfile with information about the backupsets and backuppieces created.

    Control file autobackup creates a backup control file every time the database structure changes, e.g. adding datafile, making datafile read-only, etc.
  • 5. Re: Doubt regarding internal  activity about snapshot controlfile
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    The first time it creates a snapshot, it uses the snapshot to update the catalog.
    It then runs the backup of the database. The BACKUP DATABASE command has to update the current controlfile with information about each backupset and backuppiece created and information about the datafiles in each backuppiece. Therefore, the current controlfile has more information than the snapshot created first.
    Then, for the BACKUP CURRENT CONTROLFILE, it has to take a new snapshot of the updated current controlfile.


    Hemant K Chitale

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points