How to start or stop ebs R12 services?
This exercise will be really helpful for beginners who start their career into oracle APPS. I have just explained on how to start and stop oracle apps R12.. R12 has come up with lot of automation scripts and it reduces human intervention a lot. Before we start services, we must understand in which order they should be started..
Starting services :
1) Source your db environment file
2)Start the DB and DB listener
3)Start the applications with adstrtal script.
(Note : Nothing can be done from application tier when your db or db listener is down)
Stopping services :
1) Source apps environment file
2) Stop applications with adstpall script
3) shutdown the db
Starting the application services :
Source db env file
Connecting through SQL* plus utility in order to start db
To start db
To source env file :
Go to $ORACLE_HOME
[oracle@dev186 ~]$ cd /oracle/PROD/db/tech_st/11.1.0/
[oracle@dev186 11.1.0]$ . PROD_dev186.env
[oracle@dev186 11.1.0]$ echo $ORACLE_HOME
/oracle/PROD/db/tech_st/11.1.0
To make sure you have source correct db, issue the below :
[oracle@dev186 11.1.0]$ echo $ORACLE_SID
PROD
[oracle@dev186 11.1.0]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Jun 23 09:21:48 2014
Copyright (c) 1982, 2008, Oracle. All rights reserved.
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
Its a best practice for a DBA to read logs.. In order to check db alert log go to the directory below and open alert log using tail command.
Alert log --> /oracle/PROD/db/tech_st/11.1.0/admin/PROD_dev186/diag/rdbms/prod/PROD/trace
Starting the DB Listener
[oracle@dev186 11.1.0]$ lsnrctl start PROD
LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 23-JUN-2014 09:24:39
Copyright (c) 1991, 2008, Oracle. All rights reserved.
Starting /oracle/PROD/db/tech_st/11.1.0/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.1.0.7.0 - Production
System parameter file is /oracle/PROD/db/tech_st/11.1.0/network/admin/PROD_dev186/listener.ora
Log messages written to /oracle/PROD/db/tech_st/11.1.0/log/diag/tnslsnr/dev186/prod/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dev186.chainsys.com)(PORT=1523)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dev186.chainsys.com)(PORT=1523)))
STATUS of the LISTENER
------------------------
Alias PROD
Version TNSLSNR for Linux: Version 11.1.0.7.0 - Production
Start Date 23-JUN-2014 09:24:40
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/PROD/db/tech_st/11.1.0/network/admin/PROD_dev186/listener.ora
Listener Log File /oracle/PROD/db/tech_st/11.1.0/log/diag/tnslsnr/dev186/prod/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dev186.chainsys.com)(PORT=1523)))
Services Summary...
Service "PROD" has 1 instance(s).
Instance "PROD", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@dev186 11.1.0]$
So DB part is done, next we need to start the applications. Open an another terminal and go to $APPL_TOP to source apps env file.
[oracle@dev186 ~]$ cd /oracle/PROD/apps/apps_st/appl/
[oracle@dev186 appl]$ . APPSPROD_dev186.env
Go to $ADMIN_SCRIPTS_HOME directory where you see lot scripts we use in day to day activities.
[oracle@dev186 appl]$ cd $ADMIN_SCRIPTS_HOME
[oracle@dev186 scripts]$ pwd
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts
[oracle@dev186 scripts]$ ls
adalnctl.sh adexecsql.pl adoafmctl.sh adstrtal.sh ieo L383162.log L383167.log sqlnet.log
adapcctl.sh adformsctl.sh adopmnctl.sh afiedt.buf java.sh L383163.log msc
adautocfg.sh adformsrvctl.sh adpreclone.pl cmclean.sql jtffmctl.sh L383165.log mwactl.sh
adcmctl.sh adoacorectl.sh adstpall.sh gsmstart.sh L383161.log L383166.log mwactlwrpr.sh
adalnctl.sh --> TO start apps listener alone
adoafmctl.sh --> To start oafm services alone
adapcctl.sh--> To start apache web services alone
adformsctl.sh --> To start forms services alone
adopmnctl.sh--> TO start opmn services altogether... (Apache, oacore, opmn and forms)
adcmctl.sh --> to start concurrent services alone
All these services can be started alone or can be started in a single script adstrtal.sh script.
if you execute it it will execute all the scripts above.
[oracle@dev186 scripts]$ ./adstrtal.sh apps/apps
You are running adstrtal.sh version 120.15
The logfile for this session is located at /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adstrtal.log
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adopmnctl.sh start
script returned:
****************************************************
You are running adopmnctl.sh version 120.6
Starting Oracle Process Manager (OPMN) ...
opmnctl: opmn started.
adopmnctl.sh: exiting with status 0
adopmnctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adopmnctl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adalnctl.sh start
script returned:
****************************************************
adalnctl.sh version 120.3
Checking for FNDFS executable.
Starting listener process APPS_PROD.
adalnctl.sh: exiting with status 0
adalnctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adalnctl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adapcctl.sh start
script returned:
****************************************************
You are running adapcctl.sh version 120.7.12010000.2
Starting OPMN managed Oracle HTTP Server (OHS) instance ...
opmnctl: opmn is already running.
opmnctl: starting opmn managed processes...
adapcctl.sh: exiting with status 0
adapcctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adapcctl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adoacorectl.sh start
script returned:
****************************************************
You are running adoacorectl.sh version 120.13
Starting OPMN managed OACORE OC4J instance ...
adoacorectl.sh: exiting with status 0
adoacorectl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adoacorectl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adformsctl.sh start
script returned:
****************************************************
You are running adformsctl.sh version 120.16
Starting OPMN managed FORMS OC4J instance ...
adformsctl.sh: exiting with status 0
adformsctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adformsctl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adoafmctl.sh start
script returned:
****************************************************
You are running adoafmctl.sh version 120.8
Starting OPMN managed OAFM OC4J instance ...
adoafmctl.sh: exiting with status 0
adoafmctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adoafmctl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adcmctl.sh start
script returned:
****************************************************
You are running adcmctl.sh version 120.17.12010000.3
Starting concurrent manager for PROD ...
Starting PROD_0623@PROD Internal Concurrent Manager
Default printer is noprint
adcmctl.sh: exiting with status 0
adcmctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adcmctl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/jtffmctl.sh start
script returned:
****************************************************
You are running jtffmctl.sh version 120.3
Validating Fulfillment patch level via /oracle/PROD/apps/apps_st/comn/java/classes
Fulfillment patch level validated.
Starting Fulfillment Server for PROD on port 9302 ...
jtffmctl.sh: exiting with status 0
.end std out.
.end err out.
****************************************************
All enabled services for this node are started.
adstrtal.sh: Exiting with status 0
adstrtal.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adstrtal.log for more information ...
Note : MAke sure all the services are exiting with status 0 which means there are no issues. If any of the services are ending with numbers we need to investigate depends on the issue.
To Make sure opmn is up and running issue the below,
[oracle@dev186 scripts]$ ./adopmnctl.sh status
You are running adopmnctl.sh version 120.6
Checking status of OPMN managed processes...
Processes in Instance: PROD_dev186.dev186.chainsys.com
---------------------------------+--------------------+---------+---------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group | OC4J:oafm | 16277 | Alive
OC4JGroup:default_group | OC4J:forms | 16203 | Alive
OC4JGroup:default_group | OC4J:oacore | 16117 | Alive
HTTP_Server | HTTP_Server | 16060 | Alive
adopmnctl.sh: exiting with status 0
adopmnctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adopmnctl.txt for more information ...
You have new mail in /var/spool/mail/oracle
All the four services should be in Alive status after you execute adstral.sh. if they are in down or init status there are some issues.. Users will be able to open forms only when all these services are alive.
To MAke sure listener is up and running :
[oracle@dev186 scripts]$ ps -ef|grep tns
root 21 2 0 09:13 ? 00:00:00 [netns]
oracle 5403 1 0 09:24 ? 00:00:00 /oracle/PROD/db/tech_st/11.1.0/bin/tnslsnr PROD -inherit
oracle 16022 1 0 09:43 ? 00:00:00 /oracle/PROD/apps/tech_st/10.1.2/bin/tnslsnr APPS_PROD -inherit
oracle 16782 4537 0 09:45 pts/1 00:00:00 grep tns
DB listener should be up and running in order to function application...
LEts see how to stop the application now :
Go to $ADMIN_SCRIPTS_HOME and execute adstpall.sh script to stop all the applications. You can stop all the applications in a single script or one by one with the each script. For ex: if there is any issue with concurrent and you need to down concurrent manager is it enough if you just issue
[oracle@dev186 scripts]$ ./adcmctl.sh stop apps/apps
Note : Among all the scripts concurrent service is the only script which will you ask apps user password.
To start again,
[oracle@dev186 scripts]$ ./adcmctl.sh start apps/apps
To down all the services in a single script,
[oracle@dev186 scripts]$ ./adstpall.sh apps/apps
You are running adstpall.sh version 120.10
The logfile for this session is located at /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adstpall.log
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/jtffmctl.sh stop
script returned:
****************************************************
You are running jtffmctl.sh version 120.3
Shutting down Fulfillment Server for PROD on port 9302 ...
jtffmctl.sh: exiting with status 0
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adcmctl.sh stop
script returned:
****************************************************
You are running adcmctl.sh version 120.17.12010000.3
Shutting down concurrent managers for PROD ...
ORACLE Password:
Submitted request 390585 for CONCURRENT FND SHUTDOWN
adcmctl.sh: exiting with status 0
adcmctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adcmctl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adoafmctl.sh stop
script returned:
****************************************************
You are running adoafmctl.sh version 120.8
Stopping OPMN managed OAFM OC4J instance ...
adoafmctl.sh: exiting with status 0
adoafmctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adoafmctl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adformsctl.sh stop
script returned:
****************************************************
You are running adformsctl.sh version 120.16
Stopping OPMN managed FORMS OC4J instance ...
adformsctl.sh: exiting with status 0
adformsctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adformsctl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adoacorectl.sh stop
script returned:
****************************************************
You are running adoacorectl.sh version 120.13
Stopping OPMN managed OACORE OC4J instance ...
adoacorectl.sh: exiting with status 0
adoacorectl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adoacorectl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adapcctl.sh stop
script returned:
****************************************************
You are running adapcctl.sh version 120.7.12010000.2
Stopping OPMN managed Oracle HTTP Server (OHS) instance ...
opmnctl: stopping opmn managed processes...
adapcctl.sh: exiting with status 0
adapcctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adapcctl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adalnctl.sh stop
script returned:
****************************************************
adalnctl.sh version 120.3
Shutting down listener process APPS_PROD.
adalnctl.sh: exiting with status 0
adalnctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adalnctl.txt for more information ...
.end std out.
.end err out.
****************************************************
Executing service control script:
/oracle/PROD/inst/apps/PROD_dev186/admin/scripts/adopmnctl.sh stop
script returned:
****************************************************
You are running adopmnctl.sh version 120.6
Stopping Oracle Process Manager (OPMN) and the managed processes ...
opmnctl: stopping opmn and all managed processes...
adopmnctl.sh: exiting with status 0
adopmnctl.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adopmnctl.txt for more information ...
.end std out.
.end err out.
****************************************************
All enabled services on this node are stopped.
adstpall.sh:Exiting with status 0
adstpall.sh: check the logfile /oracle/PROD/inst/apps/PROD_dev186/logs/appl/admin/log/adstpall.log for more information ...
Make sure opmn is down with the below ,
oracle@dev186 scripts]$ ./adopmnctl.sh status
It should show all the services are down.. also issue
ps -ef|grep FNDLIBR --> to check conc manager is down
ps -ef|grep tns --> listener is down
Once everything down in apps side, go to db side and shut down the db and listener.
Happy learning.. I hope this blog is helpful for beginners..
No comments:
Post a Comment