I got “ORA-65500: could not modify DB_UNIQUE_NAME, resource exists ” error in Oracle database.
ORA-65500: could not modify DB_UNIQUE_NAME, resource exists
Details of error are as follows.
SQL> alter system set db_unique_name='MSDBDR' scope=spfile sid='*'; alter system set db_unique_name='MSDBDR' scope=spfile sid='*' * ERROR at line 1: ORA-32017: failure in updating SPFILE ORA-65500: could not modify DB_UNIQUE_NAME, resource exists SQL>
ORA-65500 | ORA-32017: failure in updating SPFILE
This ORA-65500 error is related with the existing of same service in the CRS.
To solve this error, remove the existing service from CRS or use the different DB_UNIQUE_NAME
You can remove the existing service from CRS as follows.
srvctl remove database -d MSDBDR
Now you can set this DB_UNIQUE_NAME again.
SQL> alter system set db_unique_name='MSDBDR' scope=spfile sid='*'; System altered.
Or you should use the different db_unique_name.
LAST SOLUTION
If the above tricks are not solved your case, then you can try to modify this parameter in the pfile, then use the spfile.
To do this, you should create pfile from spfile, then you can modify the parameter manually in the pfile, then startup instance with this modified pfile, you can create new spfile after startup with modified pfile and restart again.
SQL> create pfile='/home/oracle/pfile.ora' from spfile; File created. SQL>
Shutdown instance and Change the db_unique_name=’MSDBDR’ in the pfile.
Then startup instance with this pfile.
SQL> startup nomount pfile='/home/oracle/pfile.ora'; SQL> create spfile from pfile='/home/oracle/pfile.ora';
Then startup instance again.
Do you want to learn Oracle dataguard, then read the following articles.
Oracle DataGuard Physical Standby Installation Step by Step Using RMAN -1