ORACLE 11g RAC日常运行中一些基本启停等命令总结-阿里云开发者社区

开发者社区> 青夜之衫> 正文

ORACLE 11g RAC日常运行中一些基本启停等命令总结

简介:
+关注继续查看

RAC日常运行中一些基本启停命令总结

设置cluster不随着操作系统自动启动

[root@rac01 u01]# crsctl disable crs

CRS-4621: Oracle High Availability Services autostart is disabled.

设置cluster随着操作系统自动启动,默认是启动的

[root@rac01 u01]# crsctl enable crs

CRS-4622: Oracle High Availability Services autostart is enabled.

启动cluster,两个节点分别执行

[root@rac01 u01]# crsctl start crs

CRS-4123: Oracle High Availability Services has been started.

[root@rac02 u01]# crsctl start crs

CRS-4123: Oracle High Availability Services has been started.

查看cluster资源状态,在两个节点都可以查看。

[root@rac01 u01]# crsctl status resource -t

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

NAME TARGET STATE SERVER STATE_DETAILS

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

Local Resources

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

ora.DATA.dg

OFFLINE OFFLINE rac01

OFFLINE OFFLINE rac02

ora.LISTENER.lsnr

ONLINE ONLINE rac01

ONLINE ONLINE rac02

ora.OCR.dg

ONLINE ONLINE rac01

ONLINE ONLINE rac02

ora.asm

ONLINE ONLINE rac01 Started

ONLINE ONLINE rac02 Started

ora.eons

ONLINE ONLINE rac01

ONLINE ONLINE rac02

ora.gsd

OFFLINE OFFLINE rac01

OFFLINE OFFLINE rac02

ora.net1.network

ONLINE ONLINE rac01

ONLINE ONLINE rac02

ora.ons

ONLINE ONLINE rac01

ONLINE ONLINE rac02

ora.registry.acfs

ONLINE ONLINE rac01

ONLINE ONLINE rac02

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

Cluster Resources

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

ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE rac01

ora.oc4j

1 ONLINE ONLINE rac01

ora.rac01.vip

1 ONLINE ONLINE rac01

ora.rac02.vip

1 ONLINE ONLINE rac02

ora.sap.db

1 OFFLINE OFFLINE

2 OFFLINE OFFLINE

ora.scan1.vip

1 ONLINE ONLINE rac01

启动数据库实例,数据库实例名字为sap,在一个实例上执行即可

[root@rac01 u01]# srvctl start database -d sap

查看cluster资源状态ora.sap.db状态为open

[root@rac01 u01]# crsctl status resource -t

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

NAME TARGET STATE SERVER STATE_DETAILS

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

Local Resources

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

ora.DATA.dg

ONLINE ONLINE rac01

ONLINE ONLINE rac02

ora.LISTENER.lsnr

ONLINE ONLINE rac01

ONLINE ONLINE rac02

ora.OCR.dg

ONLINE ONLINE rac01

ONLINE ONLINE rac02

ora.asm

ONLINE ONLINE rac01 Started

ONLINE ONLINE rac02 Started

ora.eons

ONLINE ONLINE rac01

ONLINE ONLINE rac02

ora.gsd

OFFLINE OFFLINE rac01

OFFLINE OFFLINE rac02

ora.net1.network

ONLINE ONLINE rac01

ONLINE ONLINE rac02

ora.ons

ONLINE ONLINE rac01

ONLINE ONLINE rac02

ora.registry.acfs

ONLINE ONLINE rac01

ONLINE ONLINE rac02

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

Cluster Resources

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

ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE rac01

ora.oc4j

1 ONLINE ONLINE rac01

ora.rac01.vip

1 ONLINE ONLINE rac01

ora.rac02.vip

1 ONLINE ONLINE rac02

ora.sap.db

1 ONLINE ONLINE rac01 Open

2 ONLINE ONLINE rac02 Open

ora.scan1.vip

1 ONLINE ONLINE rac01

查看数据库实例状态

[root@rac02 u01]# srvctl status database -d sap

Instance sap1 is running on node rac01

Instance sap2 is running on node rac02

查看nodeapps资源状态

[root@rac01 rac01]# srvctl status nodeapps

VIP rac01-vip is enabled

VIP rac01-vip is running on node: rac01

VIP rac02-vip is enabled

