Monday, February 4, 2013

Moving control files to a new location

  1. Connect as sysdba
  2. run
    SHOW PARAMETER CONTROL_FILES;
    
    to check the locations of the control files
  3. Shutdown the database:
    SHUTDOWN IMMEDIATE;
    
  4. Then run
    SHOW PARAMETER SPFILE;
    
    If the database running on pfile (the path to SPFILE will be null), change the init.ora file in $ORACLE_HOME/dbs directory
    CONTROL_FILES=(/new_loc1/control01.ctl,/new_loc2/control02.ctl,/new_loc3/control03.ctl)
    
    *If database is running on spfile, then create PFILE from SPFILE, modify it, then re-create SPFILE from newly altered PFILE.
  5. Copy the control files to the new location using cp command:
    cp /old_loc1/control01.ctl /new_loc1/control01.ctl
    cp /old_loc1/control02.ctl /new_loc2/control02.ctl
    cp /old_loc1/control02.ctl /new_loc3/control03.ctl
    
  6. Then, while loged in as sysdba user, run
    STARTUP;
    SHOW PARAMETER CONTROL_FILES;
    

No comments:

Post a Comment