2

We have the following explanation in the documentation:

Back up the control file to a binary file (duplicate of existing control file) using the following statement:

ALTER DATABASE BACKUP CONTROLFILE TO '/oracle/backup/control.bkp';

My question is: why do I when modify control_files parameter to use the controlfile backed up with the alter database statement I need to do a recover the database and with cp command not? what is the difference between cp and the backup command?

2

If you just move/rename control files (cp, mv ...) and modify accordingly control_files parameter - no need to do any recovery.

You may use cp only when instance is down or in nomount state. Otherwise, you can get inconsistent control file. If we do:

  ALTER DATABASE BACKUP CONTROLFILE...

then we make "old", "not current" controlfile - backup controlfile. With cp we make "current" copy of controlfile.

If we have current controlfile - no recovery is needed. When controlfile is a backup controlfile then it requires recover and open resetlogs.

Here's a link to documentation -- old, but explains the concepts well.

  • Good edit, @mustaccio, thanks – Eduard Okhvat Nov 19 '19 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.