All technological notes.
ON,RMAN automatically back up the control file and server parameter file (SPFILE) with every backup and database structural changecontrol files because all control files in a database are identical.-- rman
-- query all configuration
show all;
-- CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
Trace files
control files.Control file trace backup
control files in the event that all control files are lost.It is recommended to do after each change in the physical structure of the database.
ARCHIVELOG)Choose your DBA tool:
Enterprise Manager Database ExpressEnterprise Manager Cloud ControlDIAGNOSTIC_DEST initialization parameter.-- Verify that the control files are multiplexed.
SELECT name FROM v$controlfile;
-- /u01/app/oracle/oradata/ORCL/control01.ctl
-- /u01/app/oracle/fast_recovery_area/ORCL/control02.ctl
-- Query the diagnostic path
show parameter DIAGNOSTIC_DEST;
-- /u01/app/oracle
-- Back up the control file to a trace file
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
-- in this case, the dest is /u01/app/oracle
-- then cf path: /u01/app/oracle/diag/rdbms/orcl/orcl/trace/
cd /u01/app/oracle/diag/rdbms/orcl/orcl/trace
ls
# look for the last trace file
tail alert_orcl.log
# Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_8996.trc

cat orcl_ora_8996.trc
ControlFileBackup.sql in the home dir
- The code use
CREATE CONTROLFILEcommand to re-create the control file.- Execute this sql script to re-create control file
- The code includes
- all
dataandtempfiles of the different containers (the CDB root, CDB seed, PDB1, and so on)- the multiplexed
redo logfiles- the
ARCHIVELOGmode- the character set
- the name of the CDB
complete database recovery.online logs are available.incomplete database recovery.online logs are damaged.
-- Generate a trace file with a path
ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS
'/home/oracle/backup/orcl/control.sql';
