Rename Oracle Database


--Rename the database from orcl to testorcl

1. export ORACLE_SID=orcl
2. sqlplus / as sysdba
3. sql>SHUTDOWN IMMEDIATE
   sql>STARTUP MOUNT
   sql>exit

4. $ nid TARGET='sys@orcl as sysdba' DBNAME=testorcl SETNAME=YES

5. export ORACLE_SID=testorcl
   sqlplus /nolog
   conn /as sysdba
   sql> startup

No comments:

Post a Comment