Oracle modifies SIDS

Source: Internet
Author: User

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

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.