Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle modifies SID

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Problem description: my default ORACLE_SID was orcl, but now I want to do data synchronization. I have to have a different ORACLE_SID to distinguish it from each other.

Now it only takes a few simple steps to modify the ORACLE_SID

1. First shutdown immediate (be careful not to shutdown abort)

two。 Modify the environment variable of oracle user: ~ / .bash_prfile

[oracle@oracle ~] $vi .bash _ profile

Change the orcl of the export ORACLE_SID=orcl line to the name you want to change; I should be export ORACLE_SID=morcl

Then save and exit

3. Modify the / etc/oratab file; change orcl to morcl on the last line of the file

Morcl:/u01/app/oracle/product/10.2.0:N

4. Next, you should modify the file cd / $ORACLE_HOME/dbs in the oracle directory to change all the file names that contain orcl to those that contain morcl

Mv hc_orcl.dat hc_morcl.dat

Mv lkORCL lkMORCL

Mv spfileorcl.ora spfilemorcl.ora

Mv orapworcl orapwmorcl

5. Rebuild the password file my username and password is: oracle@oracle

[oracle@oracle dbs] $orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=oracle entries=5 force=y

5. Check whether ORACLE_SID is effective echo $ORACLE_SID if it is, you can restart the machine and let ORACLE_SID take effect

[oracle@oracle dbs] $echo $ORACLE_SID

Morcl

[oracle@oracle dbs] $

6. Confirm that the oracle_sid has been modified and the database can be started, but let's 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. Confirm that the oracle database internal SID has been modified

SQL >

SQL > select instance from V$thread

INSTANCE

Morcl

SQL >

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report