Tags

11g (5) 12c (6) 18c (3) 19c (4) ASM (1) Critical Patch (11) Data Pump (1) Dataguard (9) Diverse (3) GRID (7) GitLab (2) Linux (8) OEM (2) ORA Errors (13) Oracle (12) RMAN (4)
Showing posts with label ORA-65500: could not modify DB_UNIQUE_NAME. Show all posts
Showing posts with label ORA-65500: could not modify DB_UNIQUE_NAME. Show all posts

Monday, October 4, 2021

ORA-65500: could not modify DB_UNIQUE_NAME

ORA-65500: could not modify DB_UNIQUE_NAME, resource exists

ERROR at line 1:

ORA-32017: failure in updating SPFILE

ORA-65500: could not modify DB_UNIQUE_NAME, resource exists

PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment. 


SQL> alter system set db_unique_name='TSTDB01' scope=spfile sid='*';
alter system set db_unique_name='TSTDB01' scope=spfile sid='*'
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE

ORA-65500: could not modify DB_UNIQUE_NAME, resource exists


The followings workaround works.

srvctl config database -d TSTDB

Database unique name: TSTDB
Database name: TSTDB
Oracle home: /oracle12.2/product/12.2.0.1/db
Oracle user: oracle
Spfile: /oracle12.2/product/12.2.0.1/db/dbs/spfileTSTDB01.ora
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups: DATA01
Services:
OSDBA group: dba
OSOPER group: dba
Database instance: TSTDB01


Stop DB and remove db from CRS.

srvctl stop database -d TSTDB

srvctl remove database -d TSTDB

Remove the database TSTDB? (y/[n]) y


sqlplus / as sysdba

startup

alter system set db_unique_name=TSTDB01 scope=spfile sid='*';

System altered.


It is required to restart DB restart.

shutdown immediate;

startup

Now looks good.

SQL> show parameter db_name;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      TSTDB
SQL> show parameter db_unique_name;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------

db_unique_name                       string      TSTDB01


Re register the instace again into CRS:

srvctl add database -d TSTDB01 -n TSTDB -o $ORACLE_HOME -p $ORACLE_HOME/dbs/spfileTSTDB01.ora


srvctl config database -db TSTDB01

Database unique name: TSTDB01
Database name: TSTDB
Oracle home: /oracle12.2/product/12.2.0.1/db
Oracle user: oracle
Spfile: /oracle12.2/product/12.2.0.1/db/dbs/spfileTSTDB01.ora
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups:
Services:
OSDBA group: dba
OSOPER group: dba
Database instance: TSTDB01





physical standby without duplicate command

physical standby without duplicate command create a physical standby database using RMAN without using duplicate command PURPOSE:   All docu...