This discussion is archived
1 2 Previous Next 17 Replies Latest reply: Mar 25, 2011 3:24 PM by Chuck1958 RSS

No controlfile autobackups in 10gR2. Bug?

Chuck1958 Newbie
Currently Being Moderated
I'm using 10.2.0.4 enterprise edition and have no flash recovery area set up. In rman I have controlfile autobackup = on but I am not getting any controlfile backups when I make structural changes to the database.


Here's a snipped version of my RMAN config.
<tt>
RMAN> show all;

RMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
...
</tt>

Now I go to sqlplus to show that there is no FRA, and create a tablespace.

<tt>
SQL> show parameter recov

NAME TYPE VALUE
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0


SQL> create tablespace dummy datafile '/export/home/oracle/dummy01.dbf' size 2m;

Tablespace created.
</tt>

Now I check the dbs directory for backup controlfiles. None are created

<tt>
$ pwd
/oracle2/app/oracle/product/10.2.0.4/dbs
$ ls -l c-*
c-*: No such file or directory

So what am I doing wrong? This works fine in 10.1 and 9.2. Did something change in 10.2? Do I have to create a flash recovery area for controlfile autobackups to work in 10.2?
  • 1. Re: No controlfile autobackups in 10gR2. Bug?
    user296828 Expert
    Currently Being Moderated
    SQL> create tablespace dummy datafile '/export/home/oracle/dummy01.dbf' size 2m;
    Tablespace created.
    Now I check the dbs directory for backup controlfiles. None are created
    controlfile autobackup = on is nothing to do with creating a backup controlfile on dbs directory.

    Controlfile autoback on means RMAN will backup the changed control file automatically when you run backup using RMAN next time.
  • 2. Re: No controlfile autobackups in 10gR2. Bug?
    Chuck1958 Newbie
    Currently Being Moderated
    Not according to the Oracle 10.2 documentation which says that's only 1/2 of the effect of the parameter. The other 1/2 is that the DB server itself will make a backup of the controlfile upon any structural change to the database. That's exactly what it does in 9.2 and 10.1 as well, but I just noticed it's not happening in any of my 10.2 databases.

    From the 10.2 concepts manual...

    <h3>Control File Autobackups After Database Structural Changes</h3>

    The control file is also automatically backed up after database structural changes such as adding a new tablespace, altering the state of a tablespace or datafile (for example, bringing it online), adding a new online redo log, renaming a file, adding a new redo thread, and so on. Losing this information would compromise your ability to recover the database.

    This backup is performed by the server process itself, rather than one of the RMAN channels. This type of autobackup, unlike autobackups that occur after a successful backup, is always created on disk. You can use CONFIGURE CONTROLFILE AUTOBACKUP FOR DEVICE TYPE DISK to set the location for this disk based control file autobackup. Note that a failure of the automatic control file autobackup after a structural change never causes the associated structural change to fail. For example, if you add a datafile, and if the resulting control file autobackup fails, then the datafile addition is still successful.

    Edited by: Chuck1958 on Mar 25, 2011 4:33 PM
  • 3. Re: No controlfile autobackups in 10gR2. Bug?
    user296828 Expert
    Currently Being Moderated
    Please paste a link to the document.
  • 4. Re: No controlfile autobackups in 10gR2. Bug?
    user296828 Expert
    Currently Being Moderated
    I think you should read the complete guide and also bear in mind configuration parameters you are setting for RMAN using CONFIGURE command, it is only valid for BACKUP.


    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
  • 5. Re: No controlfile autobackups in 10gR2. Bug?
    Chuck1958 Newbie
    Currently Being Moderated
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmconc1.htm#i1016424

    Scroll down a couple sections from this anchor point and search for "Control File Autobackups After Database Structural Changes".
  • 6. Re: No controlfile autobackups in 10gR2. Bug?
    Chuck1958 Newbie
    Currently Being Moderated
    So then why did it work one way in 9.2 and 10.1, and in 10.2 with an FRA, but not at all with 10.2 without an FRA? Either this is a bug or the documentation needs to be changed if the behavior has changed.
  • 7. Re: No controlfile autobackups in 10gR2. Bug?
    P.Forstmann Guru
    Currently Being Moderated
    Does your database instance runs in ARCHIVELOG mode ? If no this could explain why you get no control file autobackup.
  • 8. Re: No controlfile autobackups in 10gR2. Bug?
    sybrand_b Guru
    Currently Being Moderated
    You are mis-interpreting the documentation.
    Does the documentation says Oracle automagically backs up the controlfile? Or does RMAN do it, when running?
    Please re-read the sentence, look for the subject of that sentence, and admit there is not 'automatic' backup of the controlfile outside RMAN.

    -----------
    Sybrand Bakker
    Senior Oracle DBA
  • 9. Re: No controlfile autobackups in 10gR2. Bug?
    P.Forstmann Guru
    Currently Being Moderated
    Did you try to test it ?
    [oracle@lx01 ~]$ rman target /
    
    Recovery Manager: Release 10.2.0.4.0 - Production on Fri Mar 25 21:46:47 2011
    
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    
    connected to target database: DB102 (DBID=831971560)
    
    RMAN> show all;
    
    using target database control file instead of recovery catalog
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/%F';
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/EE/dbs/snapcf_DB102.f'; # default
    
    RMAN> exit
    
    
    Recovery Manager complete.
    
    [oracle@lx01 ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 10.2.0.4.0 - Production on Fri Mar 25 21:39:15 2011
    
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> host ls -al /tmp
    total 36
    drwxrwxrwt  6 root   root     4096 Mar 25 21:41 .
    drwxr-xr-x 30 root   root     4096 Mar 25 21:14 ..
    drwxrwxrwt  2 root   root     4096 Mar 25 21:16 .font-unix
    drwxrwxrwt  2 root   root     4096 Mar 25 21:14 .ICE-unix
    drwx------  2 root   root     4096 May 24  2010 keyring-RqLT3M
    drwx------  2 root   root     4096 Jan 20  2010 keyring-uxZ8jN
    srwxr-xr-x  1 root   root        0 May 24  2010 mapping-root
    -rw-r--r--  1 oracle oinstall    0 Mar  7 10:10 tes
    -rwsr-s--x  1 oracle oinstall    0 Mar  7 10:14 test
    
    SQL> create tablespace test datafile '/tmp/test.dbf' size 10m;
    
    Tablespace created.
    
    SQL> host ls -al /tmp
    total 17256
    drwxrwxrwt  6 root   root         4096 Mar 25 21:45 .
    drwxr-xr-x 30 root   root         4096 Mar 25 21:14 ..
    -rw-r-----  1 oracle oinstall  7110656 Mar 25 21:45 c-831971560-20110325-02
    drwxrwxrwt  2 root   root         4096 Mar 25 21:16 .font-unix
    drwxrwxrwt  2 root   root         4096 Mar 25 21:14 .ICE-unix
    drwx------  2 root   root         4096 May 24  2010 keyring-RqLT3M
    drwx------  2 root   root         4096 Jan 20  2010 keyring-uxZ8jN
    srwxr-xr-x  1 root   root            0 May 24  2010 mapping-root
    -rw-r--r--  1 oracle oinstall        0 Mar  7 10:10 tes
    -rwsr-s--x  1 oracle oinstall        0 Mar  7 10:14 test
    -rw-r-----  1 oracle oinstall 10493952 Mar 25 21:45 test.dbf
    
    SQL>
    and in instance alert log you have:
    [oracle@lx01 ~]$ tail -f /u01/app/oracle/admin/DB102/bdump/alert_DB102.log
    Starting background process QMNC
    Completed: alter database open
    QMNC started with pid=18, OS id=6198
    Fri Mar 25 21:45:29 2011
    create tablespace test datafile '/tmp/test.dbf' size 10m
    Fri Mar 25 21:45:30 2011
    Starting control autobackup
    Control autobackup written to DISK device
            handle '/tmp/c-831971560-20110325-02'
    Completed: create tablespace test datafile '/tmp/test.dbf' size 10m
    Edited by: P. Forstmann on 25 mars 2011 21:49
  • 10. Re: No controlfile autobackups in 10gR2. Bug?
    Chuck1958 Newbie
    Currently Being Moderated
    Thanks P. Forstmann. That was the answer. The variable I was missing was ARCHIVELOG mode. I tested it on one of my db's that's in ARCHIVELOG mode and it is in fact creating controlfile autobackups.

    I wish that the documentation had mentioned the fact that ARCHIVELOG mode had to be enabled or it would have saved me the time of asking here. If it did, I missed it. It's certainly not in the section I posted earlier.


    pgoel and sybrand - I think you both need to read the documentation before you tell someone else that they don't understand it. No - this parameter does not only affect rman. Yes, the server itself reads this parameter from the controlfile and acts on it as well completely independently from rman.
  • 11. Re: No controlfile autobackups in 10gR2. Bug?
    user296828 Expert
    Currently Being Moderated
    Dear P. Fortsmann,

    I am glad to see the example and many thanks for correcting me. More important, thanks to OP.

    Regards,
  • 12. Re: No controlfile autobackups in 10gR2. Bug?
    sybrand_b Guru
    Currently Being Moderated
    Pray, tell me, where is that documented. NOT in the paragraph you posted!!!
    I will remember your deliberate insult, and gladly submit an abuse message, when you insult me of not reading documentation again!

    -------------
    Sybrand Bakker
    Senior Oracle DBA
  • 13. Re: No controlfile autobackups in 10gR2. Bug?
    Chuck1958 Newbie
    Currently Being Moderated
    Sybrand,

    Again... please read my posts before commenting on them. That was my point. That it's not documented.

    As to insults... read your own post. You were quite insulting to me... and 100% wrong in your answer.

    I guess nothing has changed since most of the people on the comp.databases.oracle.server usenet newsgroup killfiled you years ago for the same attitude displayed back then.

    If you wish to report abuse go ahead. It's your right. But so will I.

    Edited by: Chuck1958 on Mar 25, 2011 5:26 PM
  • 14. Re: No controlfile autobackups in 10gR2. Bug?
    sybrand_b Guru
    Currently Being Moderated
    Abuse was sent.

    ----------------
    Sybrand Bakker
    Senior Oracle DBA
1 2 Previous Next

Legend

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