Chinaunix首页 | 论坛 | 博客
  • 博客访问: 53249
  • 博文数量: 11
  • 博客积分: 469
  • 博客等级: 下士
  • 技术积分: 150
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-17 09:45
文章分类

全部博文(11)

文章存档

2012年(11)

我的朋友

分类: Oracle

2012-01-19 20:19:20

Oracle10g RAC (OCFS2)开启关闭及日常检查(2008-03-24 14:58:26)
var $tag='it'; var $tag_code='4fe8657016515b85df68abe3c2842314'; var $r_quote_bligid='43b6788101008q3g'; var $worldcup='0'; var $worldcupball='0'; 标签: it

开关机步骤:

1. 停止Oracle10g 环境

$ lsnrctl stop (停止监听)

$ emctl stop dbconsole (停止dbconsole)

$ shutdown immediate (停止实例)

$ srvctl stop nodeapps -n gnd-rac01 (停节点服务)

# /etc/init.d/init.crs stop (root 停cluster 软件)

2. 启动Oracle10g 环境

$ srvctl start nodeapps -n gnd-rac01 (启动一些服务)

$ startup (启动实例)

$ emctl start dbconsole (启动dbconsole)

$ lsnrctl start (启动监听)

平时的检查:

1. 平时查看instance 状态(所有节点) :

gnd-rac01$srvctl status database -d tpc [注意:tpc 是db name]

Instance tpc1 is running on node gnd-rac01

Instance tpc2 is running on node gnd-rac02

2. 检查 crs(所有节点) :

gnd-rac01$cd /u01/product/crs/bin

gnd-rac01$ crs_stat -t

Name Type Target State Host

┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

ora....01.lsnr application ONLINE ONLINE gnd-rac01

ora....c01.gsd application ONLINE ONLINE gnd-rac01

ora....c01.ons application ONLINE ONLINE gnd-rac01

ora....c01.vip application ONLINE ONLINE gnd-rac01

ora....02.lsnr application OFFLINE OFFLINE

ora....c02.gsd application ONLINE ONLINE gnd-rac02

ora....c02.ons application ONLINE ONLINE gnd-rac02

ora....c02.vip application ONLINE ONLINE gnd-rac02

ora.tpc.db application ONLINE ONLINE gnd-rac01

ora....c1.inst application ONLINE ONLINE gnd-rac01

ora....c2.inst application ONLINE ONLINE gnd-rac02

3. 检查VIP, GSD,ONS, Listener 等(所有节点)。

gnd-rac01$srvctl status nodeapps -n gnd-rac01

VIP is running on node: gnd-rac01

GSD is running on node: gnd-rac01

Listener is running on node: gnd-rac01

ONS daemon is running on node: gnd-rac01

gnd-rac01$srvctl status nodeapps -n gnd-rac02

VIP is running on node: gnd-rac02

GSD is running on node: gnd-rac02

Listener is not running on node: gnd-rac02

ONS daemon is running on node: gnd-rac02

4.检查Oracle Cluster 状态: CSS, CRS, EVM .

gnd-rac01$crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

gnd-rac02$crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

5.Ocfs 方面的问题可以到/etc/init.d/o2cb 这里看看。一般不用管理。

Oracle10g RAC 关闭及启动

情况1:保养数据库及操作系统,服务器,需要关闭DB(所有实例),OS及Server 。

a. 首先停止Oracle10g 环境

$ lsnrctl stop (每个节点上停止监听,也可以用srvctl来操作)

$ emctl stop dbconsole (每个节点停止dbconsole)

$ srvctl stop database -d tpc (停止数据库所有实例)

$ srvctl stop nodeapps -n gnd-rac01 (停节点1服务)

$ srvctl stop nodeapps -n gnd-rac02 (停节点2服务)

# /etc/init.d/init.crs stop (root 停cluster 软件)

或者用 $ crs_stop -all

b. 然后# init 0 关闭服务器,或者如果重新启动#init 6

c. 关闭电源 。

d. 开启Server ,开始开启Oracle10g数据库及服务等(如果OS重新启动,那么下面的所有服务是自动打开的【除了dbconsole】,不用手工执行了)。

$ srvctl start nodeapps -n gnd-rac01 (停节点1服务)

$ srvctl start nodeapps -n gnd-rac02 (停节点2服务)

# /etc/init.d/init.crs start (root 停cluster 软件)

或者用 $ crs_start -all

$ srvctl start database -d tpc (停止数据库所有实例)

$ lsnrctl start (每个节点上停止监听,也可以用srvctl来操作)

$ emctl start dbconsole (每个节点停止dbconsole)

注: srvctl 也可以用来关闭某个实例:srvctl stop instance -d orcl -i orcl2

srvctl 开启关闭监听器: srvctl stop listener -n orcl2

srvctl start listener -n orcl2

情况2:调整数据库参数的时候,只关闭所有节点实例,不重新启动OS及Server 。

a.首先停止Oracle10g 环境

$ lsnrctl stop (在所有节点上停止监听,也可以用srvctl)

$ srvctl stop database -d tpc (停止数据库所有实例)

b. 然后开启所有实例及监听器。

$ srvctl start database -d tpc (开启数据库所有实例)

$ lsnrctl start (开启所有节点上监听,也可以用srvctl 开启监听)

情况3:不关闭操作系统的情况下,由于问题点或调整某些服务而需要关闭然后开启某些服务程序等。

關閉某些服务的时候,由于涉及到RAC运行,所以也需要先关闭数据库实例,类似于第一种情况。

附Oracle10g RAC检查命令 :

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

Oracle10g RAC数据库的 nodeapps 有 VIP, GSD, Listener, ONS .

$ srvctl status nodeapps –n dbrac1 (檢查VIP, GSD,ONS, Listener 等(所有節點))

VIP is running on node: dbrac1

GSD is not running on node: dbrac1

Listener is not running on node: dbrac1

ONS daemon is not running on node: dbrac1

gnd-rac01$crsctl check crs (檢查Oracle Cluster 狀態: CSS, CRS, EVM .)

CSS appears healthy

CRS appears healthy

EVM appears healthy

gnd-rac01$ crs_stat -t (全面檢查狀態 )

Name Type Target State Host

┅┅┅┅┅┅┅┅┅?br /> ora....01.lsnr application ONLINE ONLINE gnd-rac01

ora....c01.gsd application ONLINE ONLINE gnd-rac01

ora....c01.ons application ONLINE ONLINE gnd-rac01

ora....c01.vip application ONLINE ONLINE gnd-rac01

ora....02.lsnr application OFFLINE OFFLINE

ora....c02.gsd application ONLINE ONLINE gnd-rac02

ora....c02.ons application ONLINE ONLINE gnd-rac02

ora....c02.vip application ONLINE ONLINE gnd-rac02

ora.tpc.db application ONLINE ONLINE gnd-rac01

ora....c1.inst application ONLINE ONLINE gnd-rac01

ora....c2.inst application ONLINE ONLINE gnd-rac02

 

http://blog.sina.com.cn/s/blog_43b6788101008q3g.html

阅读(2466) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:Oracle10g RAC 环境日常管理

给主人留下些什么吧!~~