设为首页 加入收藏

TOP

【Oracle】RAC下的一些常用命令(一)(三)
2015-07-24 11:27:36 来源: 作者: 【 】 浏览:16
Tags:Oracle RAC 一些 常用 命令
yname SYSTEM.css -xml|more

08/20/2014 23:01:32

/u01/crs1020/bin/ocrdump.bin -stdout -keyname SYSTEM.css -xml

>?

SYSTEM.css

UNDEF

PROCR_ALL_ACCESS

PROCR_READ

PROCR_READ

root

root

SYSTEM.css.interfaces

UNDEF

PROCR_ALL_ACCESS

PROCR_CREATE_SUB_KEY

PROCR_READ

...........

如果此命令执行有问题,会在$CRS_HOME/log/rac1/client目录下产生文件,文件名ocrdump_.log。如果命令执行出现问题,可以从这个日志查看问题原因。

2.ocrcheck

如果OCR内容一致,产生如下输出:

[oracle@rac1 ~]$ ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 2

Total space (kbytes) : 104344

Used space (kbytes) : 3808

Available space (kbytes) : 100536

ID : 503754514

Device/File Name : /dev/raw/raw1

Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded

如果OCR内容不一致,输出中会出现以下提示:

Device/File needs to be synvhronixed with the other device

执行这个命令过程中,会在$CRS_HOME/log//client目录下产生ocrcheck_.log日志文件。

Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2005 Oracle. All rights reserved.

2014-08-20 19:34:20.922: [OCRCHECK][3066518304]ocrcheck starts...

2014-08-20 19:34:21.654: [OCRCHECK][3066518304]protchcheck: OCR status : total = [104344], used = [1980], avail = [102364]

2014-08-20 19:34:21.654: [OCRCHECK][3066518304]Exiting [status=success]...

3.ocrconfig

[oracle@rac1 client]$ ocrconfig -help

Name:

ocrconfig - Configuration tool for Oracle Cluster Registry.

Synopsis:

ocrconfig [option]

option:

-export [-s online]

- Export cluster register contents to a file

-import - Import cluster registry contents from a file

-upgrade [ []]

- Upgrade cluster registry from previous version

-downgrade [-version ]

- Downgrade cluster registry to the specified version

-backuploc - Configure periodic backup location

-showbackup - Show backup information

-restore - Restore from physical backup

-replace ocr|ocrmirror [] - Add/replace/remove a OCR device/file

-overwrite - Overwrite OCR configuration on disk

-repair ocr|ocrmirror - Repair local OCR configuration

-help - Print out this help information

Note:

A log file will be created in

$ORACLE_HOME/log//client/ocrconfig_.log. Please ensure

you have file creation privileges in the above directory before

running this tool.

查看ocr的自动备份(ocr的备份由master节点完成,默认四小时一次,如果在某个节点上看到的备份为几个月前的,则该节点不是当前的master节点):

[oracle@rac1 client]$ ocrconfig -showbackup

使用导出导入进行OCR的备份和恢复:

在对集群做调整前,如:增删节点等操作前,应该对OCR进行一次备份,可以使用export备份到指定文件。如果做了replace或restore等操作,Oracle建议使用”cluvfy comp ocr -n all”命令做一次全面检查。

(1)关闭所有节点的CRS

节点1:

[root@rac1 crsd]# crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

节点2:

[root@rac2 ~]# crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

(2)导出OCR的内容。

[root@rac1 crsd]# cd

[root@rac1 ~]# ocrconfig -export ocrexp.exp

(3)启动CRS

节点一:

[root@rac1 ~]# crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

节点二:

[root@rac2 ~]# crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

[root@rac2 ~]# crs_stat -t

Name Type Target State Host

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

ora....B1.inst application ONLINE ONLINE rac1

ora....B2.inst application ONLINE ONLINE rac2

首页 上一页 1 2 3 4 5 下一页 尾页 3/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇关于oracle11g导出数据时报ORA145.. 下一篇oracle常用命令总结一

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·如何在 C 语言中管理 (2025-12-25 03:20:14)
·C语言和内存管理有什 (2025-12-25 03:20:11)
·为什么C语言从不被淘 (2025-12-25 03:20:08)
·常用meta整理 | 菜鸟 (2025-12-25 01:21:52)
·SQL HAVING 子句:深 (2025-12-25 01:21:47)