How to change DBNAME?
---------------------------------------------------------------------------------------------
STEP 1 SQL> select dbid, name from v$database; (Note Down Output)
STEP 2 SQL> shutdown imemdiate;
SQL> startup mount;
STEP 3 SQL> host nid target=sys/Passworda DBNAME=INDIAN (New DB Name) setname=Y
[oracle@testmachine] cp initolddbname.ora initnewdbname.ora
[oracle@testmachine] vi initnewdbname.ora (ex:indian=newdbname)
change the following line
*.db_name=INDIAN
:wq!
STEP 4 SQL> !export ORACLE_SID=INDIAN
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup nomount
SQL> create spfile from pfile
SQL> show parameter db_name
SQL> shutdown immediate;
[oracle@testmachine] cd $ORACLE_HOME/dbs
[oracle@testmachine] orapwd file=pwINDIAN.ora password=sys entries=150
SQL> startup mount;
SQL> alter database open resetlogs;
SQL> select name,dbid from v$database;
NAME DBID
--------- ----------
INDIAN 1191660936
----------------------------------------------------------------------------------------------
for more details:
http://indiandba.blogspot.com/2009/03/how-to-change-dbid-and-dbname.html
No comments:
Post a Comment