srvctl start_执行命令ls>c

srvctl start_执行命令ls>c==查看数据库信息srvctlconfigdatabase-dorcl-a==数据库随CRS启动而启动srvctlenabledatabase-dorcl==禁止服务在某个实例上运行srvctldisableservice-dorcl-sservicename-iorcl1srvctlconfigservic

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺
==查看数据库信息

srvctl config database -d orcl -a

==数据库随CRS启动而启动

srvctl enable database -d orcl

==禁止服务在某个实例上运行

srvctl disable service -d orcl -s servicename -i orcl1

srvctl config service -d orcl -s servicename -o orcl2

==删除服务

srvctl remove service -d orcl -i orcl1

==推荐适用srvctl来启动/关闭数据,这样可以保证及时更新crs中的信息

srvctl start database -d orc

srvctl start database -d orcl -i orcl2 -o nomount/mount

srvctl stop instance -d orcl -i orcl2 -o immediate

[root@juliaz3 ~]# srvctl status scan -i 1

SCAN VIP scan1 is enabled

SCAN VIP scan1 is running on node juliaz3

[root@juliaz3 ~]#

[root@juliaz3 ~]# srvctl status diskgroup -g sysdb

Disk Group sysdb is running on juliaz2,juliaz3

[root@juliaz3 ~]#

[root@juliaz3 ~]# srvctl stop database -d orcl

[root@juliaz3 ~]# srvctl status database -d orcl

Instance orcl1 is not running on node juliaz2

Instance orcl2 is not running on node juliaz3

[root@juliaz3 ~]# srvctl start database -d orcl

[root@juliaz3 ~]# srvctl stop database -d orcl -o immediate

[root@juliaz3 ~]# srvctl start database -d orcl -o mount

[root@juliaz3 ~]# srvctl status database -d orcl

Instance orcl1 is running on node juliaz2

Instance orcl2 is running on node juliaz3

[root@juliaz3 ~]# srvctl start database -d orcl -o open   /*在已经mount的时候不能进一步open了,功能不够强大啊

PRCR-1004 : Resource ora.orcl.db is already running

管理RAC中的网络

当rac集群投入使用以后,如果发现节点的IP地址设置不合理,需要对其进行修改。因为节点的IP地址配置信息都记录在OCR中,所以为了更新IP地址需要更新两个地方:

1.DNS 或/etc/hosts

2.OCR中的信息

以上可以通过srvctl 和oicfg完成

rac中客户端通过VIP 11.2后可以vip或scan访问数据库。在不停止数据库的情况下对vip进行修改。

vip信息

[root@juliaz3 ~]# srvctl config vip -n juliaz2
VIP exists.:juliaz2
VIP exists.: /juliaz2-vip/9.115.17.94/255.255.255.0/eth0
[root@juliaz3 ~]# srvctl config vip -n juliaz3
VIP exists.:juliaz3
VIP exists.: /juliaz3-vip/9.115.17.95/255.255.255.0/eth0
[root@juliaz3 ~]# 

修改vip,需要停止数据库service的运行,service也是ocr中的一种资源,它的功能是提高数据库高可能性,在默认情况下,它的名称和数据库名称相同。

停止节点juliaz2上的service 

参考书上的命令行不通,可以用srvctl stop service -d orcl -n juliaz2

[root@juliaz3 ~]# srvctl stop service -d orcl -s orcl -n juliaz2
PRCR-1001 : Resource ora.orcl.orcl.svc does not exist

然后需要关闭这个节点上的vip资源。

[root@juliaz3 ~]# srvctl stop vip -n juliaz2
PRCR-1014 : Failed to stop resource ora.juliaz2.vip
PRCR-1065 : Failed to stop resource ora.juliaz2.vip
CRS-2529: Unable to act on 'ora.juliaz2.vip' because that would require stopping or relocating 'ora.LISTENER.lsnr', but the force option was not specified

[root@juliaz3 ~]# srvctl stop vip -n juliaz2 -f
[root@juliaz3 ~]# srvctl status  vip -n juliaz2
VIP juliaz2-vip is enabled
VIP juliaz2-vip is not running

确保你要更新的ip已经,添加到DNS或者/etc/hosts文件中。

[root@juliaz3 ~]# srvctl modify nodeapps -n juliaz2 -A 9.115.17.98/255.255.255.0/eth0

[root@juliaz3 ~]# srvctl start vip -n juliaz2

IP修改成功以后,就可以启动这个资源,在启动VIP时,数据库的service资源将一起启动。

[root@juliaz3 ~]# srvctl status vip -n juliaz2
VIP juliaz2-vip is enabled
VIP juliaz2-vip is running on node: juliaz2

网上找来的可以了通过stop nodesapps 来停服务,记得修改/etc/hosts。

[root@juliaz3 ~]# srvctl stop nodeapps -n juliaz2
PRCR-1065 : Failed to stop resource ora.juliaz2.vip
CRS-2529: Unable to act on 'ora.juliaz2.vip' because that would require stopping or relocating 'ora.LISTENER.lsnr', but the force option was not specified
PRCR-1014 : Failed to stop resource ora.net1.network
PRCR-1065 : Failed to stop resource ora.net1.network
CRS-2529: Unable to act on 'ora.net1.network' because that would require stopping or relocating 'ora.juliaz2.vip', but the force option was not specified


