Tuesday, January 27, 2009

Autoconfig FAQ

What is Autoconfig in 11i ?

Autoconfig is method of configuring Oracle Applications . All the information required to configure Oracle Apps 11i is stored in file called as Context file.Context file is repository for configuration stored in xml format.

What are different Contexts file Autoconfig in 11i ?

There are two context files, one for database tier called as Database Context second for Application tier called as Application Context.

What is location of Contexts file in 11i ?

Database Context file is under Database $ORACLE_HOME/appsutil/_.xml
Application Context file is under $APPL_TOP/admin/_.xml

How to run Autoconfig in 11i ?

You will use script adautocfg.sh (on both Database tier and & Application tier).

Where to check log files after autoconfig is executed ?

On database tier its under $ORACLE_HOME/appsutil/log/$CONTEXT_NAME/MM_DD_YYYY/adconfig.log
On Application tier its under $APPL_TOP/admin/$CONTEXT_NAME/log/MMDDYYYY/adconfig.log

where CONTXT_NAME is _

What if my Context file itself is corrupted, Can I create one ?

Yes you have utility called adbldxml to build Context File.

How to change some parameter in Context/xml file ?

If you are an expert then you can open xml file via any editor & change it but is recommending to use Context Editor or if you are on OAM.H or higher then use OAM (Oracle Application Manager) to change context file.

When should I run AutoConfig?

You should run AutoConfig in the event of the following cases:

You did updates to your Applications Context file.

An Oracle Metalink Note instructs you to run AutoConfig as part of an upgrade, migration, cloning and/or configuration process.

The Readme of an Oracle patch instructs you to run AutoConfig after the application of the patch.

You apply any ADX Product patch.

Which files / profile options get changed when I run AutoConfig?

Run the adchkcfg utility to get an html report that lists all the files and profile options that get changed when you run AutoConfig.

adchkcfg.sh scripts reside in $AD_HOME/bin and output generate in $APPL_TOP/admin/$CONTECT_NAME/out/

How can I roll back an AutoConfig session?

All backup configuration files from each AutoConfig session are stored in:
On the application tier: /admin//out//

On the database tier: /appsutil/out///

Inside these directories, there will be several files which autoconfig has taken a backup off before making changes. Also there will be a script restore.sh.

You can run restore.sh (Unix) or restore.cmd (Windows) to roll back an AutoConfig session.

How to run AutoConfig in TEST mode?

We can run autoconfig in test mode. This will reduce the risk and we can understand the impact better. We use adchkcfg.sh scripts it willl create a report which will list all files & profile options that is going to change when you run AutoConfig.

Below is the sample run for the same.

$ adchkcfg.sh
Enter the full path to the Applications Context file:
/PRODAPPL/ADMIN/PROD.xml

......

......

After execution of autoconfig is run on test mode, it will generate a zip file (ADXcfgcheck.zip). You can copy the zip file to $OA_HTML location and unzip the same. You can then view the report using following URL

http://hostname:port/OA_HTML/cfgcheck.html

Autoconfig Basics

Autoconfig Basics

Autoconfig is tool to configure oracle Applications 11i, Application Tier as well Database Tier.
If you want to configure database tier then you have to execute adautocfg.sh script on database tier.

If you want to configure on application tier then you have to execute adautocfg.sh on application tier.

You can find adautocfg.sh script for Database tier in $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME and for Application tier in $COMMN_TOP/admin/scripts/$CONTEXT_NAME

Comparison between Oracle Applications and SAP

Differentiator #1:

How many customers are on your current release?
94% of Oracle's customers run up-to-date Oracle Applications. 6% of SAP's customers run up-to-date SAP applications. Why is that? SAP's complex technology drags out implementations—and costs. Setup complexity is legendary. Once up, it lacks the agility to respond to changing business demands, plus upgrades are expensive. Perhaps you really should be asking SAP customers about their TCO—and their ROI. Had they known just how much they would end up spending on their implementation and support, very few SAP customers would have chosen SAP.

Differentiator #2:

