How to change oracle 10g DB name in linux
- First of all backup the database.
 - Then login as SYSDBA to check out the DB ID and DB Name by using the following statement, using SQLPLUS or your favourite SQL Client.
 - select dbid, name from v$database
 - Shutdown the database and startup it in mount state (SQLPLUS).
 - shutdown immediate
 
- startup mount
 - Use the DBNEWID command to change the DB ID, you need to login as user with privilege SYSDBA (Terminal).
 - nid target=username/password@servicename dbname=newdbname
 - Shutdown database again (SQLPLUS).
 - shutdown immediate
 - Change db_name initialization parameter in the initialization file, normally inside database folder/admin/pfile (Terminal).
 - Create a new password file using ORAPWD utility, the file usually in Oracle folder/dbs (Terminal).
 - orapwd file=orapwSID password=password entries=
 - Start database in mount state (SQLPLUS).
 - startup mount
 - Open database with RESETLOGS option (SQLPLUS).
 - alter database open resetlogs
 - Verify the database id and name using following statement (SQLPLUS).
 - select dbid, name from v$database
 - Don’t forget to change ORACLE_SID parameter in .bash_profile and database name in /etc/oratab
 - (Terminal).
 
No comments:
Post a Comment