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 和多路径服务
所有实例和服务的状态
$ srvctl status database d orcl
Instance orcl is running on node linux
Instance orcl is running on node linux
单个实例的状态
$ srvctl status instance d orcl i orcl
Instance orcl is running on node linux
在数据库全局命名服务的状态
$ srvctl status service d orcl s orcltest
Service orcltest is running on instance(s) orcl orcl
特定节点上节点应用程序的状态
$ srvctl status nodeapps n linux
VIP is running on node: linux
GSD is running on node: linux
Listener is running on node: linux
ONS daemon is running on node: linux
ASM 实例的状态
$ srvctl status a *** n linux
ASM instance +ASM is running on node linux
列出配置的所有数据库
$ srvctl config database
orcl
显示 RAC 数据库的配置
$ srvctl config database d orcl
linux orcl /u /app/oracle/product/ /db_
linux orcl /u /app/oracle/product/ /db_
显示指定集群数据库的所有服务
$ srvctl config service d orcl
orcltest PREF: orcl orcl AVAIL:
显示节点应用程序的配置 —(VIP GSD ONS 监听器)
$ srvctl config nodeapps n linux a g s l
VIP exists : /linux vip/ / /eth :eth
GSD exists
ONS daemon exists
Listener exists
显示 ASM 实例的配置
$ srvctl config a *** n linux
+ASM /u /app/oracle/product/ /db_
集群中所有正在运行的实例
SELECT
inst_id
instance_number inst_no
instance_name inst_name
parallel
status
database_status db_status
active_state state
host_name host
FROM gv$instance
ORDER BY inst_id
INST_ID INST_NO INST_NAME PAR STATUS DB_STATUS STATE HOST
orcl YES OPEN ACTIVE NORMAL rac
orcl YES OPEN ACTIVE NORMAL rac
位于磁盘组中的所有数据文件
select name from v$datafile
union
select member from v$logfile
union
select name from v$controlfile
union
select name from v$tempfile
NAME
+FLASH_RECOVERY_AREA/orcl/controlfile/current
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_
+ORCL_DATA /orcl/controlfile/current
+ORCL_DATA /orcl/datafile/example
+ORCL_DATA /orcl/datafile/indx
+ORCL_DATA /orcl/datafile/sysaux
+ORCL_DATA /orcl/datafile/system
+ORCL_DATA /orcl/datafile/undotbs
+ORCL_DATA /orcl/datafile/undotbs
+ORCL_DATA /orcl/datafile/undotbs
+ORCL_DATA /orcl/datafile/undotbs
+ORCL_DATA /orcl/datafile/users
+ORCL_DATA /orcl/datafile/users
+ORCL_DATA /orcl/onlinelog/group_
+ORCL_DATA /orcl/onlinelog/group_
+ORCL_DATA /orcl/onlinelog/group_
+ORCL_DATA /orcl/onlinelog/group_
+ORCL_DATA /orcl/tempfile/temp
rows selected
属于 ORCL_DATA 磁盘组的所有 ASM 磁盘
SELECT path
FROM v$a *** _disk
WHERE group_number IN (select group_number
from v$a *** _diskgroup
where name = ORCL_DATA )
PATH
ORCL:VOL
ORCL:VOL
启动/停止RAC集群
确保是以 oracle UNIX 用户登录的 我们将从rac 节点运行所有命令
# su – oracle
$ hostname
Rac
停止 Oracle RAC g 环境
第一步是停止 Oracle 实例 当此实例(和相关服务)关闭后 关闭 ASM 实例 最后 关闭节点应用程序(虚拟IP GSD TNS 监听器和 ONS)
$ export ORACLE_SID=orcl
$ emctl stop dbconsole
$ srvctl stop instance d orcl i orcl
$ srvctl stop a *** n rac
$ srvctl stop nodeapps –n rac
启动 Oracle RAC g 环境
第一步是启动节点应用程序(虚拟 IP GSD TNS 监听器和 ONS) 当成功启动节点应用程序后 启动 ASM 实例 最后 启动 Oracle 实例(和相关服务)以及企业管理器数据库控制台
$ export ORACLE_SID=orcl
$ srvctl start nodeapps n rac
$ srvctl start a *** n rac
$ srvctl start instance d orcl i orcl
$ emctl start dbconsole
使用 SRVCTL 启动/停止所有实例
启动/停止所有实例及其启用的服务 我只是觉得有意思就把此步骤作为关闭所有实例的一种方法加进来了!
$ srvctl start database d orcl
lishixinzhi/Article/program/Oracle/201311/16967
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)