Which standards do you support?
MySAP Business Suite, or mySAP ERP, my SAP CRM, mySAP SRM, and mySAP SCM, are all based mostly on proprietary ABAP code. If you're looking to reduce costs, collaborate, and optimize a business process, that’s not the technology that will keep your company competitive. Oracle's advanced business applications are designed to be flexible because they're based on open standards. Leading companies are tackling the complexity of their application and IT environments with Service-Oriented Architecture (SOA), which facilities the development of modular business services that can be easily integrated and reused—creating a truly flexible, adaptable IT infrastructure. But that's not the result that SAP is helping its customers achieve.

Differentiator #3:

What is your strategy for moving beyond generic ERP and acquiring deep industry expertise, products, and people who come from my industry?
SAP took an evolutionary path to updating their mySAP ERP product. Every year, they shipped a new release with more NetWeaver upgrades. This incremental move toward their mySAP ERP vision leaves customers hanging because they don't want new—and possibly unstable—code. So SAP needed to change its delivery strategy (see differentiator #4). Oracle, in contrast, continues to sharpen its industry focus by acquiring top tier companies--for example, ProfitLogic and Retek in the retail industry. In fact, the combination of Oracle, ProfitLogic, and Retek will create the retail industry's most comprehensive software solution.

Differentiator #4:

When will SAP's mySAP ERP ESA product be available?
This September, SAP revealed that they would be providing "optional" mySAP ERP 2005 "enhancements" through 2010. This caught the marketplace and SAP customers by surprise—they had expected that at the end of the SAP ESA roadmap there would be a mySAP ERP ESA-enabled release. That's not happening. Instead, the next major release of mySAP ERP will ship in 2010—a full two years behind the delivery of Oracle Fusion. SAP customers now have reason to be concerned about whether SAP will create another "new" product on the heels of the Business Process Platform. It's all deja vu: in 2002 SAP announced that R/3 Enterprise would be the last R/3 release with yearly component-based upgrades. Instead, the company released a new product in 2003: mySAP ERP. What surprise is in store for 2007? Oracle does not believe in re-licensing the installed base on new products. We continually enhance the existing platforms under Applications Unlimited, which offers lifetime support to customers. Applications Unlimited protects our customers' technology investment and creates a superior total ownership experience.

Differentiator #5:

What is your strategy for the future?
SAP's plans are vague. While they say that they offer an easier path to SOA with their new SAP Discovery System, the reality is that it takes a long time to deliver SOA applications—and SAP still has a long way to go. SAP will have to wrap old proprietary ABAP code with new SOA functionality. Independent analysts are questioning the company's ability to deliver an SOA-enabled architecture.2 Oracle has SOA today—and is committed to open standards. Once you ask the questions, the choice is clear. Only Oracle offers standards-based applications, a predictable TCO, rich industry functionality, and a commitment to open standards.

Friday, January 23, 2009

Concurrent Manager in Oracle Apps

Concurrent Manager

The concurrent managers serve important administrative functions. The concurrent managers ensure that the applications are not overwhelmed with requests, and the second areas of functions are the management of batch processing and report generation.

In The Oracle e-Business suite has three important Concurrent Managers:

Internal Concurrent Manager: The ICM (Internal Concurrent Manager) controls all of the other concurrent managers.

Standard Manager: The Standard Manager accepts any and all requests. It has no predefined specialization rules and is active all the time. It is not recommended to add specialization rules to the standard manager as it can cause problems.

Conflict Resolution Manager: The Conflict Resolution Manager resolves conflicts, such as request incompatibilities.

How to check concurrent manager running or not?

Log in to applications as System Administrator responsibility and navigate to the concurrent > manager > administration page and under the processes column if the target and actual column equal the same number (above 0) this means the managers are up and running.

How to Start / Stop Concurrent manager ?

If concurrent managers down, Use this syntax to start the concurrent managers from the command line:

adcmctl.sh start apps/

You stop the concurrent managers from the command line:

adcmctl.sh stop apps/

Location where you find adcmctl.sh scripts is $COMMN_TOP/admin/scripts/$CONTEXT_NAME/


Where the location of Concurrent Managers Log files?

The concurrent manager log files can be located in one of the following places:

1. If the environment variable $APPLCSF is set, the default location is $APPLCSF/$APPLLOG

2. If the environment variable $APPLCSF is not set, the logs go to $FND_TOP/$APPLLOG

NOTE: The default name of the concurrent manager log files is std.mgr. You can change these by setting the parameter logfile=.

