<b>虚拟RHEL5上安装11g RAC-安装配置</b>[Oracle防范]
本文“<b>虚拟RHEL5上安装11g RAC-安装配置</b>[Oracle防范]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
本文描写了若何利用VMware ESX Server和NFS作为同享存储 style="COLOR: #000000" href="http://storage.it168.com/" target=_blank>存储在Red Hat Enterprise Linux 5上安装Oracle 11g R1 RAC.
介绍
ESX Server是VMware公司供应的企业级管理程序(hypervisor),它安装在裸机上,比起桌面虚拟工具而言,它的效率高多了,本文利用ESX Server为安装Oracle真正利用集群(RAC)供应底子架构.
本文假定你已经安装了VMware ESX Server和一个VMware底子架构客户端(VMware Infrastructure Client),它们的安装阐明请参考:
http://www.oracle-base.com/articles/misc/VMwareESXServer3Installation.php
下载软件
需求的软件:Red Hat Enterprise Linux (RHEL) 5和Oracle 11g Release 1 (11.1) Clusterware and DB software.请去www.redhat.com和www.oracle.com下载.
虚拟机设置
在左边窗格ESX服务器 style="COLOR: #000000" href="http://server.it168.com/" target=_blank>服务器上点击右键,然后挑选"新的虚拟机... "菜单选项.
挑选自定义选项,并点击"下一步"按钮.
输入你但愿呈目前客户端右侧窗格中的虚拟机的名称( RAC1 ),然后点击"下一步"按钮.
挑选默许的数据存储,然后点击"下一步"按钮.
挑选" Linux系统"和"红帽企业Linux 5 "选项,然后点击"下一步"按钮.
为虚拟机挑选所需处理器的数目,然后点击"下一步"按钮.
这里证明我们完成安装最低需求1G的内存.输入虚拟机所需的内存数目,然后点击"下一步"按钮.
我们至少需求两个网卡.一个为公网IP和虚拟IP地址,为私有IP地址单独供应一个.挑选需求的数目和网卡范例,然后点击"下一步"按钮.
承受默许的存储适配器,点击"下一步"按钮
承受"成立一个新的虚拟磁盘"选项,点击"下一步"按钮.
我们利用的是NFS同享存储ORACLE HOME和数据库文件,因此在每个虚拟机上我们并不需求多少磁盘空间.假定您利用的是1G的内存,您将肯定的2G的交换空间,使10G的磁盘空间充足了.假如您利用了更多的内存,您将需求增添呼应的磁盘空间.输入得当的磁盘容量,然后点击"下一步"按钮.
本地磁盘不需求同享,所以点击"下一步"按钮,忽视高级选项.
假如你对择要信息感到称心,请单击"完成"按钮.
目前在左侧窗格中便可以看到虚拟机了.
反复此历程来成立第二个节点(RAC2).
要启动虚拟机,在工具栏上点击播放按钮.
虚拟机将开始从已安装媒体或网络启动.
请将RHEL 第5版Linux的DVD放到客户端PC的DVD驱动器,在工具栏上点击播放按钮,启动虚拟机,右窗格中显示VMware ESX服务器的客户机启动加载器,然后显示RHEL Linux 5安装屏幕.
下面的安装就和正常的操作系统安装一样了,但至少要有2G SWAP空间,要禁用防火墙和SELinux,并安装下列软件包:
GNOME Desktop Environment
Editors
Graphical Internet
Text-based Internet
Development Libraries
Development Tools
Server Configuration Tools
Administration Tools
Base
System Tools
X Window System
要保持和本文剩余的部份一致,在安装历程中必须象下面这样举行设置:
RAC1:
主机名:rac1.localdomain
eth0的IP地址:10.1.10.201(大众地址)
eth0默许网关:10.1.10.1(大众地址)
eth1的IP地址:10.1.9.201(私有地址)
eth1默许网关:无
RAC2:
主机名:rac2.localdomain
eth0的IP地址:10.1.10.202(大众地址)
eth0默许网关:10.1.10.2(大众地址)
eth1的IP地址:10.1.9.202(私有地址)
eth1默许网关:无
你可以安闲更改IP地址,以适应您的网络,但请记着保持这些调整符合文章的其他内容.
一旦基本安装完成后,您必须安装一些额外的软件包,同时登录为根用户.假如您有互联网衔接,您可以利用以下号令举行下载和安装.
yum install binutils elfutils-libelf glibc glibc-common libaio \
libgcc libstdc++ make compat-libstdc++-33 elfutils-libelf-devel \
glibc-headers glibc-devel libgomp gcc gcc-c++ libaio-devel \
libstdc++-devel unixODBC unixODBC-devel sysstat
大概从RHEL 5的DVD安装它们.
# From Enterprise Linux 5.2 DVD
cd /media/dvd/Server
rpm -Uvh binutils-2.*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh libaio-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh make-3.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh glibc-headers*
rpm -Uvh glibc-devel-2.*
rpm -Uvh libgomp*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh sysstat-7.*
cd /
eject
请记着,安装完客户端操作系统后要安装VMware工具.
Oracle安装先决条件
请作为root用户登录到RAC1虚拟机履行下列步骤.
在/etc/hosts文件必须包含以下信息:
127.0.0.1 localhost.localdomain localhost
# Public
10.1.10.201 rac1.localdomain rac1
10.1.10.202 rac2.localdomain rac2
#Private
10.1.9.201 rac1-priv.localdomain rac1-priv
10.1.9.202 rac2-priv.localdomain rac2-priv
#Virtual
10.1.10.203 rac1-vip.localdomain rac1-vip
10.1.10.204 rac2-vip.localdomain rac2-vip
#NAS
10.1.10.61 nas1.localdomain nas1
将下列语句增添到/etc/sysctl.conf文件:
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=262144
# Additional and amended parameters suggested by Kevin Closson
#net.core.rmem_default = 524288
#net.core.wmem_default = 524288
#net.core.rmem_max = 16777216
#net.core.wmem_max = 16777216
net.ipv4.ipfrag_high_thresh=524288
net.ipv4.ipfrag_low_thresh=393216
net.ipv4.tcp_rmem=4096 524288 16777216
net.ipv4.tcp_wmem=4096 524288 16777216
net.ipv4.tcp_timestamps=0
net.ipv4.tcp_sack=0
net.ipv4.tcp_window_scaling=1
net.core.optmem_max=524287
net.core.netdev_max_backlog=2500
sunrpc.tcp_slot_table_entries=128
sunrpc.udp_slot_table_entries=128
net.ipv4.tcp_mem=16384 16384 16384
运行以下号令以改变当前的内核参数:
/sbin/sysctl –p
将下列语句增添到/etc/security/limits.conf文件:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
请将以下几行增添到/etc/pam.d /login文件,假如它们不存在的话:
session required /lib/security/pam_limits.so
session required pam_limits.so
通过编辑/etc/SELinux/config文件禁用安全 style="COLOR: #000000" href="http://safe.it168.com/" target=_blank>安全Linux,确保了SELinux标志设置以下:
SELINUX=disabled
别的,这一窜改可以利用GUI工具(系统?管理?安全级和防火墙)做到 .按一下SELinux标签,点击停勤奋效.
成立新的组和用户:
groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin
useradd -u 500 -g oinstall -G dba,oper,asmadmin oracle
passwd oracle
配置聚集每个节点上的SSH.在每个节点上以Oracle用户登陆履行下列任务:
su - oracle
mkdir ~/.ssh
chmod 700 ~/.ssh
/usr/bin/ssh-keygen -t rsa # Accept the default settings.
exit
RSA公钥被写入~/.ssh/id_rsa.pub文件,私钥写入~/.ssh/id_rsa文件.
在RAC1节点上以Oracle用户登陆,生成一个authorized_keys文件,然后复制到RAC2上:
su - oracle
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
scp authorized_keys rac2:/home/oracle/.ssh/
exit
接下来,在RAC2上以Oracle用户登陆,履行下面的号令:
su - oracle
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
scp authorized_keys rac1:/home/oracle/.ssh/
exit
目前在两台服务器上的authorized_keys文件都包含了全部节点的公钥.
为了使每个聚集成员节点上的SSH用户都对等,在每个节点上履行下面的号令:
su - oracle
ssh rac1 date
ssh rac2 date
ssh rac1.localdomain date
ssh rac2.localdomain date
exec /usr/bin/ssh-agent $SHELL
/usr/bin/ssh-add
目前在这两台服务器之间应当可以不要密码利用SSH和SCP了.
以Oracle用户登陆,然后将下面的语句增添到.bash_profile末尾:
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=rac1.localdomain; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1; export ORACLE_HOME
ORACLE_SID=RAC1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
请记着,在第二个节点上为ORACLE_SID和ORACLE_HOSTNAME设置精确的值.
这里安装利用NFS为RAC供应同享存储,改正下面的语句以适应你的NAS或NFS服务器.
假如你利用了第三个Linux服务器供应NFS服务,你应当以下面语句这样成立一些同享目录:
mkdir /shared_config
mkdir /shared_crs
mkdir /shared_home
mkdir /shared_data
将下列语句增添到/etc/exports文件:
/shared_config *(rw,sync,no_wdelay,insecure_locks,no_root_squash)
/shared_crs *(rw,sync,no_wdelay,insecure_locks,no_root_squash)
/shared_home *(rw,sync,no_wdelay,insecure_locks,no_root_squash)
/shared_data *(rw,sync,no_wdelay,insecure_locks,no_root_squash)
运行以下号令导出NFS同享:
chkconfig nfs on
service nfs restart
假如你利用的是NAS或其他一些支持NFS的存储设备,也请成立4个同享.
在RAC1和RAC2上成立用于安装Oracle软件的目录:
mkdir -p /u01/app/crs/product/11.1.0/crs
mkdir -p /u01/app/oracle/product/11.1.0/db_1
mkdir -p /u01/oradata
mkdir -p /u01/shared_config
chown -R oracle:oinstall /u01/app /u01/app/oracle /u01/oradata /u01/shared_config
chmod -R 775 /u01/app /u01/app/oracle /u01/oradata /u01/shared_config
将下面的语句增添到每个服务器的/etc/fstab文件中,挂载选项是基于Oracle metalink注记:359515.1的倡议:
nas1:/shared_config /u01/shared_config nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,noac,vers=3,timeo=600 0 0
nas1:/shared_crs /u01/app/crs/product/11.1.0/crs nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0 0 0
nas1:/shared_home /u01/app/oracle/product/11.1.0/db_1 nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0 0 0
nas1:/shared_data /u01/oradata nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 0 0
以root用户登陆两台服务器运行下列号令挂载NFS同享:
mount /u01/shared_config
mount /u01/app/crs/product/11.1.0/crs
mount /u01/app/oracle/product/11.1.0/db_1
mount /u01/oradata
成立同享CRS配置和表决磁盘文件:
touch /u01/shared_config/ocr_configuration
touch /u01/shared_config/voting_disk
在每台服务器上以root登陆履行下列号令确保同享目录的权限设置精确:
chown -R oracle:oinstall /u01/shared_config
chown -R oracle:oinstall /u01/app/crs/product/11.1.0/crs
chown -R oracle:oinstall /u01/app/oracle/product/11.1.0/db_1
chown -R oracle:oinstall /u01/oradata
开始安装clusterware之前,先在clusterware根目录利用runcluvfy.sh查抄先决条件能否已经满意:
/mountpoint/clusterware/runcluvfy.sh stage -pre crsinst -n rac1,rac2 –verbose
假如你收到任何失利消息,请先改正后再持续安装.
安装clusterware软件
解压clusterware和数据库软件:
unzip linux_11gR1_clusterware.zip
unzip linux_11gR1_database.zip
以Oracle用户登陆到RAC1,然后履行安装程序:
cd clusterware
./runInstaller
在"欢送"屏幕,点击"下一步"按钮.
承受默许的inventory目录,点击"下一步"按钮.
输入"/u01/app/crs/product/11.1.0/crs "的ORACLE HOME,并点击"下一步"按钮.
等候先决条件查抄,碰到任何失利都应当改正并重新测试,确保全部先决条件查抄都通过,然后点击"下一步"按钮.
"指定聚集配置"屏幕显示只有RAC1节点.点击"增添"按钮持续.
输入RAC2节点的具体资料,并点击"肯定"按钮
按"下一步"按钮持续.
在"指定网络接口用法"屏幕定义每个网络接口的用处.选中"eth0"接口,点击"改正"按钮.
设置"eht0"接口范例"public",并点击"肯定"按钮.
保存"eth1"接口为私有,点击"下一步"按钮.
点击"外部冗余"选项,输入"/u01/shared_config/ocr_configuration"作为OCR位置,点击"下一步"按钮.为了有更大的冗余,我们需求肯定另一个同享磁盘的备用位置.
点击"外部冗余"选项,输入"/u01/shared_config/voting_disk"的表决磁盘位置,并点击"下一步"按钮,为了有更大的冗余,我们需求肯定另一个同享磁盘的替换的位置.
在"择要"屏幕上,单击"安装"按钮,持续.
等候安装
一旦安装完成,在两个节点上运行下列屏幕显示的orainstRoot.sh root.sh脚本.
履行orainstRoot.sh文件的输出看起来应当像下面这样.
# cd /u01/app/oraInventory
# ./orainstRoot.sh
Changing permissions of /u01/app/oraInventory to 770.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete
#
履行root.sh的输出将取决于它运行的节点.下列文字是来自RAC1节点的输出.
# cd /u01/app/crs/product/11.1.0/crs
# ./root.sh
WARNING: directory '/u01/app/crs/product/11.1.0' is not owned by root
WARNING: directory '/u01/app/crs/product' is not owned by root
WARNING: directory '/u01/app/crs' is not owned by root
WARNING: directory '/u01/app' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.
Setting the permissions on OCR backup directory
Setting up Network socket directories
Oracle Cluster Registry configuration upgraded successfully
The directory '/u01/app/crs/product/11.1.0' is not owned by root. Changing owner to root
The directory '/u01/app/crs/product' is not owned by root. Changing owner to root
The directory '/u01/app/crs' is not owned by root. Changing owner to root
The directory '/u01/app' is not owned by root. Changing owner to root
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /u01/shared_config/voting_disk
Format of 1 voting devices complete.
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
Cluster Synchronization Services is active on these nodes.
rac1
Cluster Synchronization Services is inactive on these nodes.
rac2
Local node checking complete. Run root.sh on remaining nodes to start CRS daemons.
#
下面的输出来自RAC2节点.
# /u01/app/crs/product/11.1.0/crs
# ./root.sh
WARNING: directory '/u01/app/crs/product/11.1.0' is not owned by root
WARNING: directory '/u01/app/crs/product' is not owned by root
WARNING: directory '/u01/app/crs' is not owned by root
WARNING: directory '/u01/app' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.
Setting the permissions on OCR backup directory
Setting up Network socket directories
Oracle Cluster Registry configuration upgraded successfully
The directory '/u01/app/crs/product/11.1.0' is not owned by root. Changing owner to root
The directory '/u01/app/crs/product' is not owned by root. Changing owner to root
The directory '/u01/app/crs' is not owned by root. Changing owner to root
The directory '/u01/app' is not owned by root. Changing owner to root
clscfg: EXISTING configuration version 4 detected.
clscfg: version 4 is 11 Release 1.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
clscfg: Arguments check out successfully.
NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
Cluster Synchronization Services is active on these nodes.
rac1
rac2
Cluster Synchronization Services is active on all the nodes.
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
Creating VIP application resource on (2) nodes...
Creating GSD application resource on (2) nodes...
Creating ONS application resource on (2) nodes...
Starting VIP application resource on (2) nodes...
Starting GSD application resource on (2) nodes...
Starting ONS application resource on (2) nodes...
Done.
#
在这里您可以看到,有些配置的步骤被省略了,因为他们在第一个节点做,此外,最后一部份脚本以安静情势运行虚拟IP配置助理(VIPCA).
您目前应当回到RAC1 的"履行配置脚本"屏幕上,并点击"肯定"按钮.
等候配置助手完成.
当安装完成后,点击"退出"按钮脱离安装程序.
该集群安装现已完成.
安装完成后,在同享的$ ORACLE_HOME 目录下"$ORACLE_HOME/network/admin/listener.ora"文件中将包含下列项目:
# listener.ora Network Configuration File: /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER_RAC2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.10.202)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)
LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.10.201)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)
同享的$ORACLE_HOME/network/admin/tnsnames.ora文件将包含下列内容:
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.WORLD)
)
)
LISTENERS_RAC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
)
RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.WORLD)
(INSTANCE_NAME = RAC2)
)
)
RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC.WORLD)
(INSTANCE_NAME = RAC1)
)
)
这种配置可直接衔接到具体的实例,或利用负载均衡衔接到主服务.
$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Tue Aug 19 16:54:45 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> CONN sys/password@rac1 AS SYSDBA
Connected.
SQL> SELECT instance_name, host_name FROM v$instance;
INSTANCE_NAME HOST_NAME
---------------- ----------------------------------------------------
RAC1 rac1.lynx.co.uk
SQL> CONN sys/password@rac2 AS SYSDBA
Connected.
SQL> SELECT instance_name, host_name FROM v$instance;
INSTANCE_NAME HOST_NAME
---------------- -----------------------------------------------------
RAC2 rac2.lynx.co.uk
SQL> CONN sys/password@rac AS SYSDBA
Connected.
SQL> SELECT instance_name, host_name FROM v$instance;
INSTANCE_NAME HOST_NAME
---------------- --------------------------------------------
RAC1 rac1.lynx.co.uk
SQL>
查抄RAC的状况
有几种办法来查抄RAC的现况.srvctl实用程序显示当前的配置和RAC数据库的状况.
$ srvctl config database -d RAC
rac1 RAC1 /u01/app/oracle/product/11.1.0/db_1
rac2 RAC2 /u01/app/oracle/product/11.1.0/db_1
$
$ 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.1.0.6.0 - Production on Tue Aug 19 16:55:31 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> SELECT * FROM v$active_instances;
INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
1 rac1.lynx.co.uk:RAC1
2 rac2.lynx.co.uk:RAC2
SQL>
最后,GV$视图让您可以显示整个RAC的信息.
SQL> SELECT inst_id, username, sid, serial# FROM gv$session WHERE username IS NOT NULL;
INST_ID USERNAME SID SERIAL#
---------- ------------------------------ ---------- ----------
2 SYS 116 841
2 SYSMAN 118 78
2 SYS 119 1992
2 SYSMAN 121 1
2 SYSMAN 122 29
2 SYS 123 2
2 SYSMAN 124 50
2 DBSNMP 129 1
2 DBSNMP 130 6
2 DBSNMP 134 1
2 SYSMAN 145 53
INST_ID USERNAME SID SERIAL#
---------- ------------------------------ ---------- ----------
2 SYS 170 14
1 SYSMAN 117 144
1 SYSMAN 118 186
1 SYSMAN 119 31
1 SYS 121 3
1 SYSMAN 122 162
1 SYSMAN 123 99
1 DBSNMP 124 3
1 SYS 125 2
1 SYS 126 19
1 SYS 127 291
INST_ID USERNAME SID SERIAL#
---------- ------------------------------ ---------- ----------
1 DBSNMP 131 61
1 SYS 170 17
24 rows selected.
SQL>
假如您已配置了企业管理器,它可以用来查看配置和数据库的近况,利用近似 "https://rac1.localdomain:1158/em"的网址 .
为了改进NFS的性能,oracle公司倡议利用随oracle 11g公布的直接NFS客户.直接NFS客户在下列地址探求NFS信息:
(1)$ORACLE_HOME/dbs/oranfstab
(2)/etc/oranfstab
(3)/etc/mtab
既然在"/etc/fstab"我们已经有了我们的挂载NFS点,因此"/etc/mtab"文件不需求配置任何额外信息.
为了使客户端工作,我们需求切换libodm11.so库到libnfsodm11.so库,以下所示:
srvctl stop database -d RAC
cd $ORACLE_HOME/lib
mv libodm11.so libodm11.so_stub
ln -s libnfsodm11.so libodm11.so
srvctl start database -d RAC
配置完成后,你便可以通过以下视图看到直接NFS客户端:
v$dnfs_servers
v$dnfs_files
v$dnfs_channels
v$dnfs_stats
比方:
SQL> SELECT svrname, dirname FROM v$dnfs_servers;
SVRNAME DIRNAME
------------- -----------------
nas1 /shared_data
SQL>
默许情形下,直接NFS客户端支持直接I/O和异步I/O.
以上是“<b>虚拟RHEL5上安装11g RAC-安装配置</b>[Oracle防范]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |