Quotidien Shaarli

Tous les liens d'un jour sur une page.

May 3, 2024

How to move controlfile to a new location in oracle database DBACLASS
  1. Get the current control_file location

SQL> show parameter control_files

NAME TYPE VALUE


control_files string /u01/oracle/dbaclass/control01.ctl

  1. Set the new location of controfile:

SQL> alter system set control_files='/u03/oracle/dbaclass/control01.ctl' scope=spfile;

System altered.

  1. start the database in nomount stage:

shutdown immediate;
startup nomount

  1. Restore controlfile to new location:

RMAN> restore controlfile from '/u01/oracle/dbaclass/control01.ctl';

Starting restore at 13-JAN-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=2201 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=/u03/oracle/dbaclass/control01.ctl
Finished restore at 13-JAN-19

  1. restart the database:

alter database mount;
alter database open;

  1. Check the control_file again:

SQL> show parameter control_files

NAME TYPE VALUE


control_files string /u03/oracle/dbaclass/control01.ctl