ITPub博客

首页 > 数据库 > Oracle > GI standalone (SIHA)环境更改主机名过程

GI standalone (SIHA)环境更改主机名过程

Oracle 作者:panpong 时间:2014-09-12 17:32:06 0 删除 编辑

GI standalone (SIHA)环境更改主机名过程

       当单实例主机更好hostname后,需要重新配置GI下的CSS与OHAS服务等,下面是操作步骤;

【参考文档:How to change Hostname/ IP in GI standalone (SIHA) (Doc ID 1552810.1)】

1) Reconfigure the CSS & OHAS services as root user:

==================================================================

# /crs/install/roothas.pl -deconfig -force

# /crs/install/roothas.pl

==================================================================

[oracle@gxoel56 bin]$ ./crs_stat -t

Name           Type           Target    State     Host       

------------------------------------------------------------

ora.asm        ora.asm.type   OFFLINE   OFFLINE              

ora.cssd       ora.cssd.type  OFFLINE   OFFLINE              

ora.diskmon    ora....on.type OFFLINE   OFFLINE              

ora.evmd       ora.evm.type   ONLINE    ONLINE    gxoel56    

ora.ons        ora.ons.type   OFFLINE   OFFLINE              

 

2) Check the CSS & OHAS state as grid OS user:

==================================================================

$> crsctl check has

$> crsctl check css

$> crsctl stat res -t

==================================================================

 

3) Recreate the default listener (LISTENER) thru the NETCA

==================================================================

由于我没有图形化界面,不能使用netca,但是在配置好listener.ora,tnsname.ora等文件后,直接在【也没有grid用户,GI dir】下使用srvctl add listener即可;

 

[oracle@gxoel56 admin]$ ll

-rw-r--r--. 1 oracle oinstall  166 Sep 11 14:09 listener.ora

drwxr-xr-x. 2 oracle oinstall 4096 Sep 11 13:44 samples

-rw-r--r--. 1 oracle oinstall  205 May 11  2011 shrept.lst

[oracle@gxoel56 admin]$ cat /app/grid/product/11.2.0/grid_1/network/admin/listener.ora

LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent

[oracle@gxoel56 admin]$ pwd

[oracle@gxoel56 admin]$ cat /app/oracle/product/11.2.0/db_1/network/admin/listener.ora

# listener.ora Network Configuration File: /app/oracle/product/11.2.0/db_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = gxoel56)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

 (SERVICE_NAME = bajdb)

    )

  )

 

ADR_BASE_LISTENER = /app/oracle

[oracle@gxoel56 admin]$cd /app/grid/product/11.2.0/grid_1/bin

[oracle@gxoel56 bin]$ ./srvctl add listener

[oracle@gxoel56 bin]$

 

4) Add ASM resource as grid (Grid Infrastructure owner):

==================================================================

$> /bin/srvctl add asm

$> /bin/crsctl modify resource "ora.asm" -attr "AUTO_START=1"

==================================================================

 

5) Create an init+ASM.ora pfile on the /dbs directory with the next parameters:

==================================================================

asm_diskgroups=

asm_diskstring=''

instance_type='asm'

large_pool_size=12M

==================================================================

 

6)Startup the ASM instance using the created pfile, as follow:

==================================================================

$> export ORACLE_SID=+ASM

$> sqlplus “/as sysasm”

SQL> startup pfile=init+ASM.ora --#init file from point #4

SQL> show parameter asm

SQL> create spfile '' from pfile='init+ASM.ora';

==================================================================

 

7) Add the RDBMS instance(as oracle user) :

==================================================================

$> /bin/srvctl add database -d

==================================================================

[oracle@gxoel56 bin]$ ./srvctl add database -d bajdb -o /app/oracle/product/11.2.0/db_1

[oracle@gxoel56 bin]$

 

设置DB resource as grid (Grid Infrastructure owner):

==================================================================

$> /bin/crsctl modify resource "ora.****.db" -attr "AUTO_START=1"

==================================================================

[grid (GIowner) bin]$ ./crsctl modify resource "ora.bajdb.db" -attr "AUTO_START=1"

[grid (GIowner) bin]$

 

8) Finally validate if OHAS services start, as follow:

==================================================================

$> crsctl stop has

$> crsctl start has

$> crsctl stat res -t

==================================================================

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16976507/viewspace-1268722/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
数据库工程师,熟悉Oracle,Postgresql,MySQL等主流关系型数据库运维,调优,一直活跃在运维一线。了解Python,Django,简单自动化运维系统开发。

注册时间:2009-03-06

  • 博文量
    142
  • 访问量
    392347