----------------------------------------------------------------------------
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用户下的监听,所以必须修改,否则双机将无法启动,也无法切换。

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

VCS双机+oracle 11gR2+ASM主机名修改的更多相关文章

  1. oracle主机名修改

    转自:http://www.cnblogs.com/tippoint/archive/2013/04/07/3003810.html 有的情况下,我们需要修改已经安装oracle数据库的主机名.以下是 ...

  2. CentOS7主机名修改

    1.命令行更改主机名,重启终端即生效. #hostnamectl --static set-hostname k8s-master

  3. Oracle LISTENER 主机名修改为IP地址后LISTENER无法监听到实例 oracle监听错误与hosts文件配置

    为什么listener.ora文件里面HOST后面到底应该输入IP地址还是主机名.我的经验告诉我,这边最好使用主机名.很多的时候,一个机器绑定的不只一个IP地址,如HOST后面是IP地址,那么ORAC ...

  4. 转://Oracle 11gR2 ASM磁盘组管理

    一.环境.[grid@rhel2 ~]$ cat /etc/issueRed Hat Enterprise Linux Server release 5.5 (Tikanga) Kernel \r o ...

  5. ubuntu主机名修改

    1.查看主机名 在Ubuntu系统中,快速查看主机名有多种方法: 其一,打开一个GNOME终端窗口,在命令提示符中可以看到主机名,主机名通常位于"@"符号后: 其二,在终端窗口中输 ...

  6. oracle 11gR2 ASM添加和删除磁盘

    一.环境 oracle 11gR2 RAC + Oracle Linux Server release 5.9 二.实施 备注:安全起见,操作之前停数据库实例.ASM实例 1.节点1.2磁盘信息 -- ...

  7. 1.ECS(CentOS7)主机名修改命令

    命令:hostnamectl 使用--help参数查看hostnamectl里面每个参数对应的含义: [root@localhost ~]# hostnamectl --help Query or c ...

  8. 修改Linux的基本配置(修改主机名修改ip地址安装JDK/Tomcat/MySQL等等)

    (一)基本操作修改 修改主机名 vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=server1.itcast.cn 修改ip地址 vi /etc/s ...

  9. linux的hostname(主机名)修改详解

    Linux操作系统的hostname是一个kernel变量,可以通过hostname命令来查看本机的hostname.也可以直接cat /proc/sys/kernel/hostname查看. #ho ...

随机推荐

  1. this引用逃逸

    1.什么是This逃逸? 在构造器构造还未彻底完成前(即实例初始化阶段还未完成),将自身this引用向外抛出并被其他线程复制(访问)了该引用,可能会问到该还未被初始化的变量,甚至可能会造成更大严重的问 ...

  2. 关于toggle事件委托的处理

    当html页面加载后,页面上需要再次动态加载的按钮等事件的绑定,我们有两种处理方案 一.再次加载后进行绑定 二.使用委托进行绑定 而toggle事件是无法直接绑定的,这时可以转化为click的事件,并 ...

  3. 基于Visual Studio .NET2015的单元测试

    基于Visual Studio .NET2015的单元测试 1.    在Visual Studio .NET2015中创建任意项目. 2.    在某个公共类的公共方法的名称上面点击右键,选择“创建 ...

  4. 【SQLite】简单的基本使用步骤

    SQLite介绍SQLite is a software library that implements a self-contained, serverless, zero-configuratio ...

  5. Eclipse快捷键 10个最有用的快捷键(转载收藏)

    原文连接:https://www.cnblogs.com/iamfy/archive/2012/07/11/2586869.html Eclipse中10个最有用的快捷键组合 一个Eclipse骨灰级 ...

  6. canvas-2lineJoin.html

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  7. numpy库的常用方法

    np.abs() 计算数组各元素的绝对值1 a= [0,1,2,3,4,-5,9,-3,12,-4] np.abs(a)out: array([ 0, 1, 2, 3, 4, 5, 9, 3, 12, ...

  8. 中软高科WEB前端面试题

    一个朋友面试的题目,百度了一下这个中软高科貌似是一个培训机构...以下答案是我本人的理解,仅供参考 HTML+CSS 1.你能解释一下css的盒子模型吗? 有两种盒子模型:IE盒子模型,W3C盒子模型 ...

  9. 微信小程序开发--路由切换,页面重定向

    这段时间开发了一个微信小程序,虽然小程序的导航API 官方文档写得很详细,但是在具体开发过程中还是会遇到很多不明白,或者一时转不过弯的地方. 1.页面切换传参,参数读取 1.1  wx.navigat ...

  10. Android 云之声离线语音合成

    离线语音解析 public class SpeechUtilOffline implements TTSPlayerListener { public static final String appK ...