Manager Log Files:

Standard manager log: w.mgr

Transaction manager log: t.mgr

Conflict Resolution manager log: c.mgr

Where: is the concurrent process id of the manager

Tuning the Internal Concurrent Manager (ICM)

The ICM performance is affected by the three important Oracle parameters PMON cycle, queue size, and sleep time.

PMON cycle - This is the number of sleep cycles that the ICM waits between the times it checks for concurrent managers failures, which defaults to 20. You should change the PMON cycle to a number lower than 20 if your concurrent managers are having problems with abnormal terminations.

Queue Size - The queue size is the number of PMON cycles that the ICM waits between checking for disabled or new concurrent managers. The default for queue size of 1 PMON cycle should be used.

Sleep Time - The sleep time parameter indicates the seconds that the ICM should wait between checking for requests that are waiting to run. The default sleep time is 60, but you can lower this number if you see you have a lot of request waiting (Pending/Normal). However, reducing this number to a very low value many cause excessive cpu utilization.

Purging Concurrent Requests

When the space in FND_CONCURRENT_PROCESSES and FND_CONCURRENT_REQUESTS exceed 50K, you can start to experience serious performance problems within your Oracle Applications. When you experience these space problems, a specific request called "Purge Concurrent Requests And/Or Manager Data" should be scheduled to run on a regular basis. This request can be configured to purge the request data from the FND tables as well as the log files and output files on accumulate on disk.

Adjusting the Concurrent Manager Cache Size

Concurrent manager performance can also be enhanced by increasing the manager cache size to be at lease twice the number of target processes. The cache size specifies the number of requests that will be cached each time the concurrent manager reads from the FND_CONCURRENT_REQUESTS table. Increasing the cache size will boost the throughput of the managers by attempting to avoid sleep time.

Analyzing Oracle Apps Dictionary Tables for High Performance

It is also very important to run the request Gather Table Statistics on these tables:

· FND_CONCURRENT_PROCESSES

· FND_CONCURRENT_PROGRAMS

· FND_CONCURRENT_REQUESTS

· FND_CONCURRENT_QUEUES.

Run the request "Analyze All Index Column Statistics" on the indexes of these tables. Since the APPLSYS user is the owner of these tables, so you can also just run the request Analyse Schema Statistics for APPLSYS.

Monitoring Pending Requests in the Concurrent Managers

You may find that requests are stacking up in the concurrent managers with a status of "pending". This can be caused by any of these conditions:

1. The concurrent managers were brought down will a request was running.

2. The database was shutdown before shutting down the concurrent managers.

3. There is a shortage of RAM memory or CPU resources.

When you get a backlog of pending requests, you can first allocate more processes to the manager that is having the problem in order to allow most of the requests to process, and then make a list of the requests that will not complete so they can be resubmitted, and cancel them.

To allocate more processes to a manager, log in as a user with the System Administrator responsibility. Navigate to Concurrent -> Manager -> Define. Increase the number in the Processes column. Also, you may not need all the concurrent managers that Oracle supplies with an Oracle Applications install, so you can save resources by identifying the unneeded managers and disabling them.

However, you can still have problems. If the request remains in a phase of RUNNING and a status of TERMINATING after allocating more processes to the manager, then shutdown the concurrent managers, kill any processes from the operating system that won't terminate, and execute the following sqlplus statement as the APPLSYS user to reset the managers in the FND_CONCURRENT_REQUESTS table:

update fnd_concurrent_requests
set status_code='X', phase_code='C'
where status_code='T';

How to find Concurrent Manager Node in Multi-Node environment ?

Method 1: SQLPLUS> select node_name from apps.fnd_nodes where support_cp='Y';

Method 2: Execute "ps -ef | grep FNDLIBR" under application User on all nodes where FND (Foundation) LIBR (Library) is executable.

Can I delete a concurrent manager?

No. You can only disable/Enable the manager by checking the 'Enabled' checkbox

How do I enable/disable the Conflict Resolution Manager?

Use the system profile option 'Concurrent: Use ICM'. Setting this to 'No' (which is the default) allows the CRM to be started. Setting it to 'Yes' causes the CRM to be shutdown and the Internal Manager (ICM) will take over the conflict resolution duties. If the CRM will not start (it is started automatically by the ICM), check this profile option. Note that using the ICM to resolve conflicts is not recommended. The CRM's sole purpose is to resolve conflicts, while the ICM has other functions to perform as well. Only set this option to 'YES' if you have a good reason to do so.

