This content has been marked as final. Show 17 replies
SQL> create tablespace dummy datafile '/export/home/oracle/dummy01.dbf' size 2m;controlfile autobackup = on is nothing to do with creating a backup controlfile on dbs directory.
Now I check the dbs directory for backup controlfiles. None are created
Controlfile autoback on means RMAN will backup the changed control file automatically when you run backup using RMAN next time.
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
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.
Senior Oracle DBA
Did you try to test it ?
and in instance alert log you have:
[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>
Edited by: P. Forstmann on 25 mars 2011 21:49
[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
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.
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