Thursday, May 12, 2011

Summarize of how to change hostname in oracle restart envrionment

1. capture information using following commands:
crsctl stat res -t
crsctl stat res -p
srvctl config asm
srvctl config listener
srvctl config db -d orcl

2. stop has
# crsctl stop has

3. remove has configuration
# crsctl stop res -all $ORACLE_HOME/perl/bin/perl -I $ORACLE_HOME/perl/lib -I $ORACLE_HOME/crs/install $ORACLE_HOME/crs/install/ -deconfig

4. change hostname in following location: (linux as example)

5. reboot the server

6. configure has
# $ORACLE_HOME/perl/bin/perl -I $ORACLE_HOME/perl/lib -I $ORACLE_HOME/crs/install $ORACLE_HOME/crs/install/

7. add resources (grid owner)
$ srvctl add listener
$ srvctl add asm -d 'dev/dev/sdb*';
$ srvctl start listener
$ srvctl start asm

8. add database resource (oracle owner)
$ srvctl add database -d orcl -o /u01/app/oracle/product/11.2.0/dbhome_1 -p +NEW_DATA/orcl/spfileorcl.ora -a NEW_DATA,FRA
$ srvctl start database -d orcl


  1. Thanks very much Luo. This post help change the hostname and ip to a virtual machine with ASM Standalone configuration. I'm doing some test with Data Guard with ASM.

    Best Regards,

    Francisco Tejeda.

  2. How can we change the hostname after INSTALLATION/CONFIGURATION of Oracle Database 11gR2, in a Dedicated Server Environement?

    Please I am in trouble

  3. This is really a goliath and perplexing information for all. Appreciative for sharing this to us and more power.
    Girls in NCR