Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> hotbackup: cp clonefile versus alter database backup controlfile

hotbackup: cp clonefile versus alter database backup controlfile

From: Guang Mei <gmei_at_incyte.com>
Date: Tue, 3 Aug 2004 11:47:39 -0400
Message-ID: <NJEDKDKJDGAKAEKKNEEJGELJDHAA.gmei@incyte.com>


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



Backing Up the Control File to a Physical File The primary method for backing up the control file is to use a SQL statement to generate a binary file.

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



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Tue Aug 03 2004 - 10:43:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US