Converting a database SID from uppercase to lowercase in the Oracle database can be needed sometimes.
Below are general steps for converting a database SID from uppercase to lowercase for a few popular DBMS:
Oracle:
- Shut down the database using the “shutdown immediate” command
- Start the database in “mount” mode using the “startup mount” command
- Change the SID to lowercase using the “alter system set db_name=’new_sid’ scope=spfile;” command, where “new_sid” is the desired lowercase SID
- Restart the database using the “alter database open” command
Below are the commands that we executed to change from uppercase to lowercase.
1) CHANGE DB_NAME TO SOME TEMP NAME FIRST
We are changing to a different name first as Oracle will not allow keeping the same name (even lowercase).
SQL> SHUTDOWN IMMEDIATE SQL> STARTUP MOUNT $ nid TARGET=SYS/<syspass> DBNAME='tempname' SETNAME=YES SQL> STARTUP NOMOUNT SQL> ALTER SYSTEM SET DB_NAME='tempname' SCOPE=SPFILE; SQL> SHUTDOWN IMMEDIATE SQL> STARTUP MOUNT SQL> ALTER DATABASE OPEN RESETLOGS; or ALTER DATABASE OPEN;
2) NOW CHANGE THE DB_NAME TO THE REQUIRED LOWER CASE dbname
SQL> SHUTDOWN IMMEDIATE SQL> STARTUP MOUNT $ nid TARGET=SYS/<syspass> DBNAME='dbname' SETNAME=YES SQL> STARTUP NOMOUNT SQL> ALTER SYSTEM SET DB_NAME='dbname' SCOPE=SPFILE; SQL> SHUTDOWN IMMEDIATE SQL> STARTUP MOUNT SQL> ALTER DATABASE OPEN RESETLOGS; or ALTER DATABASE OPEN;
Latest posts by Brijesh Gogia (see all)
- Building a Scalable and Secure AI Infrastructure in the Cloud - May 12, 2024
- Harnessing the Power of AI in the Cloud for Business Transformation - March 2, 2024
- Building a Resilient Cybersecurity Framework in the Oracle Cloud - January 16, 2024