概述:寫下本文檔的初衷和動力,來源於上篇的《oracle基本操作手冊》。oracle基本操作手冊是作者研一假期對oracle基礎知識學習的匯總。然后形成體系的總結,一則進行回顧復習,另則便於查詢使用。本圖文文檔亦源於此。閱讀Oracle RAC安裝與使用教程前,筆者先對這篇文章整體構思和形成進行梳理。由於閱讀者知識儲備層次不同,我將從Oracle RAC安裝前的准備與規划開始進行整體介紹安裝部署Oracle RAC。始於唐博士指導,對數據庫集群進行配置安裝,前后經歷2,3個月的摸索。中間遇到不少問題。此文檔也將一一記錄整理。(本文原創/整理,轉載請標注原文出處: Oracle 11G RAC數據庫安裝(九))
2015年7月23日10:58:04
主節點測試各個節點rac運行是否正常。顯示rac節點詳細信息
$ srvctl config database -d rac Database unique name: rac Database name: rac Oracle home: /u01/app/oracle/product/11.2.0/db_1 Oracle user: oracle Spfile: /u01/oradata/rac/spfilerac.ora Domain: localdomain Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: rac Database instances: rac1,rac2 Disk Groups: Services: Database is administrator managed $ $ srvctl status database -d rac Instance rac1 is running on node rac1 Instance rac2 is running on node rac2 $
V$ACTIVE_INSTANCES視圖還可以顯示當前狀態的實例。
$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Sat Sep 26 19:04:19 2009 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> SELECT inst_name FROM v$active_instances; INST_NAME -------------------------------------------------------------------------------- rac1.localdomain:rac1 rac2.localdomain:rac2 SQL>
檢查創建的數據庫
srvctl工具可以顯示當前的RAC數據庫配置和狀態。
顯示AKA群集數據庫的配置信息:
oracle@RAC1> srvctl config database -d AKA
所有實例和服務的狀態:
oracle@RAC1> srvctl status database -d AKA
某個特定節點上應用程序狀態:
oracle@RAC1> srvctl status nodeapps -n gentic
顯示節點應用程序配置信息(VIP,GSD,ONS,監聽器)
oracle@RAC1> srvctl config nodeapps -n gentic -a -g -s -l VIP exists.: /gentic-vip/192.168.138.130/255.255.255.0/eth0 GSD exists. ONS daemon exists. Listener exists.
群集中運行的所有實例:
sqlplus system/manager@AKA1
SELECT inst_id,
instance_number,
instance_name,
parallel,
status,
database_status,
active_state,
host_name host
FROM gv$instance
ORDER BY inst_id;
視圖V$ACTIVE_INSTANCES也可以顯示當前實例的狀態:
SELECT * FROM v$active_instances;
最后,GV$允許你顯示整個RAC的全局信息:
SELECT inst_id, username, sid, serial#
FROM gv$session
WHERE username IS NOT NULL;
啟動企業管理器控制台
企業管理控制台是整個群集共享的,在我們的例子中它在https://rac1:1158/em上監聽。

全部參考文獻
- Maclean教你一步一步使用Vbox在Linux 5上安裝Oracle 11gR2 RAC: http://www.oracledatabase12g.com/archives/step-by-step-install-11gr2-rac-on-linux5-by-vbox.html
- tnsnames.ora 監聽配置文件詳解(博客園): http://www.cnblogs.com/freewater/archive/2011/05/23/2054859.html
- Oracle Database 11g RAC手冊(第2版):http://book.51cto.com/art/201207/345816.htm
- 構建高可用Oracle數據庫系統:Oracle 11gR2 RAC管理與性能優化:http://book.51cto.com/art/201208/353749.htm
- Oracle RAC安裝配置-NFS(一):http://www.xingxingge.com/RAC/82.html
- linux下iscsi共享磁盤的實驗:http://blog.chinaunix.net/uid-198791-id-3502369.html
- oracle官網:http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel4-092650.html
- 在RHEL6.0搭建Oracle 11gR2 RAC生產環境:http://www.tianqingbo.com/rhel-setup-oracle-11gr2-rac.html
- 大話ORACLE RAC
- 配置oracle 11g r2 RAC on rhel5.5:http://candon123.blog.51cto.com/704299/336002
相關文章
【MySql集群搭建】 真機環境下MySQL-Cluster搭建文檔
【Hadoop集群搭建】Hadoop集群的配置(一)
【Hadoop集群搭建】Hadoop集群的配置(二)