[root@juliaz3 ~]# srvctl stop nodeapps -n juliaz2 -f
PRKO-2426 : ONS is already stopped on node(s): juliaz2
PRKO-2427 : eONS is already stopped on node(s): juliaz2

[root@juliaz3 ~]# srvctl status nodeapps 
VIP juliaz2-vip is enabled
VIP juliaz2-vip is not running
VIP juliaz3-vip is enabled
VIP juliaz3-vip is running on node: juliaz3
Network is enabled
Network is not running on node: juliaz2
Network is running on node: juliaz3
GSD is disabled
GSD is not running on node: juliaz2
GSD is not running on node: juliaz3
ONS is enabled
ONS daemon is not running on node: juliaz2
ONS daemon is running on node: juliaz3
eONS is enabled
eONS daemon is not running on node: juliaz2
eONS daemon is running on node: juliaz3
[root@juliaz3 ~]# srvctl modify nodeapps -n juliaz2 -A 9.115.17.94/255.255.255.0/eth0
[root@juliaz3 ~]# srvctl start  nodeapps  -n juliaz2
[root@juliaz3 ~]# 

11.2中,scan是oracle推荐使用的ip地址,客户端应用程序通过scan,可以把请求轮流发送到各个节点上。scan代表的是一个整个集群,这个scan可以被映射成一个或者多个ip地址,通过scan可以实现客户端访问负载均衡。 首先要保证scan所对应的名称和ip地址记录在dns中,能够通过nslookup解析。

[root@juliaz3 ~]# srvctl config scan
SCAN name: juliaz-cluster, Network: 1/9.115.17.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /9.115.17.96/9.115.17.96

[root@juliaz3 ~]# srvctl status scan -i 1
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node juliaz3
[root@juliaz3 ~]#  
[root@juliaz3 ~]# srvctl stop scan -i 1
PRCR-1065 : Failed to stop resource ora.scan1.vip
CRS-2529: Unable to act on 'ora.scan1.vip' because that would require stopping or relocating 'ora.LISTENER_SCAN1.lsnr', but the force option was not specified

[root@juliaz3 ~]# srvctl stop scan -i 1 -f
[root@juliaz3 ~]# srvctl modify scan -n rac-clusster
PRCS-1016 : Failed to resolve Single Client Access Name rac-clusster
[root@juliaz3 ~]# 

/*因为我没有配置dbs,所以命令失败。

修改私有和公共ip地址

[root@juliaz3 ~]# oifcfg getif
eth0  9.115.17.0  global  public
eth1  192.168.1.0  global  cluster_interconnect
[root@juliaz3 ~]# 

暂时到这,。。后续

参考 大话 oracle RAC

oracle RAC实战指南刘宪军–不错的一本书

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/194754.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • BS架构和CS架构的区别

    BS架构和CS架构的区别介绍BS:(Browser/Server,浏览器/服务器模式),web应用可以实现跨平台,客户端零维护,但是个性化能力低,响应速度较慢。CS:(Client/Server,客户端/服务器模式),桌面级应用响应速度快,安全性强,个性化能力强,响应数据较快区别硬件环境不同C/S用户固定,一般只应用于局域网中,要求拥有相同的操作系统,如果对于不同操作系统还要相应开发不同的版本,并且对…

    2022年6月15日
    29
  • Nginx sendfile原理详解[通俗易懂]

    Nginx sendfile原理详解[通俗易懂]配置语法语法:sendfileon|off;默认值:sendfileoff;上下文:http,server,location,ifinlocation说明sendfile值为on,指定使用sendfile系统调用来传输文件。sendfile系统调用在两个文件描述符之间直接传递数据(完全在内核中操作),从而避免了数据在内核缓冲区和用户缓冲区之间的拷贝,操作效率很高,被…

    2022年5月16日
    203
  • python2022.01.13激活码-激活码分享2022.01.25

    (python2022.01.13激活码)最近有小伙伴私信我,问我这边有没有免费的intellijIdea的激活码,然后我将全栈君台教程分享给他了。激活成功之后他一直表示感谢,哈哈~IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.html…

    2022年3月31日
    65
  • oracle删除锁表_oracle清理数据文件

    oracle删除锁表_oracle清理数据文件查看Oracle数据库被锁住的表,删除锁表的进程–1.查看被锁住的表SELECTdob.object_nametable_name,lo.locked_mode,lo.session_id,vss.serial#,vss.actionaction,vss.osuserosuser,vss.logon_time,vss.processap_pid,

    2022年8月23日
    3
  • https和ssl的区别_ssl认证

    https和ssl的区别_ssl认证https加密、解密、及验证过程如下图:HTTPS怎么实现安全传输的?建立安全传输HTTPS中,客户端首先打开一条到WEB服务器443端口的连接。一旦建立了TCP连接,客户端和服务器就会初始化SSL层,对加密参数进行沟通,并交换密钥。握手完成后,SSL初始化就完成了,客户端就可以将请求报文发送给安全层了。重点SSL握手发送已加密的HTTP报文之前,客户端和服…

    2022年10月2日
    0
  • ubuntu apache2配置详解(含虚拟主机配置方法)[通俗易懂]

    ubuntu apache2配置详解(含虚拟主机配置方法)[通俗易懂]在Windows下,Apache的配置文件通常只有一个,就是httpd.conf。但我在UbuntuLinux上用apt-getinstallapache2命令安装了Apache2后,竟然发现它

    2022年7月3日
    40

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号