Oracle 11g RAC停止和启动步骤

时间:2021-08-19 08:37:26
关闭前备份控制文件/参数文件:
 
sqlplus / as sysdba
alter database backup controlfile to '/home/oracle/control.ctl.bak';
create pfile='/home/oracle/init<实例名>.ora' from spfile;
 
一,oracle 11g RAC关闭顺序

1.停止em服务
su - oracle
export ORACLE_UNQNAME=db11
emctl status dbconsole
emctl stop dbconsole
emctl status dbconsole

2.停监听
srvctl status listener
srvctl stop listener
srvctl status listener

3.停库
srvctl stop database -d db11 -o immediate

4.停crs(每个节点执行)
su - root
进入grid用户的bin目录
./crsctl stop crs

5.查看进程
ps -ef | grep lsnr
ps -ef | grep crs
ps -ef | grep smon


二,启动顺序

1.启crs(两个节点都执行,如果要重启操作系统,那么这一步可以省略)
su - root
cd $CRS_HOME/bin
# ./crsctl start crs  
# ./crs_stat -t -v

2.启动数据库
su - oracle
srvctl start database -d db11 -o open

3.查看数据库和监听状态
srvctl status database -d db11
srvctl status listener

4.查看crs
crs_stat -t -v

5.查看进程
ps -ef | grep lsnr
ps -ef | grep crs
ps -ef | grep smon