RAC启动关闭顺序




Startup


 

1. Ensure thatyou are logged in as the root Linux/ UNIX user.


   

    If you arenot connected as root OS user, you must switch to the oracle OS user


    su- root


 

2. Start(startup) the Oracle cluster stack



su - root


cd $CRS_HOME/bin


# ./crsctl startcrs              (must be run on eachnode)


 

3. Startup(start) all Oracle ASM instances on all nodes. (If you are not using the ASM you must skipthis step.)


 

su - oracle  (you must be logged asoracle)


 

To shut down an Oracle ASM instance,enter the following command, where node_name is the name ofthe node where the Oracle ASM instance is running:


$ oracle_home/bin/srvctl start asm -n node_name



4. Startup(start) all Oracle RAC instances on all nodes.


 

To shut down all Oracle RACinstances for a database, enter the following command, where db_name is thename of the database:
$ srvctl start database -ddb_name   (srvctl  fromORACLE_HOME)     (this command is starting all theinstances)


 

5. Startup(start) all applications using the Oracle database.


 

    This step includes stopping(shutting down) the Oracle Enterprise Manager Database Control:


 

    $ emctl start dbconsole


    OracleEnterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2009 Oracle Corporation. All rightsreserved.
   https://dev1rac.mfol.dgti.ro:1158/em/console/aboutApplication
    Stopping Oracle Enterprise Manager 11g Database Control ...
    ... Stopped.
 


Shutdown


 

Attention: In previous releases of OracleDatabase, you were required to set environment variables for ORACLE_HOME andORACLE_SID to start, stop, and check the status


of Enterprise Manager. WithOracle Database 11g release 2 (11.2) and later, you need to set the environmentvariables ORACLE_HOME and ORACLE_UNQNAME to use or manage theEnterprise Manager.


 

exportORACLE_UNQNAME=GlobalUniqueName


 

If you want to check if theEntreprise Manager Database Console is running or not:


 

emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://dev1rac:1158/em/console/aboutApplication
EM Daemon is not running.
 


emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://dev1rac:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.


 

1. Ensure thatyou are logged in as the oracle Linux/ UNIX user.


   

    If you arenot connected as oracle OS user, you must switch to the oracle OS user


    su- oracle


 

2. Stop/ shut(stop) down all applications using the Oracle database.


 

    This step includes stopping(shutting down) the Oracle Enterprise Manager Database Control:



    $ emctl stop dbconsole


    OracleEnterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2009 Oracle Corporation. All rightsreserved.
   https://dev1rac.mfol.dgti.ro:1158/em/console/aboutApplication
    Stopping Oracle Enterprise Manager 11g Database Control ...
    ... Stopped.
 


If you want to check if theEntreprise Manager Database Console is running or not:


 

emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://dev1rac:1158/em/console/aboutApplication
EM Daemon is not running.
 


emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://dev1rac:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.


 

Attention: In previous releases of OracleDatabase, you were required to set environment variables for ORACLE_HOME andORACLE_SID to start, stop, and check the status


of Enterprise Manager. WithOracle Database 11g release 2 (11.2) and later, you need to set the environmentvariables ORACLE_HOME and ORACLE_UNQNAME to use or manage theEnterprise Manager.


 

exportORACLE_UNQNAME=GlobalUniqueName    (database SID and notinstance SID)


 

3. Shut down(stop) all Oracle RAC instances on all nodes.


 

To shut down all Oracle RACinstances for a database, enter the following command, where db_name is thename of the database:
$ oracle_home/bin/srvctl stop database -ddb_name     (this command is starting allthe instances)


 

4. Shut down(stop) all Oracle ASM instances on all nodes. (If you are not using the ASM you must skipthis step.)


 

To shut down an Oracle ASMinstance, enter the following command, where node_name is the name ofthe node where the Oracle ASM instance is running:
$ oracle_home/bin/srvctl stop asm -n node_name


 

5. Stop (shutdown) the Oracle cluster stack


 

su - root


cd $CRS_HOME/bin


# ./crsctl stopcrs              (must be run on eachnode)


 

./srvctl stop nodeapps -nnode_name  --> in 11.2 stops only ONS and eONS because of somedependencies.


 

===========================================


 

If you want to check if thedatabase is running you can run:


 

ps -ef | grep smon
oracle 246196 250208 0 14:29:11 pts/0 0:00 grep smon
 


If you want to check if thedatabase listeners are running you can run:


 

