Skip to content

Oracle Database SID convert from uppercase to lowercase

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:

  1. Shut down the database using the “shutdown immediate” command
  2. Start the database in “mount” mode using the “startup mount” command
  3. 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
  4. 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;
Brijesh Gogia
Leave a Reply