This script backs up the controlfile of a database. It runs a sql statement to back up the controlfile to a file, a SQL file that can then be edited and run to recreate the controlfile should it ever become corrupt. En español
# 1: enter the SID for the database whose controlfile is being backed up.
# 2: enter the ORACLE_HOME for that database.
# change the location of the sql to a place that exists in your server
$ORACLE_HOME/bin/sqlplus -s ‘/ as sysdba’ <<EOF
set pagesize 0
set echo off
set trimspool on
set feedback on
set head off
ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS ‘/home/oracle/backups/create_`echo $ORACLE_SID`_`echo $DATE`.sql’ REUSE;