ps -ef | grep lsnr
root 204886 229874 0 14:30:07 pts/0 0:00 grep lsnr


 

Here the listeners arerunning:


 

ps -ef | grep lsnr



oracle 282660 1 0 14:07:34 - 0:00 /oracle/grid/crs/11.2/bin/tnslsnr LISTENER_SCAN2 -inherit
oracle 299116 250208 0 14:30:00 pts/0 0:00 grep lsnr
oracle 303200 1 0 14:23:44 - 0:00 /oracle/grid/crs/11.2/bin/tnslsnr LISTENER_SCAN1 -inherit
oracle 315432 1 0 14:07:35 - 0:00 /oracle/grid/crs/11.2/bin/tnslsnr LISTENER_SCAN3 -inherit
oracle 323626 1 0 14:07:34 - 0:00 /oracle/grid/crs/11.2/bin/tnslsnr LISTENER -inherit


 

If you want to check if anyclusterware component is running you can run:


 

ps -ef | grep crs
root 204842 229874 0 14:27:19 pts/0 0:00 grep crs
 


Here the clusterwarecomponents (resources) are running:


 

ps -ef | grep crs
root 155856 1 1 14:05:47 - 0:22 /oracle/grid/crs/11.2/bin/ohasd.bin reboot
root 159940 1 0 14:07:08 - 0:01 /oracle/grid/crs/11.2/bin/oclskd.bin
oracle 221270 1 0 14:06:43 - 0:02 /oracle/grid/crs/11.2/bin/gpnpd.bin
root 225322 1 0 14:06:45 - 0:02 /oracle/grid/crs/11.2/bin/cssdmonitor
oracle 229396 1 0 14:06:41 - 0:00 /oracle/grid/crs/11.2/bin/gipcd.bin
oracle 233498 1 0 14:06:41 - 0:00 /oracle/grid/crs/11.2/bin/mdnsd.bin
root 253952 1 0 14:06:46 - 0:01 /oracle/grid/crs/11.2/bin/orarootagent.bin
root 258060 1 0 14:06:59 - 0:00 /oracle/grid/crs/11.2/bin/octssd.bin reboot
root 262150 1 0 14:06:47 - 0:00 /bin/sh /oracle/grid/crs/11.2/bin/ocssd
oracle 270344 262150 1 14:06:47 - 0:11 /oracle/grid/crs/11.2/bin/ocssd.bin
oracle 274456 156062 0 14:07:10 - 0:00 /oracle/grid/crs/11.2/bin/evmlogger.bin-o /oracle/grid/crs/11.2/evm/log/evmlogger.info -l/oracle/grid/crs/11.2/evm/log/evmlogger.log
oracle 282660 1 0 14:07:34 - 0:00 /oracle/grid/crs/11.2/bin/tnslsnrLISTENER_SCAN2 -inherit
root 286742 1 6 14:07:17 - 0:36 /oracle/grid/crs/11.2/bin/orarootagent.bin
oracle 303200 1 1 14:23:44 - 0:00 /oracle/grid/crs/11.2/bin/tnslsnrLISTENER_SCAN1 -inherit
oracle 315432 1 0 14:07:35 - 0:00 /oracle/grid/crs/11.2/bin/tnslsnrLISTENER_SCAN3 -inherit
oracle 323626 1 0 14:07:34 - 0:00 /oracle/grid/crs/11.2/bin/tnslsnr LISTENER-inherit
oracle 156062 1 0 14:07:01 - 0:02 /oracle/grid/crs/11.2/bin/evmd.bin
root 229692 1 0 14:06:46 - 0:02 /oracle/grid/crs/11.2/bin/cssdagent
oracle 233762 1 0 14:06:40 - 0:01 /oracle/grid/crs/11.2/bin/oraagent.bin
oracle 246226 250208 0 14:32:34 pts/0 0:00 grep crs
oracle 254218 1 0 14:06:53 - 0:01 /oracle/grid/crs/11.2/bin/diskmon.bin -d -f
root 258554 1 0 14:07:01 - 0:09 /oracle/grid/crs/11.2/bin/crsd.bin reboot
oracle 270612 1 0 14:07:28 - 0:03 /oracle/grid/crs/11.2/bin/oraagent.bin
 


REMARK: the database listeners arecluster resources and not database resources !


 











此文转自:http://blog.csdn.net/yan19880901/article/details/8591674

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值