Oracle Modify Instance Name SID

Source: Internet
Author: User


Modifying the Oracle Instance name

System Environment: CentOS 6.5
Oracle Version: 10.2

1. Check the original database instance name
$ echo $ORACLE _sid
ORCL

$ sqlplus/as SYSDBA
> select instance from V$thread;
INSTANCE
--------------------------------------------------------------------------------
ORCL


2. Close the database
> Shutdown Immediate;
> exit;


3. Modify the ORACLE_SID environment variables for Oracle users, as modified by ORCL to Doiido
$ vi/home/oracle/.bash_profile
Export Oracle_sid=doiido
$ source/home/oracle/.bash_profile


4. Modify the/etc/oratab file to change the SID name from ORCL to Doiido
$ vi/etc/oratab
Doiido:/u01/app/oracle/11.2/db_1:y


5. Enter the $oracle_home/dbs directory
Modify all file names that contain the original SID to the corresponding new SID.
$ cd $ORACLE _home/dbs
$ mv Hc_zf.dat Hc_doiido.dat
$ mv Lkzf Lkdoiido
$ mv Orapwzf Orapwdoiido
$ mv Spfilezf.ora Spfiledoiido.ora


6. Rebuilding the password file
Because the password file cannot be used in a new instance after it has been renamed, rebuild
$ orapwd file= $ORACLE _home/dbs/orapw$oracle_sid password=123456 entries=5 force=y


7. Start the database
$ sqlplus/as SYSDBA
> Startup



8. Check the database instance name
Check the DB instance name with the following statement and discover that the instance name has changed from ORCL to Doiido
> select instance from V$thread;
INSTANCE
--------------------------------------------------------------------------------
Doiido


This time although the instance name has been changed to Doiido, but the database name (dbname) is still ORCL, so the client is still unable to connect, if need to connect, you need to modify dbname



Oracle Modify Instance Name SID

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.