Oracle数据库高可用之Oracle Restart详细安装图文教程
Oracle 作者: startay 时间:2016-06-23 16:27:06 494 0
Oracle Restart是oracle从11g r2开始提供的高可用性单实例数据库,当我们安装完Oracle Restart之后,随着硬件或软件故障或者你的数据库服务器重启,Oracle各种组件也将会自动重启。组件里都包括Database instance、Oracle Net listener、Database services、ASM instance、Oracle ASM disk groups、Oracle Notification Services (ONS)等。
Oracle Restart会周期检查这些组件的健康状态,如果检测到失败的组件,那oracle Restart就将这个组件关闭再重启。Oracle Restart也是借助于Grid Infrastructure(GI)的核心组件Clusterware来提供高可用特性,另外通过standalon server环境又可以使用ASM特性。
那更详细得说一下startup,Oracle Restart确保Oracle组件顺序启动,比如,如果使用了ASM特性,数据文件存放在ASM磁盘组上,那么在数据库实例启动之前,Oracle Restart将确保ASM实例先启动,然后关联的磁盘组都挂载上。同样地,关闭的时候是关联的组件先都shutdown。
Oracle的监听也是被自动管理对象,当数据库实例启动之后,Oracle Restart也将监听启动,这不需要人工干预。
既然Oracle Restart是借助于GI的,那么想当然地也提供经典的命令SRVCTL(控制服务的工具),我们可以利用SRVCTL对Oracle的组件进行手动操作,比如关闭、启动、查看状态等等。当Oracle Restart已经投入到生产使用之后,Oracle建议使用SRVCTL手动管理各种组件。另外,在我们使用SRVCTL手动关闭组件之后,Oracle Restart不再自动特性了,比如你手动关闭了监听器,那么它也不会自动启动。等我们再使用SRVCTL启动了组件,它又恢复自动特性。
Oracle Restart也整合了SQL*Plus、LSNRCTL、ASMCMD等工具,比如你通过SQL*Plus关闭实例,Oracle Restart认为这是合法的,不会尝试重启实例。类似的,ASM实例通过SQL*Plus或者ASMCMD关闭之后,也不会尝试重新启动。
上面一直说了对Oracle组件的管理,那么下面就看Oracle Restart的启动和关闭。使用过RAC的人都知道管理集群件非常好用的工具 — CRSCTL。Oracle Restart也可以使用CRSCTL来激活或者禁用Oracle高可用性,而上面谈的Oracle组件的管理都是基于这个高可用特性的。如果ORACLE高可用服务被禁用,那么任何一个组件都不会被Oracle Restart管理,也就是节点重启后不会被自动起来。
另外,在我们需要Apply Patch或者进行OS维护,也需要使用crsctl关闭Oracle Restart。
至于Oracle Restart上SRVCTL和CRSCTL使用命令,在Oracle 11g联机文档中有详细介绍,请参考:Administrator's Guide Chaper 4 : Configuring Automatic Restart of an Oracle Database
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
环境介绍:
OS : Oracle Enterprise Linux 5.5 64bit
DB : GI and Database 11.2.0.3
安装步骤:
- 资源准备
- 安装操作系统
- 各项配置
- 各项检查
- 安装GI和数据库
资源准备
Oracle_Enterprise-R5-U5-Server-x86_64-dvd.iso
penfiler-2.3-x86_64-disc1.iso
p10404530_112030_Linux-x86-64_1of7.zip
p10404530_112030_Linux-x86-64_2of7.zip
– database
p10404530_112030_Linux-x86-64_3of7.zip
– Grid Infrastructure
oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm
oracleasmlib-2.0.4-1.el5.x86_64.rpm
oracleasm-support-2.1.7-1.el5.x86_64.rpm
rlwrap-0.37-1.el5.x86_64.rpm
Xmanager 4
FileZilla or WinSCP
资源下载地址
OEL、GI、DATABASE:
http://www.oracle.com https://support.oracle.com/
Openfiler
http://www.openfiler.com/community/download/
ASMLib相关软件包:
http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html
Rlwrap软件:
http://www.rpmfind.net/linux/rpm2html/search.php?query=rlwrap
Xmanager 4
http://www.netsarang.com/products/xme_overview.html
FileZilla
http://filezilla-project.org/
安装操作系统
OEL安装
虚拟机:
空间 – 40G以上
内存 – 2G以上,我分配了3G。
分区:
/boot – 200M
Swap – 3072M
/ – Free
安装包:
base
安全设置:
SELinux disable
iptables stop
Openfiler安装
安装操作略。
各项配置
- 网络配置
- 快速配置YUM源,并安装所需软件包
- 参数修改
- 添加组和用户
- 创建目录、授权
- 环境变量
- Openfiler划分存储空间
- Iscsi挂载磁盘并fdisk分区
- 创建ASM磁盘
- 上传软件并解压
1)网络配置
Openfiler:
NET模式
IP: 192.168.60.240 GATEWAY: 192.168.60.1
HOST ONLY模式
IP: 10.0.60.240 GATEWAY: 不设置
OEL:
NET模式
IP: 192.168.60.100 GATEWAY: 192.168.60.1
HOST ONLY模式
IP: 10.0.60.100 GATEWAY: 不设置
2)快速配置YUM源,并安装所需软件包
# vi /etc/yum.repos.d/my.repo
[Oracle]
name=OEL-$releasever – Media
baseurl=file:///mnt/Server
gpgcheck=0
enabled=1
如果是RHEL或者CentOS,请先将/etc/yum.repos.d下面的文件删除或者移动到别的目录下,RHEL创建方法和OEL一样,CentOS则baseurl=file:///mnt/ 即可,因为CentOS的repodata目录就在光盘根下。
配置好YUM,然后进行所需软件包的安装
yum -y install compat-libstdc++-33 elfutils-libelf-devel gcc gcc-c++ glibc-devel glibc-headers libaio-devel libstdc++-devel sysstat unixODBC unixODBC-devel
3)参数修改
cat >> /etc/sysctl.conf << EOF
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
EOF
/sbin/sysctl -p
cat >> /etc/profile <<eof
if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF </eof<>
cat >> /etc/security/limits.conf <<eof
grid soft nofile 1024
grid hard nofile 65536
grid soft nproc 2047
grid hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
EOF
cat >> /etc/pam.d/login << EOF
session required /lib64/security/pam_limits.so
EOF </eof<>
4)添加组和用户
groupadd -g 1000 oinstall
groupadd -g 1300 dba
groupadd -g 1301 oper
groupadd -g 1201 asmdba
groupadd -g 1200 asmadmin
groupadd -g 1202 asmoper
useradd -m -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash -c "Grid Infrastructure Owner" grid
passwd grid
useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
passwd oracle
这里注意grid用户必须加入到dba组里。
5)创建目录、授权
mkdir -p /u01/app/grid
mkdir -p /u01/app/11.2.0/grid
chown -R grid:oinstall /u01
mkdir -p /u01/app/oracle
chown oracle:oinstall /u01/app/oracle
chmod -R 775 /u01
6)环境变量
$ whoami
grid
$ vi .bash_profile
alias ls="ll -at"
ORACLE_SID=+ASM; export ORACLE_SID
JAVA_HOME=/usr/local/java;export JAVA_HOME
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME
ORACLE_PATH=/u01/app/oracle/common/oracle/sql; export ORACLE_PATH
ORACLE_TERM=xterm;export ORACLE_TERM
NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS";export NLS_DATE_FORMAT
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
export NLS_LANG=american_america.ZHS16GBK
alias sqlplus="rlwrap sqlplus"
umask 022
$ whoami
oracle
$ vi .bash_profile
alias ls="ll -at"
ORACLE_SID=restart; export ORACLE_SID
ORACLE_UNQNAME=restart; export ORACLE_UNQNAME
JAVA_HOME=/usr/local/java; export JAVA_HOME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_PATH=/u01/app/common/oracle/sql; export ORACLE_PATH
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
umask 022
alias sqlplus="rlwrap sqlplus"
alias rman="rlwrap rman"
7)Openfiler划分存储空间
CRS1 2G
CRS2 2G
CRS3 2G
DATA 6G
ARCH 5G
8)Iscsi挂载磁盘并fdisk分区
# yum -y install iscsi-initiator-utils
service iscsid start
chkconfig iscsid on
iscsiadm -m discovery -t sendtargets -p 10.0.60.240:3260
service iscsi restart
Stopping iSCSI daemon:
iscsid dead but pid file exists
[ OK ] iSCSI daemon: [ OK ]
[ OK ]
Setting up iSCSI targets: Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.c7002bcb1d62, portal: 10.0.60.240,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.c7002bcb1d62, portal: 10.0.60.240,3260]: successful
[ OK ]
# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1009, default 1): 10
Last cylinder or +size or +sizeM or +sizeK (10-1009, default 1009):
Using default value 1009
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
类似的,其他的磁盘也格式化
# fdisk /dev/sd[b-f]
partprobe /dev/sd[b-f]
查看
# fdisk -l
9)创建ASM磁盘
# rpm –ivh oracleasm*
# /etc/init.d/oracleasm configure
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1
# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd1
# /etc/init.d/oracleasm createdisk VOL2 /dev/sde1
# /etc/init.d/oracleasm createdisk VOL3 /dev/sdf1
10)上传软件并解压
用FileZilla将软件上传到服务器上
# chown -R grid.oinstall /install/
su – grid
$ unzip p10404530_112030_Linux-x86-64_3of7.zip
chmod 775 /install
chown oracle.oinstall /install/p10404530_112030_Linux-x86-64_[1,2]of7.zip
su – oracle
$ unzip p10404530_112030_Linux-x86-64_1of7.zip
$ unzip p10404530_112030_Linux-x86-64_2of7.zip
安装GI和数据库
- 安装GI
- 安装database software
- 创建ASM磁盘组
- 创建database
- 检查
1)安装GI
本机打开Xmanager – Passive
# su – grid
$ cd /install/grid/
$ export DISPLAY=192.168.100.1:0.0 (这里填写本机IP)
$ ./runInstaller
参考图1~图11
[root@restart install]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@restart install]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin …
Creating /etc/oratab file…
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node restart successfully pinned.
Adding Clusterware entries to inittab
restart 2012/08/02 19:47:18 /u01/app/11.2.0/grid/cdata/restart/backup_20120802_194718.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
2)安装database software
# su – oracle
$ cd /install/database/
$ export DISPLAY=192.168.77.97:0.0
$ ./runInstaller
参考图12~图21
[root@restart ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
3)创建ASM磁盘组
# su – grid
$ asmca
参考图30~图34
4)安装database
# su – oracle
$ dbca
参考图40~图62
5)检查
# su – grid
$ crsctl check has
$ crsctl check css
$ crsctl check evm
$ crs_stat –t –v
$ ocrcheck
# su – oracle
$ sqlplus / as sysdba
SQL> select name from v$datafile
2 union all
3 select name from v$controlfile
4 union all
5 select member from v$logfile;
检查高可用性服务器的状态
[grid@restart ~]$ crsctl check has
CRS-4638: Oracle High Availability Services is online
[grid@restart ~]$ crsctl check css
CRS-4529: Cluster Synchronization Services is online
[grid@restart ~]$ crsctl check evm
CRS-4533: Event Manager is online
[grid@restart ~]$ crs_stat -t
Name Type Target State Host
————————————————————
ora.CRS.dg ora….up.type ONLINE ONLINE restart
ora….ER.lsnr ora….er.type ONLINE ONLINE restart
ora.asm ora.asm.type ONLINE ONLINE restart
ora.cssd ora.cssd.type ONLINE ONLINE restart
ora.diskmon ora….on.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE restart
ora.ons ora.ons.type OFFLINE OFFLINE
[grid@restart ~]$ ps -ef | grep asm
grid 16058 1 0 19:56 ? 00:00:00 asm_pmon_+ASM
grid 16060 1 0 19:56 ? 00:00:00 asm_psp0_+ASM
grid 16062 1 0 19:56 ? 00:00:00 asm_vktm_+ASM
grid 16066 1 0 19:56 ? 00:00:00 asm_gen0_+ASM
grid 16068 1 0 19:56 ? 00:00:00 asm_diag_+ASM
grid 16070 1 0 19:56 ? 00:00:00 asm_dia0_+ASM
grid 16072 1 0 19:56 ? 00:00:00 asm_mman_+ASM
grid 16074 1 0 19:56 ? 00:00:00 asm_dbw0_+ASM
grid 16076 1 0 19:56 ? 00:00:00 asm_lgwr_+ASM
grid 16078 1 0 19:56 ? 00:00:00 asm_ckpt_+ASM
grid 16080 1 0 19:56 ? 00:00:00 asm_smon_+ASM
grid 16082 1 0 19:56 ? 00:00:00 asm_rbal_+ASM
grid 16084 1 0 19:56 ? 00:00:00 asm_gmon_+ASM
grid 16086 1 0 19:56 ? 00:00:00 asm_mmon_+ASM
grid 16088 1 0 19:56 ? 00:00:00 asm_mmnl_+ASM
grid 16188 16152 0 19:59 pts/1 00:00:00 grep asm
# cat /etc/oracle/ocr.loc
ocrconfig_loc=/u01/app/11.2.0/grid/cdata/localhost/local.ocr
local_only=TRUE
# /u01/app/11.2.0/grid/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 152
Available space (kbytes) : 261968
ID : 1179492779
Device/File Name : /u01/app/11.2.0/grid/cdata/localhost/local.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
[grid@restart ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
———————————————————————-
ora.ARCH.dg ora….up.type 0/5 0/ ONLINE ONLINE restart
ora.CRS.dg ora….up.type 0/5 0/ ONLINE ONLINE restart
ora.DATA.dg ora….up.type 0/5 0/ ONLINE ONLINE restart
ora….ER.lsnr ora….er.type 0/5 0/ ONLINE ONLINE restart
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE restart
ora.cssd ora.cssd.type 0/5 0/5 ONLINE ONLINE restart
ora.diskmon ora….on.type 0/10 0/5 OFFLINE OFFLINE
ora.evmd ora.evm.type 0/10 0/5 ONLINE ONLINE restart
ora.ons ora.ons.type 0/3 0/ OFFLINE OFFLINE
ora.restart.db ora….se.type 0/2 0/1 ONLINE ONLINE restart
SQL> select name from v$datafile
2 union all
3 select name from v$controlfile
4 union all
5 select member from v$logfile;
NAME
——————————————————————————–
+DATA/restart/datafile/system.260.790288571
+DATA/restart/datafile/sysaux.261.790288633
+DATA/restart/datafile/undotbs1.262.790288683
+DATA/restart/datafile/users.264.790288715
+DATA/restart/controlfile/current.256.790288547
+DATA/restart/onlinelog/group_1.257.790288549
+DATA/restart/onlinelog/group_2.258.790288555
+DATA/restart/onlinelog/group_3.259.790288561
8 rows selected.
SQL>
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch
Oldest online log sequence 36
Current log sequence 38
不是归档模式运行,现在手动开启
SQL> create pfile='/u01/pfile-0802.bak' from spfile;
File created.
SQL> alter system set log_archive_dest_1='LOCATION=+ARCH';
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 839282688 bytes
Fixed Size 2233000 bytes
Variable Size 528485720 bytes
Database Buffers 306184192 bytes
Redo Buffers 2379776 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +ARCH
Oldest online log sequence 36
Next log sequence to archive 38
Current log sequence 38
SQL> select name from v$archived_log;
no rows selected
SQL> alter system switch logfile;
System altered.
SQL> select name from v$archived_log;
NAME
——————————————————————————–
+ARCH/restart/archivelog/2012_08_02/thread_1_seq_38.256.790292467
以监听为例用srvctl 关闭启动测试:
[grid@restart ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): restart
[grid@restart ~]$ srvctl stop listener
[grid@restart ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is not running
[grid@restart ~]$ srvctl start listener
[grid@restart ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
———————————————————————-
ora.ARCH.dg ora….up.type 0/5 0/ ONLINE ONLINE restart
ora.CRS.dg ora….up.type 0/5 0/ ONLINE ONLINE restart
ora.DATA.dg ora….up.type 0/5 0/ ONLINE ONLINE restart
ora….ER.lsnr ora….er.type 0/5 0/ ONLINE ONLINE restart
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE restart
ora.cssd ora.cssd.type 0/5 0/5 ONLINE ONLINE restart
ora.diskmon ora….on.type 0/10 0/5 OFFLINE OFFLINE
ora.evmd ora.evm.type 0/10 0/5 ONLINE ONLINE restart
ora.ons ora.ons.type 0/3 0/ OFFLINE OFFLINE
ora.restart.db ora….se.type 0/2 0/1 ONLINE ONLINE restart
再测试kill监听进程,看能否自动起来。
[grid@restart ~]$ ps -ef | grep lsnr
grid 28139 1 0 21:43 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
grid 28325 28251 0 21:46 pts/1 00:00:00 grep lsnr
[grid@restart ~]$ kill -9 28139
过几秒钟后他就起来,因为这中间有监控进程的时间段
[grid@restart ~]$ ps -ef | grep lsnr
grid 28455 1 0 21:47 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
grid 28469 28251 0 21:47 pts/1 00:00:00 grep lsnr
好,最后测试硬性重启之后看ORACLE能不能自动起来
# reboot
系统起来稍等之后:
[root@restart bin]# ./crs_stat -t
Name Type Target State Host
————————————————————
ora.ARCH.dg ora….up.type ONLINE ONLINE restart
ora.CRS.dg ora….up.type ONLINE ONLINE restart
ora.DATA.dg ora….up.type ONLINE ONLINE restart
ora….ER.lsnr ora….er.type ONLINE ONLINE restart
ora.asm ora.asm.type ONLINE ONLINE restart
ora.cssd ora.cssd.type ONLINE ONLINE restart
ora.diskmon ora….on.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE restart
ora.ons ora.ons.type OFFLINE OFFLINE
ora.restart.db ora….se.type ONLINE ONLINE restart
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17086096/viewspace-2120847/,如需转载,请注明出处,否则将追究法律责任。