Sunday, May 13, 2018
Usage of OC4J in Release 12
We have gather below details but still unable to understand that why two services are there in OC4J in Release 12. My questions are:
[1] If OACORE is there and most of the components are based on Framework in Release 12 then what is the requirement of OAFM?
[2] Is OAFM is only for mapviewer, ascontrol and "Oracle Transport Agent" if we use them?
[3] Why there is seperate process for HTTP_Server as given below if OACORE is already there.
I have gathered below details from various source but still unable to understand fully above three questions.
* Oacore: This runs the OA Framework -based applications (Core Application Modules).
* Forms: This runs the Forms-based applications (using Servlet Mode).
* OAFM (Oracle Apps Fusion Middleware): This is responsible for running the web services , mapviewer, ascontrol (Oracle Transport Agent).
[oratrain@ndaeasdb01 scripts]$ ./adopmnctl.sh status
You are running adopmnctl.sh version 120.4
Checking status of OPMN managed processes...
Processes in Instance: TRAIN_ndaeasdb01.ndaeasdb01.xone.xansa.com
------------------------------------------------+---------
ias-component | process-type | pid | status
------------------------------------------------+---------
OC4J | oafm | 19974 | Alive
OC4J | forms | 19888 | Alive
OC4J | oacore | 19768 | Alive
HTTP_Server | HTTP_Server | 19711 | Alive
Web Entry Point Services HTTP Server
Web Application Services OACORE OC4J
Forms OC4J
OAFM OC4J
[1] If OACORE is there and most of the components are based on Framework in Release 12 then what is the requirement of OAFM?
[2] Is OAFM is only for mapviewer, ascontrol and "Oracle Transport Agent" if we use them?
[3] Why there is seperate process for HTTP_Server as given below if OACORE is already there.
I have gathered below details from various source but still unable to understand fully above three questions.
* Oacore: This runs the OA Framework -based applications (Core Application Modules).
* Forms: This runs the Forms-based applications (using Servlet Mode).
* OAFM (Oracle Apps Fusion Middleware): This is responsible for running the web services , mapviewer, ascontrol (Oracle Transport Agent).
[oratrain@ndaeasdb01 scripts]$ ./adopmnctl.sh status
You are running adopmnctl.sh version 120.4
Checking status of OPMN managed processes...
Processes in Instance: TRAIN_ndaeasdb01.ndaeasdb01.xone.xansa.com
------------------------------------------------+---------
ias-component | process-type | pid | status
------------------------------------------------+---------
OC4J | oafm | 19974 | Alive
OC4J | forms | 19888 | Alive
OC4J | oacore | 19768 | Alive
HTTP_Server | HTTP_Server | 19711 | Alive
Web Entry Point Services HTTP Server
Web Application Services OACORE OC4J
Forms OC4J
OAFM OC4J
EBS login flow
Before jumping into the flow, lets brush up the role of APPLSYSPUB, GUEST, APPLSYS and APPS user.
When we login to applications,initially oracle applications connect to public schema, APPLSYSPUB. This schema has sufficient privileges to perform the authentication of an Applications User (FND user), which includes running PL/SQL packages to verify the username/password combination and the privilege to record the success or failure of a login attempt.
The public ORACLE username and password that grants access to the Oracle E-Business Suite initial sign-on form. The default is APPLSYSPUB/PUB.
Once we change the APPLSYSPUB password must propagate the change to application tier configuration files. If the instance is Autoconfig enabled, must edit the CONTEXT file on each tier prior to running Autoconfig.
In the CONTEXT file, locate the autoconfig variable “s_gwyuid_pass” and set it to the new password, then run AutoConfig in each applications nodes.
When Autoconfig is not being used:
If you are not using Autoconfig you must manually edit the following configuration files :
1) FND_TOP/resource/appsweb.cfg
2) OA_HTML/bin/appsweb.cfg
3) FND_TOP/secure/HOSTNAME_DBNAME.dbc
To change password of APPLSYSPUB with FNDCPASS:
$FNDCPASS APPS/[apps_pass] 0 Y SYSTEM/[system_pass] ORACLE APPLSYSPUB [new_passs].
0 & Y are flags for FNDCPASS
0 is request id (request ID 0 is assigned to request ID's which are not submitted via Submit Concurrent Request Form)
'Y' indicates that this method is directly invoked from the command-line and not from the Submit Request Form.
All application tier processes (Apaches) must be restarted following the password change.
Role of GUEST user/schema in Oracle Applications:
GUEST is a dummy schema.
By default it has ORACLE as password.
GUEST/ORACLE password is present in DBC file at $FND_TOP/secure directory as well as at $FND_TOP/secure/SID_hostname directory.
If a user logs in without any role mappings, the user will get the Guest role, which has a default permission of "R".
GUEST user is used by JDBC Drivers and Oracle Self Service Web Applications like istore, irecruitment, iprocurement, ipayables, ireceivables etc to make initial Connection.
Role of APPLSYS & apps user/schema in Oracle Applications:
APPLSYS user is same as other oracle users like AP, AR, GL etc which hold their set of tables, views etc. In the same manner APPLSYS Account holds its set of tables like FND_USER and FND_APPLICATION, AD_APPLIED_PATCHES etc.
Applsys schema has applications technology layer products like FND and AD etc.
Apps is a universal schema, it has synonyms to all base product tables and sequences. This also has code objects for all products (triggers, views, packages, synonyms etc).
APPS is central Schema which holds synonyms for all other Users Database Objects.
Note: APPLSYS and APPS should have same password.
Reason why these contains same password.
Both apps & applsys need to have same password because when you sign on to apps, initially it connects to a public schema called APPLSYSPUB. This validates AOL name and password that we enter (operations/welcome). Once this is verified we select responsibility, this is validated by APPLSYS schema and then it connects to apps schema.
During signon process it uses both applsys and apps, hence this expects both the password to be identical. If the password for applsys & apps are not identical (Different) Try changing apps password to something else and try to login, the validation at the last stage would fail. This would result in failure of application login.
Difference B/W APPLSYSPUB & GUEST:
APPLSYSPUB/PUB - is DB user which is used by any utility to retrieve APPS schema password for further logins.
GUEST/ORACLE - is EBS user with no or max limited privileges to execute authorization function.That is why Guest user cannot be end dated.
Now lets jump into the login flow:
1.Webserver receives the user request for the particular port number. Web server Binds the request with the port number.
2.Based on the cookie webserver serves the request by sending login page
3.The application user name and password is entered by the user(operations/welcome)
4.DB connection is established using APPLSYSPUB user. This user “APPLSYSPUB” is having access to fnd_user view and a small set of other public tables needed to establish the initial connection.
5.Once DB connection is established FND_USER table is used to get ENCRYPTED_FOUNDATION_PASSWORD.
6.Using GUEST/ORACLE password combination and ENCRYPTED_FOUNDATION_PASSWORD string obtained from 2 above, we get Apps schema password.
7.Internally it tries to connect to Apps schema with the password retrieved in step 3 above. If the connection fails, then
a)The GUEST username password is incorrect
b)The FNDNAM (APPS) environment variable is set incorrectly.
c)Some other problem prevented a connection
8.Using Apps password obtained in Step 3 and ENCRYPTED_USER_PASSWORD string from FND_USER table, password for Application user (e.g. SYSADMIN) is obtained.
9. The Application user password obtained in Step 5 is compared to the application user password entered by user in login screen. If both passwords match then user is allowed to get into self-service.
10. A list of responsibilities assigned to that user is shown. The user picks one of the responsibilities listed.
11. The responsibility and application name is validated by connecting to Applsys schema(fnd_Responsibility, fnd_application…….)
Note: Here we should remember the difference between applsys and apps schema. Applsys schema contains ad,fnd objects whereas apps schema is a global schema contains all application objects.
12. Once the application is validated , Connecting to apps schema to get access application tables. This is the reason why we should have apps and applsys passwords should be same
13. Once a particular form is selected the .dbc file is accessed to get the information about the GUEST username/pwd
============
Note: Oracle doesn't store the hash value of the passwords. It just store the whole password in the encrypted format and get stored in FND_USER table(encrypted_user_password). Thus during authentication of a front end user, it is done on the stored password. Decryption of the stored password takes place FND_WEB_SEC package which is found under apps schema. The decryption key for the user password is the decrypted “ENCRYPTED_FOUNDATION_PASSWORD” of the guest user. Meaning that the first step to decrypt the user password is to decrypt the foundation password of the guest user.
There are certain changes for EBS 12.2 as 10.1.3 application server is replaced by Weblogic server. Thus the login flow will be slight different
When a HTTP request is made for EBS, the request is received by the Oracle HTTP Server (OHS).
When the configuration of OHS is for a resource that needs to be processed by Java, such as logging into EBS, the OHS configuration will redirect the request to the Web Logic Server (WLS) Java process (OACore in this case).
WLS determines the J2EE application that should deal with the request, which is called “oacore”.
This J2EE application needs to be deployed and available for processing requests in order for the request to succeed. The J2EE application needs to access a database and does this via a datasource which is configured within WLS.
Here is the processing in terms of URL(Login HTTP headers)
When the EBS login works OK, the browser will be redirected to various different URLs in order for the login page to be displayed. The page flow below shows the URLs that will be called to display the login page:
/OA_HTML/AppsLogin
EBS Login URL
/OA_HTML/AppsLocalLogin.jsp
Redirects to local login page
/OA_HTML/RF.jsp?function_id=1032925&resp_id=-1&resp_appl_id=-1&security_group_id=0&lang_code=US&oas=3TQG_dtTW1oYy7P5_6r9ag..¶ms=5LEnOA6Dde-bxji7iwlQUg
Renders the login page
The URLs after the user enters username and password, then clicks the “login” button are shown below/OA_HTML/OA.jsp?page=/oracle/apps/fnd/sso/login/webui/MainLoginPG&_ri=0&_ti=640290175&language_code=US&requestUrl=&oapc=2&oas=4hoZpUbqVSrv9IE0iJdY1g..
/OA_HTML/OA.jsp?OAFunc=OANEWHOMEPAGE
/OA_HTML/RF.jsp?function_id=MAINMENUREST&security_group_id=0
Renders user home page
Once the users home page is displayed, the logout flow also redirects to several different URL before returning to the login page:
/OA_HTML/OALogout.jsp?menu=Y
Logout icon has been clicked
/OA_HTML/AppsLogout
/OA_HTML/AppsLocalLogin.jsp?langCode=US&_logoutRedirect=y
Redirects to the login page
/OA_HTML/RF.jsp?function_id=1032925&resp_id=-1&resp_appl_id=-1&security_group_id=0&lang_code=US&oas=r6JPtR7-a4n5U2H3–ytEg..¶ms=1JU-PCsoyAO7NMAeJQ.9N6auZoBnO8UYYXjUgSPLHdpzU3015KGHA668whNgEIQ4
Reference:http://johanlouwers.blogspot.in/2006/12/oracle-applications-passwords.html
12.2 E-Business Suite Technology Stack Summary Of The iAS / HTTP Server Login Process And What To Expect When One Of The Login Components Fails (Doc ID 1984710.1)
R12 Workflow Notification Mailer Configuration
The
main component of the Oracle Workflow Notification Mailer is the executable
WFMAIL.
This is a server side program that queries the database for any pending
notifications.
It then dispatches these notifications by calling sendmail for UNIX and the
MAPI APIs for Microsoft Windows NT. The notification mailer also queries the
local inbox for incoming messages. These messages are validated and then passed
to the database for response processing. To configure Workflow Notification
Mailer we have to do OS level setup (Sendmail) and Application level setup.
1.) Sendmail should be installed by default when you install
RedHat Linux. If it is not then you need to install the Sendmail RPM’s with the
Red Hat distribution .
2.) we need to configure a means for the user to retrieve any
emails that are waiting for them on the server. One of the packages that do
this is dovecot, which handles POP and IMAP mailboxes in clear text or with
link encryption (POPS and IMAPS); IMAPS is the preferred mail protocol for MUAs.
3.) There are two kinds of Notification Outbound & Inbound
in Workflow Mailer
For Outbound Notification, CM (Concurrent Manager) node should be able to connect to SMTP (Simple Mail Transfer Protocol) server/relay.
For Inbound Notification (Optional), CM node should be able to connect to IMAP (Internet Message Access Protocol) Server.
4.) Workflow Notification Mailer in background run as Concurrent Manager (Workflow Mailer Service, Workflow Agent Listener Service)
For Outbound Notification, CM (Concurrent Manager) node should be able to connect to SMTP (Simple Mail Transfer Protocol) server/relay.
For Inbound Notification (Optional), CM node should be able to connect to IMAP (Internet Message Access Protocol) Server.
4.) Workflow Notification Mailer in background run as Concurrent Manager (Workflow Mailer Service, Workflow Agent Listener Service)
5.)Schedule the Workflow Background process, Notification Mailer
concurrent requests
6.) Select Workflow Manager in OAM
from pull down menu once you login to OAM.
7.) Click Notification Mailer status icon to navigate to the Service Component page for Notification Mailers. Status of Notification Mailers is down.
8.) Select Workflow Notification Mailer Service component under Service Components page. Click edit to access Notification Mailer Configuration wizard.
9.) Enter the name of the SMTP MAIL SERVER information under Outbound Email Account region.
10.) Select the Inbound Processing parameter in Inbound Mail Email Account (IMAP)region to enable inbound email processing. Enter name of the inbound IMAP mail server, the username and passwd of the email account that the Notification Mailer uses to receive email messages,and the reply-to address of the mail account which receive incoming messages to which notification responses should be sent.
6. Confirm the changes by clicking apply. Now check the status of the Workflow Notification Mailer service component is runing on Service components page
7.) Click Notification Mailer status icon to navigate to the Service Component page for Notification Mailers. Status of Notification Mailers is down.
8.) Select Workflow Notification Mailer Service component under Service Components page. Click edit to access Notification Mailer Configuration wizard.
9.) Enter the name of the SMTP MAIL SERVER information under Outbound Email Account region.
10.) Select the Inbound Processing parameter in Inbound Mail Email Account (IMAP)region to enable inbound email processing. Enter name of the inbound IMAP mail server, the username and passwd of the email account that the Notification Mailer uses to receive email messages,and the reply-to address of the mail account which receive incoming messages to which notification responses should be sent.
6. Confirm the changes by clicking apply. Now check the status of the Workflow Notification Mailer service component is runing on Service components page
EBS R12 Standby Apps tier sync
Primary
Application tier is connected to Primary database and Standby Application tier
is connected to Standby database.
Now we
need to sync in standby Apps tier with Primary Apps tier.
There
are two ways to consider sync of filesystem from primary to standby node.
Rsync command can be kept in crontab to continuouly write the changes on stanndby
Method
1:
1)
Enabled full filesystem sync from Primary to Standby Application Tier
2)
Whenever you perform a DR switch, rename standby Application Servers hostname
to primary application hosts.
3)
Also, perform changes in DNS as well
Method
2:
1)
Enabled sync of Run Filesystem and FS_NE
2)
Whenever you perform a DR switch run adcfgclone.pll on AppsTier to reconfigure
Apps.
3)
Perform any post configuration steps like WF Configuration, Update paths,etc.,
Method
2 is little complex as this need thorough testing specifically for post steps.
Method 1 doesn't is much simpler and faster to bring up Apps incase of any
disaster.
For
more details on how to setup standby appication, follow the below MOS ID
Business
Continuity for Oracle E-Business Suite Release 12.2 Using Oracle 12c (12.1.0.2)
Physical Standby Database (Doc ID
1963472.1)
==============================
Instructions
for OPRD:
cd
/OPRD/shared/apps/apps_st
tar
-cvf appl_backup.tar appl
shutdown
services on external node amxp05ext01b
rsync
-rptgl -e ssh --progress --exclude admin
applmgr@amxp05ext01ba:/OPRD/shared/apps/apps_st/appl/
/OPRD/shared/apps/apps_st/appl/
run
adadmin to recompile all plsql/menu/forms for US
After
the rsync only the following forms should be reported as not compiling
successfully:
The
following Oracle Forms objects did not generate successfully:
cs forms/US CSXSRCT1.fmx
cs forms/US CSXSRCT2.fmx
cs forms/US CSXSRISR.fmx
startup
services on external node amxp05ext01b
Backout
instructions for OPRD
login
as applmgr to amxq05ext01b
cd
/OPRD/shared/apps/apps_st
tar
-xvf appl_backup.tar
Configuring SSL R12 - Oracle Applications
1. Set
Your Environment
========================
DB Tier
Navigate
to the $INST_TOP/ora/10.1.3 and
source the .env file to set your 10.1.3 ORACLE_HOME variables
source the .env file to set your 10.1.3 ORACLE_HOME variables
2.
Create a wallet using owm
backup
up the existing wallet under $INST_TOP/certs/Apache
3.
Create a Certificate Request
Enter
all the orginazations details.
4.
Submit the Certificate Request to a Certifying Authority
5.
Import your Server Certificate to the Wallet
6. Update
the JDK Cacerts File under $OA_JRE_TOP/lib/security using keytool
7.
Update the Context File variables.
s_url_protocol
http to https.
s_local_url_protocol
http to https.
s_webentryurlprotocol
http to https.
s_active_webport
same as s_webssl_port.
s_webssl_port
default is 4443.
s_https_listen_parameter
same as s_webssl_port.
s_help_web_agent
url constructed constructed with https protocol and s_webssl_port.
s_login_page
url constructed with https protocol and s_webssl_port.
s_external_url
url constructed with https protocol and s_webssl_port.
8. Run
Autoconfig.
9.
Create a directory wallet under $ORACLE_HOME/appsutil and copy the certificates
under this directory.
For
detailed steps you may refer to Enabling SSL in Oracle E-Business Suite Release
12 [ID 376700.1]
========================
Attach
certs in QC wallet use wallet from amxq01cm01a and copy files to cm01b and
ap01a and ap01b
Apps Tier
Import
certs to Apache Wallet
·
cd $INST_TOP/ora/10.1.3
·
set 10.1.3 env
·
cd $INST_TOP/certs/Apache
·
owm &
·
Wallet Password is apps password.
After
importing certs copy from apache to opmn
·
cp $INST_TOP/certs/Apache/ewallet.p12 $INST_TOP/certs/opmn
·
cp $INST_TOP/certs/Apache/cwallet.sso $INST_TOP/certs/opmn
Importing
to cacerts using keytool
·
cd $OA_JRE_TOP/lib/security
·
savefile cacerts
·
example below and password changeit
o keytool
-import -alias officedepotroot_test -file
/stage/naresh/fprd_certs/verisignRoot.cer -trustcacerts -v -keystore cacerts --
already in keytool
Here
are the details of the Turkey e-Invoice CR. We are backing up the current
wallet, removing it and creating a new one with the new certificate. There
is a test script that is run after the CR to ensure that a connection can be
made successfully with the new certificate.
Login
as oracle on each production exadata database server and set the environment
oprd
cd
$ORACLE_HOME/owm/wallets/oracle
mkdir
oprd_wallet_bkup1
cp
$ORACLE_HOME/owm/wallets/oracle/*
$ORACLE_HOME/owm/wallets/oracle/oprd_wallet_bkup1
rm
$ORACLE_HOME/owm/wallets/oracle/*
Copy
the certificate attached to the SR (Base64.zip) and unzip it to
$ORACLE_HOME/owm/wallets/oracle
The
password for the wallet is set as a Profile Option "EFA: Wallet
Password" defaulted to welcome123
orapki
wallet create -wallet $ORACLE_HOME/owm/wallets/oracle -pwd welcome123
-auto_login
orapki
wallet add -wallet $ORACLE_HOME/owm/wallets/oracle -trusted_cert -cert
"$ORACLE_HOME/owm/wallets/oracle/Base64.cer" -pwd welcome123
To
test the new certificate please run the attached OPRD_Test_Script.sql as APPS
and it should return "PL/SQL procedure successfully completed."
Back-out
Plan:
On
both Exadata database servers:
cp
$ORACLE_HOME/owm/wallets/oracle/oprd_wallet_bkup1
$ORACLE_HOME/owm/wallets/oracle
The
attached test script checks that a connection can be made with the new
certificate:
declare
l_url varchar2(1000) := 'https://connector.efinans.com.tr';
l_http_request utl_http.req;
l_http_response utl_http.resp;
begin
--
Make a HTTP request and get the response.
UTL_HTTP.SET_WALLET('file:/u01/app/oracle/product/12.1.0.2/OPRD/owm/wallets/oracle',
'welcome123'); --Change wallet address/password acc.to your needs
l_http_request := utl_http.begin_request(l_url);
l_http_response := utl_http.get_response(l_http_request);
utl_http.end_response(l_http_response);
end;
Configuring DMZ server R12 - Oracle Application
1. Copy
the Application to the DMZ server
2.
Clone the Application Tier using adcfgclone.pl
3. Run
the txkChangeProfH.sql under FND_TOP/patch/115/sql
@txkChangeProfH.sql
SERVRESP
4. Update context file parameters under $INST_TOP/appl/admin
s_external_url, s_login_page ,etc
5. Run
the Autoconfig all nodes
1.
Database.
2. DMZ.
3.
Internal Application server.
6.
Change the profile Node Trust Level at the Server level to
"External".
7.
Change the profile Responsibility Trust Level at the desired responsibility
level to "External".
8. Test
both the DMZ and Internal URL's.
Super
Interview Question
Archietechure
1.) Explain in brief about EBS login flow.? Why
APPLSYS and APPS should have the same password. ? and Why Guest User cant be
end dated
2.) Usage of OAFM and OACORE run in OC4J in Release 12
3.) What happened behind the scene when a concurrent request is submitted?
4.)How To Recreate the /appsutil/scripts/ director
5.) In how many phases autoconfig will run?
4.)How To Recreate the /appsutil/scripts/ director
5.) In how many phases autoconfig will run?
DMZ
1.) Steps to configure DMZ in oracle R12?
2.) How to configure SSL in R12?
3.) How do you configure R12 EBS DR?
Oracle Workflow
1.) High Level steps to configure R12 Workflow
Notification Mailer Configuration .
Concurrent Manager.
1.) CRM log file location
Tuesday, May 8, 2018
Concurrent Manager
Concurrent Mangers log files
are located in the $APPLCSF/$APPLLOG location.
Where
is Concurrent Manager log file location.
By
default standard location is $APPLCSF/$APPLLOG , in some cases it can go to
$FND_TOP/log as well
cd
$APPLCSF/$APPLLOG
For
ICM Log
–> ls -lrt *$TWO_TASK*
For
Standard manager Log
–> ls -lrt w*.mgr
For
Conflict Resolution manager Log –> ls -lrt c*.mgr
Question
1: What are different types of concurrent manager?
Answer
There are several types of concurrent manager. Important ones:
Internal
Manager
Standard
Manager.
Conflict
Resolution Manager
Internal
monitors
Service
Manager
Transaction
Manager
Custom
Manager Defined
Read
more on below link
Oracle
Concurrent Manager
Question
2: What is Internal Concurrent Manager?
Answer
: It is responsible for controlling all other concurrent managers. Its main
task is to make sure that all other concurrent managers are up and running. It
controls other manager through the requests made to the service manager. It
also starts, stops and restarts the service manager for all nodes.
Question
3: What is Conflict Resolution Manager (CRM)?
Answer:
It takes care of resolving the program incompatibilities and checks if a
request in queue can be run in parallel with the running request. If a program
is identified as run alone, then it prevents concurrent managers from starting
other programs in the same conflict domain.
Question
4: What is Standard Manager?
Answer
: Standard Manager is the master concurrent manager. It is always running and
can take care of processing any concurrent request. If at all, no other manager
is assigned to a program, that program will be picked by standard manager.
Question
5:
What
happened behind the scene when a concurrent request is submitted?
Answer
1)
Once a concurrent request is submitted by the user, the table
FND_CONCURRENT_REQUESTS is automatically updated with the details of the
request. The table is also updated with the information about the schedule of
the concurrent request whether it’s immediately scheduled or scheduled at a
fixed time.
2)a)
If the request is incompatible/constraints defined ,Once the request time to
run is arrived,it status is set to pending/Standby.Now the conflict resolution
manager takes care of the request and finds out what are the incompatibilities
and set the status pending normal when the incompatibilities are cleared.
b) If
there are no incompatibilities then Once the request time to run is arrived,it
status is set to pending/Normal
c) ALL
the standard concurrent Manager and special manager continuously poll the
FND_CONCURRENT_REQUESTS table .The job of a concurrent manager is to execute
concurrent requests that are in Pending / Normal phase / status and that it is
qualified to run according to its specialization rules.
Concurrent
Manager Processes
– Act
independently
–
Select only requests that: (a) match the manager specialization rules, (b) are
Pending/Normal, (c) have a requested start time <= sysdate
d)
Once the request is processed, the FND_CONCURRENT_REQUESTS table is updated
with the status.
Question
6: Business user create the task that Concurrent request is taking a lot of
time to complete. What will be your approach for debugging it?
Answer
1)
First find the status of the concurrent request. It may be scheduled later on
or it could be pending/standby mode or all the concurrent manager are occupied
running other request. If it is pending/standy, we need to find the
incompatible program running and inform user.Many times the users schedule the
request to run at a later time.
2)
Find out the database sid of the concurrent request and check it is waiting on
any locks. We will kill the blocking session to order to complete the job
3) We
can run a trace on the request id to find the sql running and then generate the
explain plan for it. You can see if the sid is stuck on particular sql . If it
is particular sql, then it is good to check the statistics of the table
involved . We can look for tuning option for that query
4) We
can check the parameters with which the request is run. (For example, once a
user came saying the request is not printing the output. On Checking the
possible things, it was realized that he scheduled the request with print
copies = 0.)
Question
7: What happens when the internal concurrent manager dies abruptly? Are all the
managers also killed immediately after it?
Answer
No ALL
the standard manager keep running and executing the request. if the internal
manager dies, below queue control request are not performed
a)
Starts all other processes.
b)
Executes “control requests” submitted by the administrator.
c)
Activate/Deactivate/Abort Concurrent Manager
d)
Terminate Concurrent Request
e)
Monitors processes, restarting any that failed.
f)
Sets the target number of processes for each service based on the current work
shift.
Question
8: Does the internal manager run or schedule any request for itself?
Answer
No,
the internal manager does not run or schedule any requests. It has nothing to
do with scheduling requests, or deciding which manager will run a particular
request. Its function is only to run ‘queue control’ requests
a)
Starts all other processes.
b) Executes
“control requests” submitted by the administrator.
c)
Activate/Deactivate/Abort Concurrent Manager
d)
Terminate Concurrent Request
e)
Monitors processes, restarting any that failed.
f)
Sets the target number of processes for each service based on the current work
shift.
Question
9: How do I process more concurrent requests in parallel?
Answer
We can
increase the target processes of the concurrent manager in order to increase
the parallelism. This can be done using define concurrent manager form or
through direct update from sqlplus
Question
10 : If the internal manager goes down, do I need to kill all the managers
before restarting the internal manager?
Answer
No, if
the internal manager goes down you need not kill all the managers. You can simply
start the internal manager using startmgr.
Concurrent
Manager troubleshooting
Question
11 : What are the problems u have faced while shutting down applications?
Answer
While
shutting down application generally concurrent manager won’t go down because
some or the other request may be running. We will see what are the concurrent
requests running by querying fnd_concurrent_requests,
fnd_concurrent_program_vl, v$session, v$process and v$sqltext.
If
that request is only doing some select statement then we will kill those
requests, otherwise we will check what time it will take to complete by
querying the previous runs of that request and then we will decide what to do.
Oracle
Concurrent Manager Secrets
Question
12: What are Internal Monitors ?
Answer:
Internal Monitors are used specifically in PCP to allow for ICM failover to
other available middle tier nodes.
a)
Place an Internal Monitor on any node where the ICM can start in case of a
failure.
b)
Internal Monitors are seeded on every registered node by default.
c) If
the ICM goes down, the Internal Monitor will attempt to start a new ICM on the
local node.
d) If
multiple ICMs are started, only the first will stay active. The others will
gracefully exit.
Question
13: Can I delete concurrent manager?
Answer:
Yes,
you can delete any concurrent manager. For deleting, query for the manager in
the defined concurrent manager form and then delete the row.
Deleting
the predefined concurrent managers is not recommended and it should never be
done. Deletion may cause instability in the system.
Question
14: How can you know which trace file is created for the particular request?
Answer
You
can find out the same using the script given below. The trace will be located
in the udump location of the database server.
prompt
accept
request prompt ‘Please enter the concurrent request id for the appropriate
concurrent program:’
prompt
column
traceid format a8
column
tracename format a80
column
user_concurrent_program_name format a40
column
execname format a15
column
enable_trace format a12
set
lines 80
set
pages 22
set
head off
SELECT
‘Request id: ‘||request_id, ‘Trace id: ‘||oracle_Process_id, ‘Trace flag:
‘||req.enable_trace, ‘Trace Name: ‘||dest.value||’
‘||lower(dbnm.value)||’ora’||oracle_process_id||’.trc’, ‘Prog. Name:
‘||prog.user_concurrent_program_name, ‘File name:
‘||execname.execution_file_name||execname.subroutine_name , ‘Status :’||decode(phase_code,
‘R’, ‘Running’)||’ ‘||’-‘||decode(status_code, ‘R’, ‘Normal’), “SID Serial:
“||ses.sid||” , “||ses.serial#, “Module : “||ses.module
from
fnd_concurrent_requests req,
v$session
ses, v$process proc,
v$parameter
dest, v$parameter dbnm,
fnd_concurrent_programs_v1
prog,
fnd_executables
execname
where
req.request_id = &request
and
req.oracle_process_id=proc.spid(+)
and
proc.addr = ses.paddr(+)
and
dest.name=’user_dump_dest’
and
dbnm.name=’db_name’
and
req.concurrent_program_id =
prog.concurrent_program_id
and
req.program_application_id =
prog.application_id
and
prog.application_id =
execname.application_id
and
prog.executable_id=execname.executable_id;
Top 30
Most Useful Concurrent Manager Queries
Question
15: Explain how parallel concurrent processing(PCP) works?
Answer
In
case of parallel concurrent processing, all the managers are assigned a primary
and a secondary node. The managers are started in their primary node by
default. In case of node failure or Oracle instance failure, all the concurrent
managers on that node are switched to their secondary nodes. Once the primary
node is available again the concurrent managers on the secondary nodes are
migrated back to the primary node. During the migration process, a manager may be
spread across both primary and secondary nodes.
In
case of parallel concurrent processing, it may happen that in a node where
parallel concurrent processing is configured, the Oracle instance may or may
not be running. The node which is not running Oracle, the concurrent managers
connects via Net8 to a node which is running Oracle.
The
internal concurrent manager can run on any node, and can activate and
deactivate concurrent managers on all nodes. Since the internal concurrent
manager must be active at all times, it needs high fault tolerance. To provide
this fault tolerance, parallel concurrent processing uses internal monitor
processes. The job of the internal monitor process is to constantly monitor the
internal manager and start it when it fails. Only one internal monitor process
can be active on a single node. You decide which nodes have an internal monitor
process when you configure your system. You can also assign each internal
monitor process a primary and a secondary node to ensure fail over protection.
Internal monitor processes, like concurrent managers, can be assigned work
shifts, and are activated and deactivated by the internal concurrent manager.
Parallel
Concurrent Processing
Question
16: What are the circumstances in which you need to bounce the concurrent
manager?
Answer:
There can be many situation where you need to bounce the concurrent manager
a)
When you modify the definition of the printers
b)
When you modify the environment variables. Suppose you have changed the APPLTMP
and APPLPTMP variable.
c)
When all the requests are pending and hanging and no processing happening
d)
patch application requires the bounce of the CM
e) We
have many global hangs in the system due to locks by several concurrent manager
and other processes
Question
17: What are the reasons a concurrent manager hangs?
Answer:
The
concurrent manager hangs due to many reasons. A few of them are:
– Long
running jobs
– The
internal manager was activated by someone other then owner of the application
system
– The
operating system files system is full
– It’s
not able to create the log file
–
You’ve shut down the internal manager, but actual has a number in it
– The
database is hanging may be because the archive log files have filled
–
Pending/standby requests are too many
Question
18: How can we enable/disable Conflict Resolution Manager?
Answer:
It can be done using profile options “Concurrent: Use ICM”. Set it to “Y” to
enable Conflict Resolution manager. To disable it, set the profile option to
“N”.
Question
19: What are Transaction Managers?
Answer
: Transaction managers provide synchronous job processing by continually
monitoring a DBMS pipe for requests to come through from a client-side
application. The job of a transaction manager is to process this job
immediately and send information back to the client using the pipe.
a)
Transaction Managers Provide Synchronous Job Processing
b) A
client makes a request for a specific transaction manager to run a program, and
waits for the results of that program
c)
Product teams’ programs are linked directly into the transaction manager
executables
d) PO,
CRP, INV, AR, and OE all ship transaction managers
Question
20: How the mechanism of viewing log and output files works from browser?
Answer
The
sequence of events is as follows:
1. A
user within an Applications session requests to view a log or out file.
2. The
browser receives the request and spawns the cgi program FNDWRR.exe
3.
FNDWRR.exe logs into the database and queries FND_CONCURRENT_REQUESTS to
discover on which node the files for this request are stored.
4.
FNDWRR.exe constructs the service name for the file server on that node. And
makes the tns call to contact the listener for this service name.
5. The
listener responds by spawning the local FNDFS executable, as defined in it’s
listener.ora file. Now, FNDFS and FNDWRR.exe are able to communicate directly
now, using RPC calls.
6.
FNDWRR.exe requests FNDFS to transfer the file that was selected by the user.
7.
FNDFS transfers the file contents to a temporary file directory on the web
server’s node.
8. The
web server displays the file contents to the user.
Question
21: Why does the Concurrent manager put a concurrent program into a queue? Why
doesn’t the manager simply let the program run?
Answer:
Because at any given point in time a concurrent manager can run no more than
say 10 programs concurrently. This figure of 10 is configurable of course.
First the manager puts a submitted program into a queue, next the manager
checks if there is a slot available (i.e. Less than 10 programs are currently
running). If a slot is found available, the concurrent manager then runs the
program, or else it keeps the concurrent program in a queue with status
Pending.
Question
22: What to do if a request is Inactive/No Manager
Answer:
This is quite tricky questions
a)
Make certain that there is at least one active manager with specialization
rules that allow the program.
b) If
you have confirmed the previous point, then the problem may be a stale Worker
Request View
– The
view is used internally to map requests to managers
– The
view is regenerated when managers are created, or specialization rules are
altered
c) You
can manually regenerate the view
FNDLIBR
FND FNDCPBWV apps/apps SYSADMIN ‘System Administrator’ SYSADMIN
Question
23: What are Service Managers
Answer:
Service Managers are spawned on the middle-tier nodes of a GSM enabled system
in order to act as an agent of the ICM. When the ICM sees that it needs An
Service Manager to perform some function, such as start a concurrent manager
process, on a middle-tier node, it will make remote procedure control (RPC)
calls to the Apps listener on that node to start the Service manager. Once the
Service manager has been started and initialized, the ICM communicates directly
to the SM through RPC, giving it information to manage the services on that
node. The SM is spawned from the APPS TNS Listener.The APPS TNS Listener must
be started on every middle-tier node in the system, and started by the user
that starts ICM (e.g. applmgr) .TNS Listener spawns Service Manager to run as
agent of ICM for the local node
The
Service Manager is started by ICM on demand when needed. If no management
actions are needed on a node a Service Manager will not be started by ICM until
necessary. When ICM exits its Service Managers exit as well.
Question
24: What all is performed by ICM Process Monitor?
Answer:
The ICM itself and each process spawned by the ICM has an entry in
FND_CONCURRENT_PROCESSES and holds a uniquely named DBMS lock.
The
unique lock of the ICM has a format of FNDCPLK_ICM. This database session lock
is the method that the ICM ensures each PMON cycle that manager and service
processes are still alive. If the ICM can get the DBMS session lock of a
process, the ICM will start a new process for that manager or service.
Subscribe to:
Posts (Atom)