Oracle EBS R12的启停脚本
以下脚本用root用户登录执行:
一、DB启停使用EBS提供的脚本
ebs_start.sh
su - oraprod -c "/d01/oracle/PROD/db/tech_st/10.2.0/appsutil/scripts/PROD_ebs/addbctl.sh start"
su - oraprod -c "/d01/oracle/PROD/db/tech_st/10.2.0/appsutil/scripts/PROD_ebs/addlnctl.sh start PROD"
sleep 10
#rm -fr $INST_TOP/ora/10.1.3/j2ee/oacore/persistence/*
#rm -fr $INST_TOP/ora/10.1.3/j2ee/oafm/persistence/*
#rm -fr $INST_TOP/ora/10.1.3/j2ee/forms/persistence/*
su - applprod -c "/d01/oracle/PROD/inst/apps/PROD_ebs/admin/scripts/adalnctl.sh start"
su - applprod -c "/d01/oracle/PROD/inst/apps/PROD_ebs/admin/scripts/adapcctl.sh start"
su - applprod -c "/d01/oracle/PROD/inst/apps/PROD_ebs/admin/scripts/adoacorectl.sh start"
su - applprod -c "/d01/oracle/PROD/inst/apps/PROD_ebs/admin/scripts/adformsctl.sh start"
su - applprod -c "/d01/oracle/PROD/inst/apps/PROD_ebs/admin/scripts/adcmctl.sh start apps/apps"
banner ebs start success
ebs_stop.sh
su - applprod -c "/d01/oracle/PROD/inst/apps/PROD_ebs/admin/scripts/adcmctl.sh stop apps/apps"
su - applprod -c "/d01/oracle/PROD/inst/apps/PROD_ebs/admin/scripts/adformsctl.sh stop"
su - applprod -c "/d01/oracle/PROD/inst/apps/PROD_ebs/admin/scripts/adoacorectl.sh stop"
su - applprod -c "/d01/oracle/PROD/inst/apps/PROD_ebs/admin/scripts/adapcctl.sh stop"
su - applprod -c "/d01/oracle/PROD/inst/apps/PROD_ebs/admin/scripts/adalnctl.sh stop"
sleep 10
kill -9 `ps -ef|grep applprod|grep -v grep|awk '{print $2}'`
su - oraprod -c "/d01/oracle/PROD/db/tech_st/10.2.0/appsutil/scripts/PROD_ebs/addlnctl.sh stop PROD"
su - oraprod -c "/d01/oracle/PROD/db/tech_st/10.2.0/appsutil/scripts/PROD_ebs/addbctl.sh stop immediate"
banner ebs stop success
二、DB启停使用Oracle标准方法
①Shutdown:
先关闭应用系统所有应用服务,然后关闭数据库监听,最后关闭数据库:
# su - applprod
$ cd /d01/oracle/PROD/apps/apps_st/appl/
$ . ./APPSPROD_ebs.env
$ cd $ADMIN_SCRIPTS_HOME
$ ./adstpall.sh apps/apps
$ ps -ef |grep httpd
$ ps -ef |grep FNDLIBR
$ ps -ef |grep java
$ ps -ef |grep frmweb
$ ps -ef |grep tns
# su - oraprod
$ cd /d01/oracle/PROD/db/tech_st/11.1.0/
$ . ./PROD_ebs.env
$ lsnrctl stop
$ sqlplus /nolog
SQL> conn /as sysdba
SQL> shutdown immediate
SQL> exit
②Startup:
先启动数据库监听和数据库,然后再启动应用系统:
# su - oraprod
$ cd /d01/oracle/PROD/db/tech_st/11.1.0/
$ . ./PROD_ebs.env
$ lsnrctl start
$ sqlplus /nolog
SQL*Plus: Release 11.1.0.7.0 - Production on Sun Jul 15 18:20:14 2012
Copyright (c) 1982, 2008, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2166536 bytes
Variable Size 427819256 bytes
Database Buffers 624951296 bytes
Redo Buffers 14000128 bytes
Database mounted.
Database opened.
SQL> exit
# su - applprod
$ cd /d01/oracle/PROD/apps/apps_st/appl/
$ . ./APPSPROD_ebs.env
$ cd $ADMIN_SCRIPTS_HOME
$ ./adstrtal.sh apps/apps