Problem Description: My previous default oracle_sid is ORCL, now I want to do data synchronization, must have different oracle_sid, in order to distinguish.
Now it takes just a few simple steps to modify the good oracle_sid;
1. First shutdown immediate (be careful not to shutdown abort)
2. Modify environment Variables for Oracle users: ~/.bash_prfile
[Email protected] ~]$ Vi. bash_profile
Change the ORCL of the export ORACLE_SID=ORCL to the name you want to change; I should be the export ORACLE_SID=MORCL
then save and exit;
3. Modify the/etc/oratab file; change ORCL to MORCL in the last line of the file
Morcl:/u01/app/oracle/product/10.2.0:n
4. Next, you should modify the files in the Oracle directory cd/$ORACLE _home/dbs all the file names that contain ORCL to the filename containing the MORCL
MV Hc_orcl.dat Hc_morcl.dat
MV Lkorcl LKMORCL
MV Spfileorcl.ora Spfilemorcl.ora
MV Orapworcl ORAPWMORCL
5. Rebuild password file My username password is: [email protected]
[Email protected] dbs]$ orapwd file= $ORACLE _home/dbs/orapw$oracle_sid password=oracle entries=5 force=y
5. Check whether the Oracle_sid is in effect echo $ORACLE _sid if it is in effect, you can restart the machine for Oracle_sid to take effect
[Email protected] dbs]$ echo $ORACLE _sid
Morcl
[Email protected] dbs]$
6. Confirm that the ORACLE_SID has been modified to start the database, we will wait and see:
Sql>
Sql> Startup
ORACLE instance started.
Total System Global area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 62916852 bytes
Database buffers 100663296 bytes
Redo buffers 2973696 bytes
Database mounted.
Database opened.
Sql>
Sql>
Sql>
7. Verify that the SID has been modified within Oracle database
Sql>
Sql> Select instance from V$thread;
INSTANCE
--------------------------------------------------------------------------------
Morcl
Sql>
This article is from the "Common Documents" blog, so be sure to keep this source http://yujianglei.blog.51cto.com/7215578/1561614
Oracle modifies SIDS