Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> hotbackup: cp clonefile versus alter database backup controlfile
I have a question about the control file backup for hotbackup. I have a 8173
db (ARCHIVELOG mode) on Sun Solaris. And Oracle Manual said
To back up the control file after a structural change:
Make the desired change to the database. For example, you might create a new datafile:
ALTER DATABASE CREATE DATAFILE '/oracle/dbs/tbs_20.f' AS '/oracle/dbs/tbs_4.f';
Back up the database's control file. The following SQL statement backs up a database's control file to /oracle/backup/cf.bak:
ALTER DATABASE BACKUP CONTROLFILE TO '/oracle/backup/cf.bak' REUSE;
The REUSE option allows you to have the new control file overwrite a control file that currently exists.
So far so good. However I found that if I just do
cp /mypath/control1.ctl to '/oracle/backup/control1.ctl' cp /mypath/control1.ctl to '/oracle/backup/control1.ctl' cp /mypath/control1.ctl to '/oracle/backup/control1.ctl'
during the hotbackup, I still could use these backed up control files to do a "COMPLETE RECOVERY" if I use
recover database until cancel;
with
alter database open resetlogs;
I have used "diff" on unix to compare the control files from "cp" method and "ALTER DATABASE BACKUP CONTROLFILE TO" and found they were different (BTW, no database structure changes were made during this whole process).
I could also use control file backed up by "ALTER DATABASE BACKUP CONTROLFILE TO ..." to do a "COMPLETE RECOVERY" if I use
recover database using backup controlfile until cancel;
with
alter database open resetlogs;
I am curious and would like to know: In what situation "cp controlfile" method would prevent me from doing a "COMPLETE RECOVERY"? Would a db structure change (during hot backup) make "cp controlfile" method not working?
TIA. Guang