9 Replies Latest reply: May 25, 2012 8:41 AM by 737189 RSS

    Question about FOR STANDBY clause of BACKUP command

    viconstg
      Hello,

      I would like to know the exact difference between BACKUP CURRENT CONTROLFILE and BACKUP CURRENT CONTROLFILE FOR STANDBY within Oracle 11g. I've searched the docs, My Oracle Support, and OTN, but I still not found answer. I'd appreciate for any explanation or references.

      Thanks in advance.
        • 1. Re: Question about FOR STANDBY clause of BACKUP command
          mseberg
          Hello

          I see what you mean. I had to use an Oracle 10 document for the second command as noted below :




          BACKUP CURRENT CONTROLFILE - Making a Manual Backup of the Control File of the database you are backing up.

          Source : Database Backup and Recovery User's Guide 11g Release 2 (11.2) E10642-03

          Section 9 Backing Up Control Files with RMAN


          BACKUP CURRENT CONTROLFILE FOR STANDBY - Create the standby control file with this command.

          Source : Data Guard Concepts and Administration 10g Release 2 (10.2) B14239-05

          Section F.1.2 Creating the Standby Control File with RMAN



          Oddly not found in Section F "Creating a Standby Database with Recovery Manager"


          Of : Data Guard Concepts and Administration 11g Release 2 (11.2) E10700-02



          Best Regards

          mseberg
          • 2. Re: Question about FOR STANDBY clause of BACKUP command
            757008
            Hi,


            BACKUP CURRENT CONTROLFILE --> will backup the current control file which can be used to resore a database and later recover.


            BACKUP CURRENT CONTROLFILE FOR STANDBY--> This statement is more used in a dataguard env.
            In releases prior to release 8.1.7, you were required to create the standby control file with the SQL ALTER DATABASE statement. Now, you can use RMAN to make a special backup of the primary database control file that is usable as a standby database control file. A normal backup of controlfile cannoy be used while creating a standby database.



            Regards,
            • 3. Re: Question about FOR STANDBY clause of BACKUP command
              viconstg
              Thank you very much, Mseberg. After your advice, I even found the description of FOR STANDBY clause in Oracle® Database Backup and Recovery Reference 10g Release 2 (10.2). The Backup and Recovery Reference (BRR) of 11g was the primary source where I've tried to find the description. It's very oddly indeed that BRR 11g ignore this clause. I've posted the question to Oracle via the comments form on the BRR 11g documentation page.
              • 4. Re: Question about FOR STANDBY clause of BACKUP command
                viconstg
                Thank you, Vinay Deshmukh. I see that the control file created as "FOR STANDBY" can be used only to create a standby database, and cannot be used for a primary. But what is an exact difference between two control files, one created without "FOR STANDBY", and another one created with this clause?
                • 5. Re: Question about FOR STANDBY clause of BACKUP command
                  757008
                  Hello,

                  Lets take it from scratch,

                  What is a controlfile:--> Its a small binary file which records the physcal structure of the database.
                  The control file includes:
                  The database name
                  Names and locations of associated datafiles and redo log files
                  The timestamp of the database creation
                  The current log sequence number
                  Checkpoint information


                  Now coming down to backup controlfile--> will have the exact backup of the controlfile being used by the database ( including the role of the database) please note that this controlfile cannot be used as a standby controlfile as when you try to use this it will throw error

                  Backup controlfile as standby--> will have every thing similar as to the previous command except for the database role flag which will not be primary but would be pahysical standby, all the other information would be same ...as with out it there wont be an exact replica of the primary database.

                  This is the only diffrence from what i understand of the concepts.


                  Regrads
                  • 6. Re: Question about FOR STANDBY clause of BACKUP command
                    Shivananda Rao
                    A normal controlfile (copy of primary controlfile) cannot be used to create the standby database. Instead, you need to have a standby copy of the primary controlfile to create the standby.

                    Say, if you have used a normal controlfile and not the standby controlfile, then you would face errors as shown below
                    SQL> alter database mount standby database;
                    alter database mount standby database
                    *
                    ERROR at line 1:
                    ORA-01665: controlfile is not a standby controlfile
                    Also, you can refer this http://esemrick.blogspot.in/2006/02/backup-control-files-are-they-special.html
                    Might serve helpful.
                    • 7. Re: Question about FOR STANDBY clause of BACKUP command
                      viconstg
                      Thank you very much, I think it's what I've searched.
                      • 8. Re: Question about FOR STANDBY clause of BACKUP command
                        Nelson Calero
                        You can find this on the Oracle® Data Guard Concepts and Administration 11g Release 2 (11.2) in section +3.2.2 Create a Control File for the Standby Database+ http://docs.oracle.com/cd/E11882_01/server.112/e25608/create_ps.htm#i68937

                        It does not go into details, but just explain what you have found on the older versions.

                        Regards.
                        • 9. Re: Question about FOR STANDBY clause of BACKUP command
                          737189
                          Hi!

                          I think that list of backups and all RMAN metada are placed in controlfile as well in a case on NOCATALOG type of backup.

                          Rg,
                          Damir