博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
VCS双机+oracle 11gR2+ASM主机名修改
阅读量:6274 次
发布时间:2019-06-22

本文共 4801 字,大约阅读时间需要 16 分钟。

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

VCS修改主机名
----------------------------------------------------------------------------
1. 停双机
hastop -all
2. 修改/etc/HOSTNAME
# /etc/rc.d/boot.localnet start –使生效
3. 修改/etc/hosts文件
4. 更改双机所需文件
/etc/llthosts
/etc/llttab
/etc/VRTSvcs/conf/sysname
/etc/VRTSvcs/conf/config/main.cf
5. 两台机器重启llt gab
/etc/init.d/gab stop
/etc/init.d/llt stop
/etc/init.d/llt start
/etc/init.d/gab start
6. 启动双机
hastart
7.如果双机没有正常启动,用命令强制接受设置
# /opt/VRTS/bin/hasys -force new system name
----------------------------------------------------------------------------
Oracle侧配置修改(VCS修改主机名及相关HA配置,主机重启后数据库及ASM实例未自动启动)
----------------------------------------------------------------------------
Therefore, please perform the next steps after the hostname was updated/changed/modified in the Oracle Restart configuration

1) Configure the CSS & OHAS services as root user as follows

su - root
# /opt/oracrs/product/11gR2/grid/crs/install/roothas.pl -deconfig -force
# /opt/oracrs/product/11gR2/grid/crs/install/roothas.pl

2) Please perform the next steps as oracle or grid OS user (as the Grid Infrastructure OS owner)

su - grid
crsctl modify resource "ora.cssd" -init -attr "AUTO_START=1"

3) Restart the OHAS stack as grid or oracle OS user (as the Grid Infrastructure OS owner)

su - grid
crsctl stop has
crsctl start has

4) Check the CSS & OHAS state as grid or oracle OS user (as the Grid Infrastructure OS owner)

su - grid
crsctl check has
crsctl check css
crsctl stat resource
crsctl stat res -t

Note: If the CSS & OHAS service did NOT start, then you will need to reboot the Linux/unix box and check them again.

5) Recreate the default listener (LISTENER) using port 1521 (or using your desired port), thru the NETCA GUI located on the new Grid Infrastructure Oracle Home (or manually if you do not have graphical access) as grid or oracle OS user (as the Grid Infrastructure OS owner):

su - grid
vim $ORACLE_HOME/network/admin/listener.ora

# listener.ora Network Configuration File: /opt/oracrs/product/11gR2/grid/network/admin/listener.ora

# Generated by Oracle configuration tools.

LISTENER =

(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hwdb1)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)

ADR_BASE_LISTENER = /opt/oracrs/base

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent

修改主机名

srvctl add listener

srvctl start listener

6) Please create the init+ASM.ora file on the <11.2 Grid Infrastructure Oracle Home>/dbs directory with the next parameters

su - grid
cd $ORACLE_HOME/dbs
mv spfile+ASM.ora spfile+ASM.ora.bak
vim init+ASM.ora

+ASM.__oracle_base='/opt/oracrs/base'#ORACLE_BASE set from in memory value

*.asm_diskgroups='DG_DATA'
*.asm_diskstring='/dev/mapper/m*','/dev/cai*'
*.asm_power_limit=1
*.diagnostic_dest='/opt/oracrs/base'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'

7) Add the ASM instance as grid or oracle OS user (as the Grid Infrastructure OS owner)

su - grid
srvctl add asm

8) Enable ASM instance Auto Start as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow

su - grid
crsctl modify resource "ora.asm" -attr "AUTO_START=1"

9) Make sure the disks are discovered by kfod as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow(可忽略,pfile文件已配置)

kfod asm_diskstring='ORCL:*' disks=all
OR
kfod asm_diskstring='<full path ASM disks location>/*' disks=all

10) If so, then startup the ASM instance as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow:

su - grid
export ORACLE_SID=+ASM
sqlplus / as sysasm
startup pfile=init+ASM.ora --#init file from point #6
show parameter asm

11) Validate that the candidate disks are being discovered:

set lin 300 pages 5000

col path for a50
select path from v$asm_disk;

12) Create a new ASM instance spfile:

create spfile from pfile;

shutdown immediate;
startup
show parameter spfile

13) Add the new ASM spfile and listener to the new ASM instance resource:

srvctl modify asm -p /opt/oracrs/product/11gR2/grid/dbs/spfile+ASM.ora

srvctl modify asm -l LISTENER

/*确认数据库资源已添加

根据具体情况添加数据库资源,因VCS双机Oracle DB资源只会运行在一个节点上,不需要执行此步骤。
su – oracle
$ echo $ORACLE_SID
$ echo $ORACLE_HOME
srvctl add database -d $ORACLE_SID -o $ORACLE_HOME
srvctl start database -d dbname
*/

14) Validate the OHAS (Oracle Restart) services start as follows:

crsctl stop has

crsctl start has
crsctl stat res
crsctl stat res -t

15)oracle用户下的$ORACLE_HOME/network/admin/listener.ora

也需要修改对应的主机名,因VCS双机资源配置的是oracle用户下的监听,所以必须修改,否则双机将无法启动,也无法切换。

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

主机重启,双机切换测试验证
----------------------------------------------------------------------------
验证通过。

转载于:https://www.cnblogs.com/zfox2017/p/6596449.html

你可能感兴趣的文章
02@在类的头文件中尽量少引入其他头文件
查看>>
JAVA IO BIO NIO AIO
查看>>
input checkbox 复选框大小修改
查看>>
网吧维护工具
查看>>
BOOT.INI文件参数
查看>>
vmstat详解
查看>>
新年第一镖
查看>>
unbtu使用笔记
查看>>
OEA 中 WPF 树型表格虚拟化设计方案
查看>>
Android程序开发初级教程(一) 开始 Hello Android
查看>>
使用Gradle打RPM包
查看>>
“我意识到”的意义
查看>>
淘宝天猫上新辅助工具-新品填表
查看>>
再学 GDI+[43]: 文本输出 - 获取已安装的字体列表
查看>>
nginx反向代理
查看>>
操作系统真实的虚拟内存是什么样的(一)
查看>>
hadoop、hbase、zookeeper集群搭建
查看>>
python中一切皆对象------类的基础(五)
查看>>
modprobe
查看>>
android中用ExpandableListView实现三级扩展列表
查看>>