Home

Tuesday, 14 October 2014

Control File Management

Control file management :

1.Backing up control file

       A.Backup to binary file
       B.Backup to human read able format
 
Backup control file to binary format

sys>>alter database backup controlfile to '/disk1/oradata/backup/control.ctl';
 
 Backup control file to txt format

sys>>alter database backup controlfile to trace;

 Backup control file to txt format to particular path

sys>>alter database backup controlfile to trace as '/disk1/oradata/backup/control.ctl';

Multiplexing control file :


Step 1: shutdown the database
    sys>>shutdown immediate;

Step 2: Go to the controlfile location and copy the controlfile to new location

   $cd /maggy/app/oracle/ORCL
   $mkdir backup
   $cp control.ctl backup/

Step 3: Edit the pfile (add the new control file path in pfile)
  $cd $ORCALE_HOME/dbs

  control_files='/maggy/app/oracle/ORCL/control.ctl','/maggy/app/oracle/ORCL/backup/control.ctl'

  :wq

Step 4: sqlplus / as sysdba
   start the database

   sys>>startup

Demultiplexing control file:


Step 1:
shutdown the database
    sys>>shutdown immediate;

Step 2:Edit the pfile (remove the newcontrol file path in pfile)
  $cd $ORCALE_HOME/dbs

  control_files='/maggy/app/oracle/ORCL/control.ctl'
  :wq

Step 3: sqlplus / as sysdba
   start the database

   sys>>startup


check the path of the control file

sys>>select name from v$controlfile;

sys>>show parameter control_files;


for more info check Data dictionary views:

v$CONTROLFILE
v$CONTROLFILE_RECORD_SECTION


No comments:

Post a Comment