Oracle

ORA-29701 Unable to connect to Cluster Synchronization Service after IP/Hostname Change

July 5, 2019

We are usually facing this error when the server (host) has been renamed or when it has changed IP Address.

At this case, when the server is rebooted, the ASM startup would fail with ORA-29701.

The solution is to reconfigure Oracle Restart. 

Below you may find the exact steps:

1. Remove Oracle Restart Configuration

This step should be performed as privileged (root) user.
$GRID_HOME/crs/install/roothas.pl -deconfig -force

The expected result is: “Successfully deconfigured Oracle Restart stack“.

In case it fails with:
“roothas.pl Fails With Can’t locate Env.pm”
we have to locate perl and run the above command as following:

$GRID_HOME/perl/bin/perl  $GRID_HOME/crs/install/roothas.pl -deconfig -force

2. Reconfigure Oracle Restart

This step should also be performed as privileged (root) user.
$GRID_HOME/crs/install/roothas.pl

The expected result is:
Successfully configured Oracle Grid Infrastructure for a Standalone
Server

In case it fails with:
“roothas.pl Fails With Can’t locate Env.pm”
we have to locate perl and run the above command as following: 

$GRID_HOME/perl/bin/perl  $GRID_HOME/crs/install/roothas.pl

3. Add ASM back to Oracle Restart configuration

This step should be performed as Grid Infrastructure owner (grid user/oracle user).
$ srvctl add asm

The expected result is no output.

4. Start up ASM instance

This step should be performed as Grid Infrastructure owner (grid user/oracle user).
$ srvctl start asm

That should start ASM. Note that at this time there will be no ASM initialization or server parameter file.

5. Recreate ASM server parameter file (SPFILE)

This step should be performed as Grid Infrastructure owner (grid user).

Create a temporary initialization parameter file (e.g. /tmp/init+ASM.ora) with the following content (specify your own disk group names):
asm_diskgroups='DATA','RECO'
instance_type='asm'
large_pool_size=12M
remote_login_passwordfile='EXCLUSIVE'

Mount the disk group where the new server parameter file (SPFILE) will reside (e.g. DATA) and then create SPFILE.

We can perform this task either by SQLPlus or by Oracle ASM Configuration Assistant (ASMCA).
$ sqlplus / as sysasm

SQL> alter diskgroup DATA mount;
Diskgroup altered.

SQL> create spfile from pfile='/tmp/init+ASM.ora';
File created.

SQL> show parameter spfile
NAME TYPE VALUE
------- ------- -------------------------------------------------
spfile string +DATA/asm/asmparameterfile/registry.253.707737977

7. Add components back to Oracle Restart Configuration

If you had the database, listener and other components, add them back to the Oracle Restart Configuration.

  • Add database component

This step should be performed as RDBMS owner (oracle user).
srvctl add database -d <db_unique_name> -o <oracle_home>

  • Add listener component

This step should be performed as Grid Infrastructure owner (grid user).
srvctl add listener

8. Start up databases

srvctl start database -d

If this command does not work, we should source oraenv and startup database through sqlplus.

  • First of all, we identify the location of the spfile in ASM Diskgroup (e.g. +DATA/REPDB/PARAMETERFILE/spfile.287.1004536335 )

  • Then, we edit the default init.ora of the database (e.g /u01/app/oracle/product/12.1.0/dbhome_1/dbs/initrepdb.ora ) and we change the path of SPFILE to the above path.

  • Finally, we startup the database through sqlplus with the startup command.

References:

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=448896630158837&id=986740.1

Leave a Reply

Your email address will not be published. Required fields are marked *