I was working to setup a Data Guard in my test machine and noticed the following error when I was trying to change the db_unique_name parameter in the primary database -
SQL> alter system set db_unique_name=TESTPR scope=spfile sid='*'; alter system set db_unique_name=TESTPR scope=spfile * ERROR at line 1: ORA-32017: failure in updating SPFILE ORA-65500: could not modify DB_UNIQUE_NAME, resource exists
It looks like that 12c CRS now prevents modification of database parameters with respect to it's configuration protection.
So, I had to do the followings to workaround this -
-- Stop and remove the database from CRS # srvctl stop database -d TEST # srvctl remove database -d TEST
-- Add the parameter (Now it will work) SQL> alter system set db_unique_name=TESTPR scope=spfile sid='*'; System altered.
-- Add the database back into the CRS # srvctl add database -d TESTPR -n TEST -o /u01/app/oracle/product/18.104.22.168/dbhome_1 -p +DATA/TEST/PARAMETERFILE/spfile.266.897146761 -r PRIMARY -a DATA,RECO
So, it's best to either set the db_unique_name during the database creation or if it's required to change on a later date, then consider the above workaround.