1, check the original database instance name
$ $ echo the ORACLE_SID
orcl
$ sqlplus / as sysdba
> select instance from v$thread;
INSTANCE
orcl
2, close the database
> the shutdown immediate;
> Exit;
3, modify user oracle ORACLE_SID environment variables, such as modified by orcl exoaidc
/home/oracle/.bash_profile $ VI
Export ORACLE_SID = exoaidc
$ Source /home/oracle/.bash_profile
4, modify the / etc / oratab file, sid name orcl as modified by the Linux
$ vi / etc / oratab
exoa: /u01/app/oracle/11.2/db_1: the Y-
5, into the $ ORACLE_HOME / dbs directory
will contain all file names to modify the original for the new sid sid corresponding
$ cd $ ORACLE_HOME / dbs
$ mv hc_zf.dat hc_exoa.dat
$ mv lkZF lkexoa
$ mv orapwzf orapwexoa
$ mv spfilezf.ora spfileexoa.ora
6, rebuild the password file
can not be used because the password file renamed in the new instance, the reconstruction of
$ orapwd file = $ ORACLE_HOME / dbs / orapw $ ORACLE_SID password = 123456 entries = 5 force = y
7, start the database
$ sqlplus / AS sysdba
> the Startup
8, check the name of the database instance
by checking a database instance name statement found by the instance name has become exoa ORCL
> SELECT instance from V $ Thread;
INSTANCE
exoa
Next to modify the listener, as amended sid, but this time the listener or the configuration of sid original orcl
Modify the $ ORACLE_HOME \ network \ admin \ listener.ora file
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = ORCL)
)
)
ORCL can put into exoa
---------------------
Author: hidden disabilities 0
Source: CSDN
Original: https: //blog.csdn.net/lyd135364/ article / details / 50649581
copyright: This article is a blogger original article, reproduced, please attach Bowen link!