VIP rac02-vip is running on node: rac02

Network is enabled

Network is running on node: rac01

Network is running on node: rac02

GSD is disabled

GSD is not running on node: rac01

GSD is not running on node: rac02

ONS is enabled

ONS daemon is running on node: rac01

ONS daemon is running on node: rac02

eONS is enabled

eONS daemon is running on node: rac01

eONS daemon is running on node: rac02

查看listener状态

[root@rac01 rac01]# srvctl status listener

Listener LISTENER is enabled

Listener LISTENER is running on node(s): rac01,rac02

查看ASM状态

[root@rac01 rac01]# srvctl status asm

ASM is running on rac01,rac02

查看scan状态

[root@rac01 rac01]# srvctl status scan

SCAN VIP scan1 is enabled

SCAN VIP scan1 is running on node rac01

查看ASM diskgroup状态

[root@rac01 rac01]# srvctl status diskgroup

PRKO-2082 : Missing mandatory option -g


[root@rac01 rac01]# srvctl status diskgroup -g data

Disk Group data is running on rac01,rac02

停掉rac一个节点,例如停掉rac02

1、先停掉数据库实例,使用以下命令

[root@rac01 rac01]# srvctl stop instance -d sap -n rac02 -o immediate

也可以使用以下命令,

[root@rac01 rac01]# srvctl stop instance -d sap -i sap2 -o immediate

查看voting disk

[root@rac01 rac01]# crsctl query css votedisk

## STATE File Universal Id File Name Disk group

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

1. ONLINE aeeaa395bb2b4fe0bff37dd0eaafe2c1 (/dev/disk/by-id/scsi-14f504e46494c4552667a507877412d6d616f452d63583051-part1) [OCR]

Located 1 voting disk(s).

查看OCR

[root@rac01 rac01]# ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 3

Total space (kbytes) : 262120

Used space (kbytes) : 2700

Available space (kbytes) : 259420

ID : 1248966756

Device/File Name : +OCR

Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

本文转自ICT时空 dbasdk博客,原文链接:ORACLE 11g RAC日常运行中一些基本启停等命令总结 ,如需转载请自行联系原博主。

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
历代《Java开发手册》亮点全总结,超全资料带你和260万人一起学Java!|开发者必读(168期)
距离泰山版《Java开发手册》发行已经有一周了,你是否也下载了这本超人气电子书呢?为了帮助广大开发者更好地学习和使用《Java开发手册》,阿里妹特地为你整理了所有版本的Java手册和超多学习资料,助你顺利学习!
2084 0
oracle自测总结1
今天,自己测试了一下对于oracle掌握的熟练程度,仅限于基本的操作,自己做了简单的总结。     1.修改global name的时候报了如下的错误 SQL> alter system set db_domain='oracle.
672 0
使用OpenApi弹性释放和设置云服务器ECS释放
云服务器ECS的一个重要特性就是按需创建资源。您可以在业务高峰期按需弹性的自定义规则进行资源创建,在完成业务计算的时候释放资源。本篇将提供几个Tips帮助您更加容易和自动化的完成云服务器的释放和弹性设置。
7734 0
Oracle创建删除用户、角色、表空间、导入导出、...命令总结
http://www.iteye.com/topic/620306/   查询表空间名字和状态 select tablespace_name,status FROM dba_tablespa...
478 0
Oracle命令行登陆导入导出以及连接字符串
1 登陆C:\Documents and Settings\Administrator>sqlplus xy/123pwd@db10   2 导入导出C:\Documents and Settings\Administrator>exp xy/123pwd@db10C:\Documents and Settings\Administrator>imp xy/123p
774 0
关于ora-02391问题的总结
关于ORA问题的分析和解决其实是一个很好的学习思路,抓住一个每一个ORA错误,然后进一步分析一些原因,总结,总会有不一样的收获,还是那句话,任何问题背后都是有原因的。
593 0
常见的浏览器兼容性问题总结
1. 不同浏览器的标签默认外补丁margin和内补丁padding不同 发生概率:100% 解决方案:使用CSS通配符*,设置内外补丁为0 *{ margin: 0; padding: 0;} 2.
1513 0
+关注
1028
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
文娱运维技术
立即下载
《SaaS模式云原生数据仓库应用场景实践》
立即下载
《看见新力量:二》电子书
立即下载