How do I clean out the Concurrent Manager tables?

Run the script, cmclean.sql, article Note 134007.1

How do we process more concurrent requests concurrently?

Login as a Sysdba and navigate ->Concurrent -> Manager -> Define and Query for the relevant concurrent manager), done in two steps: (i) Increase the Number of Target processes for the manager (ii) Change the cache size of the concurrent manager.

How to Handle hang Concurrent Request or How to Kill Concurrent Request session ?

Step 1 Mapping Concurrent request Id to Sid and serai# by using following query

select v.request_id, s.sid,s.serial#,s.event,p.spid
from apps.fnd_conc_requests_form_v v,v$process p,v$session s
where v.request_id = ‘'
and v.oracle_process_id = p.spid(+)
and p.addr = s.paddr(+)

Step 2 Execute following command and supply output from query 1

SQL> alter system kill session 'sid, serial#'

How to retrieve Summary of concurrent Jobs/status/Count in Last 1 hour?

Use following query:

select
fcpt.USER_CONCURRENT_PROGRAM_NAME,
DECODE(fcr.phase_code,
‘C’, ‘Completed’,
‘I’, ‘Inactive’,
‘P’, ‘Pending’,
‘R’, ‘Running’,
fcr.phase_code
) PHASE ,
DECODE(fcr.status_code,
‘A’, ‘Waiting’,
‘B’, ‘Resuming’,
‘C’, ‘Normal’,
‘D’, ‘Cancelled’,
‘E’, ‘Errored’,
‘F’, ‘Scheduled’,
‘G’, ‘Warning’,
‘H’, ‘On Hold’,
‘I’, ‘Normal’,
‘M’, ‘No Manager’,
‘Q’, ‘Standby’,
‘R’, ‘Normal’,
‘S’, ‘Suspended’,
‘T’, ‘Terminating’,
‘U’, ‘Disabled’,
‘W’, ‘Paused’,
‘X’, ‘Terminated’,
‘Z’, ‘Waiting’,
fcr.status_code
) STATUS,
count(*)
from apps.fnd_concurrent_programs_tl fcpt,apps.FND_CONCURRENT_REQUESTs fcr
where fcpt.CONCURRENT_PROGRAM_ID=fcr.CONCURRENT_PROGRAM_ID
and fcpt.language = USERENV(’Lang’)
and fcr.ACTUAL_START_DATE > sysdate - 1/24
group by fcpt.USER_CONCURRENT_PROGRAM_NAME,fcr.phase_code,fcr.status_code
/

Problems and Solutions:

Problems: I hit the Restart button to start the Standard manager, but it still did not start? Solution: The ICM will start Standard Manager in the next process monitor session or the next time the ICM starts. Use Activate to start a manager immediately. When a manager is deactivated manually, the ICM will not restart it, you will need to set it to Restart, or activate it manually.

Problem: When you try to submit a request like Active users or Active responsibilities, request gets submitted. When we view the requests, you find that it is inactive / nomanager. Within 12 to 15 seconds, you refresh-it gets completed.

Solution: when this occurs where a request goes "inactive/no manager" and is then processed a short time later, the solution is to either increase the cache size for your Standard manger, or increase the actual number of Standard manager processes.

HELPFUL DIAGNOSTIC SCRIPTS

The following SQL scripts located under $FND_TOP/sql are useful when diagnosing concurrent manager problems:

afimchk.sql Tells the status of the ICM and PMON method

afcmstat.sql Lists active manager processes

afrqrun.sql Lists all the running, waiting and terminating requests

afrqwait.sql Lists requests that are constrained and waiting for the ICM to release them

afrqscm.sql Prints log file name of managers that can run a given request. It can be used to check for possible errors when a request stays in pending status. It requires a request id value.

afcmcreq.sql Prints the log file name of the manager that processed the request

afrqstat.sql Summary of completed concurrent requests grouped by completion status and execution type. It requires number of days prior to today on which to report parameter.

afimlock.sql Lists locks that the ICM is waiting to get

afcmrrq.sql Lists managers that currently are running a request