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/roothas.pl -deconfig

4. change hostname in following location: (linux as example)
/etc/syscofig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/hosts
$GRID_HOME/network/listener.ora

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/roothas.pl

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

2 comments:

  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.

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

    Please I am in trouble

    ReplyDelete