How to alter the control file name or alter it's file path in Oracle

This tutorial will show we can alter the control file name or alter it's file path.

  • From SQL*Plus:
  • SQL> create pfile from spfile;
    
    File created.
    
    SQL> shutdown;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
  • From OS command prompt:
  • [oracle@xxxxx]$ vi initdb1.ora
                  --manually modify the paths of the controlfile or rename
    them in init.ora.
    [oracle@xxxxx]$ cp control01.ctl control01.org
                  --making a backup copy, just in case.
    [oracle@xxxxx]$ mv control01.ctl db1_01.ctl
    [oracle@xxxxx]$ mv control02.ctl db1_02.ctl
    [oracle@xxxxx]$ mv control03.ctl db1_03.ctl
    [oracle@xxxxx]$ mv spfiledb1.ora spfilexxx.ora
                  --delete/move the spfile.
  • Go back to the SQL*Plus session and start the database:
  • SQL> startup pfile= '/home/oracle/product/11.1.0/db1/dbs/initdb1.ora';
    ORACLE instance started.
    
    Total System Global Area  146800640 bytes
    Fixed Size                   777836 bytes
    Variable Size             124789140 bytes
    Database Buffers           20971520 bytes
    Redo Buffers                 262144 bytes
    Database mounted.
    Database opened.
    
    SQL> create spfile from pfile;
    
    File created.
  • Shutdown and restart the database to check on the SPFILE usage.