Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
database name change

database name change

Ratings: (0)|Views: 206|Likes:
Published by sundaravelr

More info:

Published by: sundaravelr on Sep 10, 2008
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less





Changing The database Name:---------------------------Description:------------In oracle 10g its possible to change the database name by using DBNEWID utility.Scenerio:---------Now we are going to change the database name from "doyen" to "doyen1".Note:-----Before doing this take the whole database backup.Steps to change the database name:----------------------------------1.If you have multiple instances running on the same server its good to set sidfirst.In linux:---------$export ORACLE_SID=doyenIn Windows:-----------set ORACLE_SID=doyen2.Connecting to sqlplus and shutdown the database which we are going to change thedatabase namesql>shutdown immediate3.Put the database in mount stagesql>startup mount4.Exit from the sql prompt by typing exitsql>exit5.Invoke the DBNEWID utility(nid) specifying the new database name from thecommand prompt using user with sysdba privilege$ nid target=sys/oracle dbname=doyen1 setname=yes6.DBNEWID performs validations in the headers of the control files (not the datafiles) before attempting I/O to the files. If validation is successful, thenDBNEWID prompts for confirmation, changes the database name in the control files,shuts down the database and exits.7.Log file:-----------DBNEWID: Release - Production on Thu Aug 28 10:21:42 2008Copyright (c) 1982, 2005, Oracle. All rights reserved.Connected to database DOYEN (DBID=1998825041)Connected to server version 10.2.0Control Files in database:/u01/app/oracle/oradata/doyen/ctl1.dbf
Change database name of database DOYEN to DOYEN1? (Y/[N]) => yProceeding with operationChanging database name from DOYEN to DOYEN1Control File /u01/app/oracle/oradata/doyen/ctl1.dbf - modifiedDatafile /u01/app/oracle/oradata/doyen/system01.dbf - wrote new nameDatafile /u01/app/oracle/oradata/doyen/undotbs01.dbf - wrote new nameDatafile /u01/app/oracle/oradata/doyen/sysaux.dbf - wrote new nameDatafile /u01/app/oracle/oradata/doyen/users.dbf - wrote new nameDatafile /u01/app/oracle/oradata/doyen/welcome.dbf - wrote new nameDatafile /u01/app/oracle/oradata/doyen/example.dbf - wrote new nameDatafile /u01/app/oracle/oradata/doyen/temp01.dbf - wrote new nameControl File /u01/app/oracle/oradata/doyen/ctl1.dbf - wrote new nameInstance shut downDatabase name changed to DOYEN1.Modify parameter file and generate a new password file before restarting.Succesfully changed database name.DBNEWID - Completed succesfully.8.Now the database in shutdown state.Put the database in mount state.It will not come to mount stage.It throws some error.SQL> startup mountORACLE instance started.Total System Global Area 583008256 bytesFixed Size 1220676 bytesVariable Size 159387580 bytesDatabase Buffers 415236096 bytesRedo Buffers 7163904 bytesORA-01103: database name 'DOYEN1' in control file is not 'DOYEN'9.change the database name in spfile.By issuing this command.sql>alter system set db_name=doyen1 scope=spfile;system alteredIf we use pfile to startup go to that location open it as a text editor and changethe database name manually.Pfile location-->$ORACLE_HOME/dbs/init$ORACLE_SID.ora10.Create new password file.Password file location is$ORACLE_HOME/dbs/orapw$ORACLE_SID.11.shutdown and startup your database.sql>startup force12.Check the database name.sql>show parameter db_nameNAME TYPE VALUE------------------------------------ -----------------------------------------db_name string DOYEN113.Now the database name has been changed.14.Reference: http://sabdarsyed.blogspot.com/2007/03/changing-oracle-database-name-in-oracle.html

Activity (4)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
brijesh1747 liked this
junaid9900 liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->