Convert oracle instance name from lower to uppercase

How to rename a database to use upper case instead of lower case characters in ODA

In this article we will see how to change Oracle instance name from lowercase to uppercase in ODA machine.

Existing ORACLE_SID=orcldw

To be modified as ORACLE_SID=ORCLDW

Change ORACLE_SID value in initfile

parameter file : initORCLDW.ora

old value

instance_name=orcldw

new value

instance_name=ORCLDW

create spfile

create spfile from pfile=’/u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1/dbs/initORCLDW.ora’;

change name in /etc/oratab

ORCLDW:/u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1:Y

stop the database

$ srvctl stop db -d ORCLDW

Remove database name using srvctl

$ srvctl remove database -db ORCLDW -verbose
Remove the database ORCLDW? (y/[n]) y
Successfully removed server pool ORCLDW which is used to manage database ORCLDW.
Successfully removed database and its dependent services.
$
Note: “srvctl remove database” command  will remove db from srvctl configuration.

Add database name using srvctl

$ srvctl add database -db ORCLDW -dbname ORCLDW \
-instance ORCLDW -node odasrvr001 -dbtype SINGLE \
-oraclehome /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1 \
-spfile /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1/dbs/spfileORCLDW.ora
$

To display the config details

$ srvctl config database -d ORCLDW
Database unique name: ORCLDW
Database name: ORCLDW
Oracle home: /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1
Oracle user: oracle
Spfile: /u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1/dbs/spfileORCLDW.ora
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups:
Mount point paths: /u01/app/odaorahome
Services:
Type: SINGLE
OSDBA group: dba
OSOPER group: dbaoper
Database instance: ORCLDW
Configured nodes: odasrvr001
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed

Start database

$ srvctl start database -d ORCLDW

 

see also