1 先停RAC数据库,然后关数据库服务器,最后关存储
2 先开存储,在开数据库服务器,开启数据库
一:关rac
1. Ensure that you are logged in as the oracle Linux/ UNIX user.
su - oracle
$ emctl status dbconsole
2. Stop/ shut (stop) down all applications using the Oracle database.
export ORACLE_UNQNAME=mxloan (export ORACLE_UNQNAME=GlobalUniqueName (database SID and not instance SID))
$ emctl stop dbconsole
3. Shut down (stop) all Oracle RAC instances on all nodes.
$ORACLE_HOME/bin/srvctl stop database -d mxloan (-d 数据库名 this command is stoping all the instances)
4. Shut down (stop) all Oracle ASM instances on all nodes. (If you are not using the ASM you must skip this step.)
$ORACLE_HOME/bin/srvctl stop asm -n mxloan1 (-n 节点名)
$ORACLE_HOME/bin/srvctl stop asm -n mxloan2
5. Stop (shut down) the Oracle cluster stack
su - root
cd $CRS_HOME/bin
# ./crsctl stop crs (must be run on each node)
./srvctl stop nodeapps -n node_name -->in 11.2 stops only ONS and eONS because of some dependencies.
开机:
1
su - root
2
su - root
cd $CRS_HOME/bin
# ./crsctl start crs (must be run on each node)
3
su - oracle
$ORACLE_HOME/bin/srvctl start asm -n mxloan1
$ORACLE_HOME/bin/srvctl start asm -n mxloan2
4
$ srvctl start database -d mxloan (srvctl from ORACLE_HOME) (this command is starting all the instances)
5
$ emctl start dbconsole
-------------------------------------------------
其他启停版本
总结
停止RAC: 先停库(实例),然后ASM ,最后apps
emctl stop dbconsole
srvctl stop instance -d rac -i rac1
srvctl stop instance -d rac -i rac2
srvctl stop asm -n rac1
srvctl stop asm -n rac2
srvctl stop nodeapps -n rac1
srvctl stop nodeapps -n rac2
启动RAC:
和上面的步骤正好相反即
srvctl start nodeapps -n rac1
srvctl start nodeapps -n rac2
srvctl start asm -n rac1
srvctl start asm -n rac2
srvctl start instance -d rac -i rac2
srvctl start instance -d rac -i rac1
emctl start dbconsole
milipp启停版本(10g)
$crs_stat stop/start z 启停资源
$./crs_stop -all --停止集群所有资源 或单个资源
$./crs_start -all --开启集群所有资源 或单个资源
本节点关闭crs服务 需要root用户身份
#/app/oracle/product/10.0.2.1/crs/bin/crsctl stop crs
#/etc/init.d/init.crs stop/start 启停资源
============================================
重启后服务
服务端
service tgtd start
service iscsid start
service iscsi start
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
iscsiadm -m discovery -t sendtargets -p 192.168.0.253 -l
客户端
service iscsi start
iscsiadm -m discovery -t sendtargets -p 192.168.0.253 -l
stu253 &stu15 :
fdisk -l
partprobe
start_udev
ll /dev/raw/
raw -qa
服务端重启ntp服务:
service ntpd status
重启 iscsi 和多路径服务
1、系统级,查看crontab -l 自动备份任务;这个必须干掉;
2、数据库级别,查看RMAN进程,即使杀死系统进程,数据库进程任然存在,需要结合v$session进行确认。
(1)先查进程号:
SQL>SELECT sid, spid, client_info
FROM v$process p, v$session s
WHERE p.addr = s.paddr
AND client_info LIKE '%rman%'
(2)终止RMAN备份
先ps -ef|grep spid |grep -v grep
kill -9 spid
3、查询RMAN 备份进度
SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE"
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%'
AND OPNAME NOT LIKE '%aggregate%'
AND TOTALWORK != 0
AND SOFAR <> TOTALWORK
SELECT s.sid,
s.serial#,
s.machine,sl.opname,sl.target,sl.message,s.program,sl.sql_hash_value,
TRUNC(sl.elapsed_seconds/60) || ':' || MOD(sl.elapsed_seconds,60) elapsed,
TRUNC(sl.time_remaining/60) || ':' || MOD(sl.time_remaining,60) remaining,
ROUND(sl.sofar/sl.totalwork*100, 2) progress_pct
FROM v$session s,
v$session_longops sl
WHERE s.sid = sl.sid
AND s.serial# = sl.serial#
AND sl.totalwork>0
AND sl.sofar<>sl.totalwork
先用oracle用户登录按如下执行以下命令,每行敲一下回车
1.停监听:
lsnrctl
stop
2.停数据库:
sqlplus /nolog
connect /as sysdba
shutdown immediate
exit
3.启数据库:
sqlplus /nolog
connect /as sysdba
startup
exit
4.启监听:
lsnrctl
start
exit
应该是这样,不启动和停止监听的话容易出问题的
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)