Query to see the current instance name:-
sys>>select instance_name from v$instance;
sys>>shut immediate
Edit the environment variable "ORACLE_SID" with
the <new SID>:-
oracle@localhost ~]$vi .bash_profile
export ORACLE_SID=<new SID>
:wq
Run the ".bash_profile" file:-
oracle@localhost ~]. .bash_profile
Display the <new SID>:-
oracle@localhost ~]echo $ORACLE_SID
<new SID>
Now copy the old init<$ORACLE_SID>.ora with
new init<$ORACLE_SID>.ora:-
oracle@localhost ~]cd $ORACLE_HOME/dbs
oracle@localhost dbs]cp init<oldSID>.ora init$ORACLE_SID.ora
oracle@localhost ~]sqlplus / as sysdba
sys>>startup
Now check the instance name with the following query:-
sys>>select instance_name from v$instance;
No comments:
Post a Comment