Search Articles

Showing posts with label RAC. Show all posts
Showing posts with label RAC. Show all posts

5 Steps to Move Control File from File System to ASM Disk

Moving Control File to ASM



Moving controlfile from filesystem to ASM disk using RMAN in RAC.


You can migrate controlfile from file system to asm disk or to different diskgroup in ASM. For that you have to stop the database and startup in nomount state.


STEP 1: Stop the Database and startup in nomount state
SQL> shutdown immediate;
SQL> startup nomount;


STEP 2:Connect the target database using RMAN
$ rman
RMAN>connect target /
RMAN>restore controlfile to '<DISKGROUP_NAME>' from '<OLD_PATH>';
RMAN> restore controlfile to '+DATA' from '/oradatao1/test11/oradata/san/control01.ctl';

You can also multiplex controlfile to FRA like:
RMAN> restore controlfile to '+FRA' from '/oradatao1/test11/oradata/san/control01.ctl';


STEP 3: Show Location Of New Control Files
ASMCMD> find -t controlfile . *
+DATA/DG/CONTROLFILE/current.321.780791421
+FRA/DG/CONTROLFILE/current.368.870851527


STEP 4: On the database side:
 Modify init.ora or spfile, replacing the new path to the init parameter control_files.
 if using init<SID>.ora, just modify the control_files parameter and restart the database.
 If using spfile, Change Parameter for new locations.
alter system set control_files='+DATA/DG/CONTROLFILE/current.321.780791421','+FRA/DG/CONTROLFILE/current.368.870851527' scope=spfile;


STEP 5: Shutdown the database and open for use
SQL>shutdown immediate
SQL> alter database open;


Verify that new control file has been recognized. If the new controlfile was not used, the complete procedure needs to be repeated.

If you do not use ASM and If you want to new control file in file system, you can copy – paste controlfile to clone after stop database. And you have to change control_files parameter when database is nomount mode or stop.

Read more ...

ORA-00245: Control File Backup Failed; Target is Likely on a Local File System

In alert log I got an issue ORA-00245: control file backup failed; target is likely on a local file system. Regarding this issue, I checked the snapshot control file location on rman prompt and observed that it was on local file system. In RAC environment, Snapshot control file backup location should be on a shared disk group so that it can be visible or accessible to all RAC nodes.


Check the configured snapshot controlfile default location.


RMAN> show snapshot controlfile name;

starting full resync of recovery catalog
full resync complete
RMAN configuration parameters for database with db_unique_name ORAHOW are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/snapcf_ORAHOW2.f'; # default

Here you can see that controlfile is on a local file system, so to fix this issue configure it to a shared location.

To Configure the snapshot controlfile to a shared disk

Connect to target database, and issue the following command on RMAN prompt.
rman target /

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '<shared_disk>/snapcf_<DBNAME>.f';

Let us take an example,

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+RC_DATA/ORAHOW/snapcf_orahow.f';

new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+RC_DATA/ORAHOW/snapcf_orahow.f';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete


Due to the changes made to the controlfile backup mechanism any instances in the cluster may write to the backup controlfile when making changes to the current controlfile. Therefore, the backup file needs to be visible to all instances.


Read more ...

CONTACT

Name

Email *

Message *