Oracle Tips : How to rename oracle database name (DBNAME) and SID

Oracle Tips : How to rename oracle database name (DBNAME) and SID

Rename SID and DBNAME (Not change DBID)
Example case — > I want to rename sid from OLD to NEW

1. Shutdown database and startup on mount mode
SQL> shutdown immediate
SQL> startup mount

2. If use spfile should create pfile from spfile
SQL> create pfile from spfile;

3. Use DBNEWID Utility for set new database name (Use on OS prompt)
% nid target=sys/ dbname= setname=Y

4. Edit parameter db_name and add parameter instance_name in pfile
*.db_name=’NEW’
*.instance_name=’NEW’

5. Rename on prameter file from “initOLD.ora” to “initNEW.ora”

6. Create new password file
% orapwd file=orapw password=password entries=5

7. Set ORACLE_SID = NEW
% export ORACLE_SID= –> Unix
> set ORACLE_SID= –> Windows

8. Edit database name in oratab file
oratab file on solaris in /var/opt/oracle/oratab
on AIX and Linux /etc/oratab
:/oracle/product/10.2.0:N

9. Startup database in open mode (No resetlogs)
SQL> startup pfile=init.ora

10. Create spfile from pfile
SQL> create spfile from pfile;

11. Verify dbname and instance name
SQL> select name from v$database;
SQL> select instance_name from v$instance;

source : How to rename oracle database name (DBNAME) and SID

You may also like...

Leave a Reply

Your email address will not be published.