Controlfile

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

 

Info

SQL> select name from v$CONTROLFILE; 	/u01/oracle/oradata/orcl/control01.ctl
SQL> show parameter control_files 	 NAME                                 TYPE                             VALUE
	------------------------------------ -------------------------------- ------------------------------
	 control_files                        string                           /u01/oracle/oradata/orcl/control01.ctl

Size

SQL> SELECT (block_size * file_size_blks/1024/1024) ctl_size_Mb FROM V$CONTROLFILE WHERE rownum = 1;

Multiplexing

SQL> HOST mkdir -p /u02/oracle/oradata/${ORACLE_SID}/control
SQL> HOST mkdir -p /u03/oracle/oradata/${ORACLE_SID}/control

SQL> select name from v$CONTROLFILE; 	/u01/oracle/oradata/orcl/control/control01.ctl
SQL> shutdown immediate

SQL> HOST cp /u01/oracle/oradata/${ORACLE_SID}/control01.ctl /u02/oracle/oradata/${ORACLE_SID}/control/control01.ctl
SQL> HOST cp /u01/oracle/oradata/${ORACLE_SID}/control01.ctl /u02/oracle/oradata/${ORACLE_SID}/control/control02.ctl
SQL> HOST cp /u01/oracle/oradata/${ORACLE_SID}/control01.ctl /u03/oracle/oradata/${ORACLE_SID}/control/control03.ctl

SQL> startup nomount

SQL> ALTER SYSTEM SET control_files = '/u02/oracle/oradata/orcl/control/control01.ctl', '/u02/oracle/oradata/orcl/control/control02.ctl', '/u03/oracle/oradata/orcl/control/control03.ctl' scope=spfile;

SQL> shutdown immediate

SQL> startup

SQL> SELECT name FROM v$CONTROLFILE; 	/u02/oracle/oradata/orcl/control/control01.ctl
	/u02/oracle/oradata/orcl/control/control02.ctl
	/u03/oracle/oradata/orcl/control/control03.ctl

Delete old controlfiles

SQL> HOST rm /u01/oracle/oradata/orcl/control01.ctl
SQL> HOST rm /u01/oracle/oradata/orcl/control02.ctl

Controlfiles Autobackup

rman target /

SQL> show CONTROLFILE AUTOBACKUP;

SQL> CONFIGURE CONTROLFILE AUTOBACKUP ON;

SQL> show CONTROLFILE AUTOBACKUP;

Restore controlfile

RMAN> RESTORE CONTROLFILE FROM "/backup/rman/ctl_c-12345-20141003-03";

Newsletter

Enter your email to join our mailing list

Quick Contact