Wednesday, March 2, 2011

Troubleshooting Oracle Applications Performance Issues

Troubleshooting Oracle Applications Performance Issues [ID 169935.1]


Checked for relevance on 12-JAN-2011
Troubleshooting Oracle Apps Performance Issues

Carlos Sierra
Apps Engineering CoE
Oracle Support
February 2002 (updated on 30-JUL-2003)

Purpose
Scope & Application
Problem Description
Categories of Common Tuning Issues
Certify
Statistics Gathering
Transaction Tuning
Back-End Tuning
Tech-Stack Tuning
Reporting to Oracle
Related Documents
Purpose

Practical guide in Troubleshooting Oracle Applications Performance Issues. Documents a systematic approach to gather information and files usually required to: categorize, research, troubleshoot, and eventually report to Oracle Support, an Apps Performance Issue. Documents how to use the CoE Scripts.

Scope & Application

This document has been registered as Note:169935.1. The expected audience is: Technical Analysts or DBAs involved in the process of reporting and/or solving an Apps Performance Issue. This document assumes the reader has an intermediate to advanced technical background, with a good understanding of RDBMS concepts, proficiency in SQL*Plus, and comfortable in the OS of the database server.

The main focus of this Note is on Oracle ERP Apps 11i, but references are made to earlier releases of Oracle Apps (11.0 and 10.7). Most of the techniques and tools explained can equally be used for earlier releases of Oracle Apps, as well as for the CRM modules.

This document can be used in several ways. It can be used as a check list to simply gather information and files usually requested by Oracle Support in order to report an Apps performance issue. Or it can be utilized as a process which walks the reader through common steps of the troubleshooting process of performance issues. It can also be used as a reference source of techniques and tools available to tune applications.

While following this process, you may solve your performance issue. If not, you will have gathered the standard information and files required to pursue its resolution. This document classifies the Apps Performance Issues into one of three categories. Once determined the category, it branches into the details of that respective category.

Read this document entirely before starting to react to the steps of the troubleshooting process.

Problem Description

The first step in troubleshooting any performance issue is to clearly describe the issue. Proceed to create an electronic file using any text editor, and document in detail the symptoms of the performance issue. Keep in mind that you may want to use your electronic document if you later need to report the performance issue to Oracle for further analysis. Document and differentiate factual information and user perceptions. You may want to use the templates provided in the related documents section at the bottom of this note, to start gathering your information in a well organized manner. You will first need to categorize your issue however.

Your detailed description should include, at least, the following information:

What is the application group or module affected by your performance issue? Examples: 'AP', or 'ONT and QP', or 'all manufacturing modules', 'just this Form', 'this list of transactions', etc.

Instance or instances in which it can be observed. Does it happen in Production? Development? Test? All of them? If it does not happen in all your environments, document what is different among them. Try to determine if the difference among them can be isolated. This may narrow the problem to a very specific area.

Determine if the poor performance is equally observed when the system load is either low or high. What if there is only one active user? Is it equally slow? Document if the poor performance keeps any relation to the system load, or not at all.

Is the performance issue affecting one user only? If no, document how many users are affected.

If your application is used on multiple locations: Does the location seem to affect the performance? Do all users in all locations experience the same performance? Can you state that poor performance has nothing to do with the user location?

Can you reproduce the issue systematically? Document how can the issue be systematically reproduced. If you can't, document why not. In any case, try to reproduce it systematically and document your findings.

Do you have a workaround available? What is it?

When was the last time you could complete the process or transaction without experiencing poor performance? Document what has changed since then.

Determine if any software has been installed or upgraded in your server or instance since the problem started. Include any RDBMS, Applications or 3rd party software in your analysis.

Document any patches applied recently which could have affected your performance. Include Operating System patches as well as patches from RDBMS or Apps.

Categories of common Tuning Issues

The detailed description of the performance issue should be sufficient to categorize it into one of the following 3 high-level areas. Determine which category best describe your issue. Review and document the Certify and Statistics Gathering sections below. Then proceed to the tuning section corresponding to the high-level category.

Transaction Tuning: One specific transaction denotes poor performance. It may be a Form, a Concurrent Program, or a specific operation within a Form (i.e. the click of a button, saving one row, displaying a list of values, etc.). If your issue affects more than one transaction but just a few of them, it can still be classified as transaction tuning. You may want to diagnose and document each issue separately. Transaction Tuning usually translates into SQL Tuning.

Back-End Tuning: Overall poor performance is observed, or several transactions perform poorly; usually from more than one application group. This category typically includes issues where system load has an impact in the overall performance, or it degraded after a major software upgrade. Back-End Tuning usually translates into DB Server Tuning and/or OS Tuning.

Tech-Stack Tuning: Navigation between Forms or within Forms performs poorly affecting several Forms. Opening a Form takes an unusual long time. Different performance is observed from one location to another. Some users are affected but no others. Back-End has been reviewed and ruled out. Tech-Stack Tuning is also known as Middle-Tier Tuning.

Certify

Use Certify within MetaLink to verify that your specific combination of Platform/Operating System, RDBMS Release and Oracle Applications Release, is fully certified. On MetaLink main 'Certify - Platform Selection page' select your back-end server platform. On the 'Product Group selection page', select 'E-Business Suite'. Review the General Notes. Select your combination of Apps Release (Oracle E-Business Suite Version), RDBMS Release (Oracle Server Version), and 'Certified combinations only'. Locate your OS Release in the 'Database Tiers Certifications page' and review the hotlinks under 'Additional Info' and 'Issues' columns. If there are 'Interoperability Notes' for your implementation, please review them. Under the 'Issues' hot link you may encounter a list of known Bugs and Issues affecting your particular combination of OS/RDBMS/Apps Releases. Please review the list of known Bugs and Issues carefully and document in your electronic file:

List of known Bugs and Issues according to your OS/RDBMS/Apps Releases that may relate to your performance issue.

Which of the related Bugs have been applied?

Which ones have not yet been applied? Explain why.

Note: Be aware that the list of known Bugs and Issues changes periodically. Therefore, it is a good practice to review this list of known Bugs and Issues affecting your very specific Product combination every time you need to troubleshoot a new performance issue.

Statistics Gathering

Statistics Gathering in 11i
Statistics Gathering in 11.0 and 10.7
Oracle Applications 11i and later uses the Cost Based Optimizer to generate execution plans for SQL statements. In order to generate optimal execution plans, the CBO requires updated statistics regarding your data volume and distribution. Statistics used by the CBO are stored in the data dictionary and can be queried using several available views. Oracle Applications 10.7 and 11.0 mostly use the Rule Base Optimizer. Still a handful of SQL statements from these earlier releases of Oracle Apps invoke the CBO by using embedded CBO Hints. Therefore, all Oracle Applications Releases must have current CBO statistics available for pertinent schema objects belonging to the installed Apps modules.

There are several tools available to gather CBO statistics. All of them allow to gather stats either by reading all the data on the table or index (compute method), or just a sample of the data (estimate method). For Oracle Applications there is no need to gather exact stats using the 'compute statistics' method. When gathering CBO stats you should generally use the 'estimate' method with a sample size of 10%.

Regarding the frequency of the CBO statistics gathering, the right schedule really depends on your data, based on how often it changes. Typically, gathering CBO statistics at least once per month, with an estimated sample of 10%, on all pertinent schema objects belonging to Apps installed modules, has proved to be sufficient for most clients. Some clients prefer to gather CBO statistics weekly, during a quiet system load interval. Other clients prefer to optimize the gathering of CBO stats, by scheduling the frequency and estimate sample percentage according to the current size of their tables.

In any case, if you suspect that your CBO stats may be affecting your process performing poorly, a more aggressive CBO stats gathering is usually worth attempting. Measure the performance again if you refreshed your CBO statistics for one or more schema objects accessed by your process performing poorly. Be aware that prior measurements, Traces, Trace Analyzer and TKPROF files, may become invalid.

Also keep in mind that when an object has its CBO stats refreshed, all references to that object in the shared pool or library cache become invalid, requiring a new hard parse for each SQL statement referencing the object. Therefore, in order to avoid temporarily affecting the performance of all active users in a production environment, you must refrain from gathering CBO stats during times of intensive system usage. Always schedule the CBO stats gathering during periods of time with very low system load, and when the number of active users is at its minimum. In other words: DO NOT GATHER CBO STATS WHEN NUMBER OF ACTIVE USERS IS MEDIUM TO HIGH.

Note: Try gathering stats at least once per month and with an estimate sample size of 10% for all your schema objects belonging to Apps. If you can afford gathering stats every week, do so (it is preferred, but not required). Always gather stats with no active users, or when system load is very low.

Regarding your CBO statistics gathering, document in your electronic file:

Frequency of the CBO stats gathering on the pertinent schema objects accessed by your process performing poorly (monthly, weekly, daily, etc.)

Method used (per table, per schema, all schemas, etc.)

Tool used (coe_stats.sql, FND_STATS, DBMS_STATS, ANALYZE command, DBMS_UTILITY)

Estimate sample size percentage used (or if compute method, specify so)

When was the last time the CBO stats where gathered for the affected schema objects?

Note: Using 8i, never gather CBO statistics for data dictionary objects owned by user 'SYS'. The only exception is the table DUAL owned by SYS, for which FND_STATS gathers stats when executed for one or all schemas.

Statistics Gathering in 11i

From all the tools available, Oracle Apps 11i mandates the exclusive use of the FND_STATS package to gather the CBO stats. This package can be invoked either from a seeded Concurrent Program, or directly from SQL*Plus. When invoked using the seeded Concurrent Programs, use only the 'Gather Schema Statistics' or the 'Gather Table Statistics'.

When using the 'Gathering Schema Statistics' concurrent program, pass only the schema name parameter. Let the other parameters default automatically. The schema name passed can be a specific schema or 'ALL' if you prefer to gather CBO stats for the pertinent objects belonging to all Apps installed modules, using the estimate method with a sample size of 10% (default). Be aware this process may take several hours to complete.

When using the 'Gather Table Statistics' concurrent program, pass only the owner of the table (schema name) and the table name. Let all other parameters default automatically, except when the table has been partitioned. When gathering CBO stats for a partitioned table, pass 'PARTITION' in the Granularity parameter, otherwise FND_STATS will calculate global stats (plus partition stats) instead of rolling up the global stats from the partitions. If this happens, you may have to delete the global stats (with cascade equals 'false') and gather the stats for one partition to once again enable the automatic rolling up into the global stats.

To execute the corresponding FND_STATS procedures from SQL*Plus to gather CBO stats for one or all schemas, or for a particular table, use the following examples:

# sqlplus apps/
SQL> exec fnd_stats.gather_schema_statistics('MRP'); <- One schema
SQL> exec fnd_stats.gather_schema_statistics('ALL'); <- All schemas
SQL> exec fnd_stats.gather_table_stats('MRP','MRP_FORECAST_DATES'); <- One table
SQL> begin <- Partitioned table
2 fnd_stats.gather_table_stats(ownname => 'APPLSYS',
3 tabname => 'WF_ITEM_ACTIVITY_STATUSES',
4 granularity => 'PARTITION');
5 end;
6 /
There is also a public script available that may help you automate the CBO statistics gathering. This is the coe_stats.sql script, included and documented in Note:156968.1. The coe_stats.sql script uses the FND_STATS package and schedules the CBO stats gathering according to table sizes. It uses the estimate method with a variable sample size based also on table size. It gathers stats more accurately for small tables (larger sample percent) and uses a smaller sample size percent for larger tables. The main benefit of this script is that it has the potential to reduce the overall CBO stats gathering execution time without sacrificing stats accuracy. If your total CBO stats gathering time for all pertinent schema objects is acceptable using plain FND_STATS procedures, then there is no need to explore using the coe_stats.sql script. In the other hand, if yours is a 24x7 operation and you need to minimize the window to gather CBO stats, consider using the coe_stats.sql script.

If you are not confident of the current status of your overall CBO stats in your Apps 11i instance, download and execute the bde_last_analyzed.sql script from Note:163208.1. This script reports the current status of the CBO stats for all schema objects owned by Apps installed modules. It summarizes by schema name (application group) and by date, where at least one schema object got its stats refreshed. It warns you of possible erroneous stats gathering on schema objects owned by SYS. It also reports and warns on partitioned tables which global and partition level stats are out of sync. You can execute this bde_last_analyzed.sql script at any time. By reviewing the summary page at the beginning of the report produced, you can quickly get the status of the CBO stats on your instance.

Statistics Gathering in 11.0 and 10.7

For earlier Releases of Oracle Applications you can use any tool available to gather CBO statistics. The recommended tool is the DBMS_STATS package, documented in the corresponding 'Supplied PL/SQL Packages Reference' manual for your RDBMS Release. The FND_STATS package did not exist on 11.0 or 10.7, but it is available through back-port patch for Bug 1268797. If you don't have to have FND_STATS installed on your 11.0 or 10.7 instance, use DBMS_STATS instead.

Besides the DBMS_STATS package, the ANALYZE command documented in the 'SQL Reference' manual corresponding to your RDBMS Release can also be used on 11.0 and 10.7, as well as the DBMS_UTILITY package.

Transaction Tuning

Data Gathering
Researching
Initial Troubleshooting
Apps 11i init.ora parameters
Advanced Troubleshooting
Once you have validated Certify and Statistics Gathering, proceed with this next section if your performance issue qualifies as this high-level tuning category.

Data Gathering (files and information)

Gather the indicated files and document in your electronic file the following information:

How long does it take for the process to complete (specify hours/mins/secs)?

How long did it previously take (before having the performance issue)?

What is the expected performance for this process (specify hours/mins/secs)?

If you have any customization related to this process, document it in your electronic file, in full detail.

Determine module information requested below, for specific Form, Report, Package, Main Pro*C, etc.

Module internal name (short name): For a Form, use the menu to find the short name and version. For a concurrent program, use the 'Concurrent Program Define' Form from the SYSADMIN responsibility to find short and long name.

Module title (descriptive or long name): For a Form, use the navigation path or the title displayed in the Form.

Module version: For a concurrent program in UNIX, navigate to directory (i.e. $AP_TOP/reports or $PO_TOP/bin) and use strings command:

# strings -a | grep -i '$Header'
Latest version available according to MetaLink: Use 'Patches' option on MetaLink main menu.

Current patchset level for application group owning the affected module: Ask your System Administrator or DBA.

Latest patchset available according to MetaLink for the application group: Use 'Patches' option on MetaLink main menu.

Note: If you find that you have an old version of the module, be aware that quite often a newer version of it may fix a known performance issue. This may be true even if you don't find a direct hit in the list of issues fixed between your version and the latest version. If possible, upgrade the affected module to the latest version available. Also be aware that in many cases, due to intricate file dependencies, Oracle Development requires you have the latest version of the module applied, in order to troubleshoot a new issue.

When the affected module is a Pro*C program, generate a text file with the list of modules (components) linked to the Pro*C program. Use this or similar command:
# strings -a | grep -i '$Header' > MODULES.TXT
On a multi-org environment, determine the ORG_ID used while monitoring the performance of the affected module. This ORG_ID or Operating Unit is usually required to later execute an isolated SQL statement performing poorly, using SQL*Plus. If you don't know the ORG_ID, use this command to produce a list of Operating Units, and determine the ORG_ID from the list:
SQL> select organization_id org_id, name from hr_operating_units;
If your transaction performing poorly is a Concurrent Program, determine if your application group provides a Profile Option to turn ON and OFF some sort of debugging information, if it does, execute your Concurrent Process with debugging information turned ON and recover the Log file generated (this is in addition to the Trace file requested below). Review your Log file.

If yours is a Concurrent Program, document in your electronic file all the parameters requested by the execution of your process, indicating which values you passed, including which values were left NULL, or automatically defaulted. Include all parameter names and values. Keep in mind that the number, name, or order of the parameters may change from one version of the module to the next.

For online transactions, document in your electronic file, in full detail, the complete navigation path, as well as step-by-step instructions to reproduce your issue. If the transaction performing poorly is a query, document which parameters are passed to the query, as well as, which parameters are NULL, or automatically defaulted. Be as specific as possible.

If your transaction has been running for several hours or days, and you did not turn SQL Trace at the beginning of it, you can still capture the expensive SQL statements for further analysis. Download, familiarize yourself, and execute the bde_session.sql script (Note:169630.1) and/or the SQLAREAT.SQL script (Note:238684.1 for 8.1 and Note:163209.1 for 8.0). These scripts can be executed even a few minutes after the process has been killed. The former requires the session_id, the latter has no parameters.

All Apps Transaction Tuning issues require, at the very least, one raw SQL Trace. If tracing a Form, turn Trace ON using the menu (Help → Diagnostics → Trace → Trace with Binds and Waits), and set the trace size to unlimited (Help → Diagnostics → Trace → Unlimited Trace File Size). If tracing a Concurrent Program, use whatever method is available for your Apps Release (usually a check box at the Concurrent Program Define Form). Under some specific conditions, Oracle Development requires a raw SQL Trace generated with Event 10046 (Trace with Binds and Waits). If you can provide that special Trace up front, it helps to expedite the whole process. Once you generate the raw SQL Trace (standard for Concurrent Programs, or with Event 10046 for any Form), compress it and have it available in case you have to provide it to Oracle Support. This file is usually large. Traces are found in the 'user_dump_dest' directory.

Note: It is common to iterate in this step because the raw SQL Trace generated does not have statistics turned ON, or because it was truncated due to its size. To avoid this unnecessary loop in the process, verify these two init.ora parameters settings: 'timed_statistics' set to TRUE, and 'max_dump_file_size' set to UNLIMITED. On the other hand, if your process 'hangs' and you killed it, be aware that even an incomplete raw SQL Trace may be useful to pin-point the SQL Statement(s) performing poorly.

If you created a Trace with Binds and Waits, use the Trace Analyzer tool (Note:224270.1) to analyze your Trace. This tool, when used on the same db instance where the Trace was generated, produces a comprehensive report that can be used to identify expensive SQL in terms of service and/or wait times.

# sqlplus apps/ SQL> START TRCANLZR.sql UDUMP prod_ora_9105.trc;
For all Apps Transaction Tuning issues, generate and be ready to provide to Oracle Support, one TKPROF file generated with the Explain Plan option. TKPROF reports must be generated on the same db instance where the raw SQL Trace was created. If you had to kill the process because it never completed, don't destroy the raw SQL Trace generated, proceed to create a TKPROF from it as well. To generate one TKPROF, unsorted, and with Explain Plan, use this syntax:
# tkprof 12345.trc 12345.prf explain=apps/
Note: Read the TKPROF and determine if it corresponds to the transaction performing poorly. Providing to Oracle a TKPROF which does not correspond to the problematic transaction is very common, and it causes unnecessary delays in the resolution of performance issues. In the TKPROF, you should recognize table names and possibly the transaction. The total TKPROF Elapsed Time should be close to the 'user' Elapsed Time.

Researching

At this point, you can pursue your performance issue with Oracle Support. Provide as many of the requested files as possible. Or, you may opt to participate more pro-actively in the research phase by performing the following steps before contacting Oracle Support:

Use the Trace Analyzer and/or TKPROF file(s) to find the expensive SQL statements. In most cases you want to focus your attention in those SQL statements causing more than 5 to 20% of the overall logical reads or elapsed time totals (summarized in the first page of the Trace Analyzer report, or the last page of the TKPROF). If you are using the Trace Analyzer, you may also want to review SQL statements with large non-idle wait times.

Document in your electronic file the most expensive SQL statement(s) found. Include from the Trace Analyzer or TKPROF the block showing the SQL statement; the block showing the parse, execute and fetch statistics for the SQL statement; and the block that shows the Explain Plan for it.

For each expensive SQL statement (in most cases it is just one), search on MetaLink for known issues. Review the SQL statement and grab from it significant and not-so-common columns to make your search criteria as selective as possible. Take pieces from the FROM clause and the WHERE clause. Be aware that you may be experiencing a performance issue already reported by another customer and for which either a fix or a workaround exists. While doing your search on MetaLink, you may want to use also the short name of the module (Form or Concurrent Program).

Document in your electronic file all MetaLink hits regarding your poorly performing SQL statement(s). Even if they seem to be unrelated or never fixed.

Initial Troubleshooting

If you decide to be pro-active in the initial troubleshooting phase, perform the following steps for each SQL statement identified from the Trace Analyzer or TKPROF as expensive (according to the number of logical reads performed, or according to the elapsed time for its complete execution, or the non-idle wait time). Start with the very most expensive SQL statement that is not a BEGIN procedure or data dictionary recursive SQL. In other words, focus only on DML commands (SELECT, UPDATE, INSERT or DELETE) accessing Apps tables and indexes.

Note: If the most expensive statement in your Trace Analyzer or TKPROF is NOT a DML command (SELECT, UPDATE, INSERT or DELETE), in other words, it is a PL/SQL library call, use the profiler.sql script from Note:243755.1.

Create a flat file (text type) pasting the DML command (SQL statement) directly from the Trace Analyzer or TKPROF report. Leave one and only one blank line at the end of the SQL statement. Do not leave the statement without a single blank line at the end, and do not include more than one blank line at the end. This is required by the SQLTXPLAIN.SQL or coe_xplain_xx.sql scripts. Create your first flat file with the name of sql1.txt, the second with sql2.txt and so on. The SQLTXPLAIN.SQL and coe_xplain_xx.sql scripts can handle any file name, but the standard is sql.txt. Bind variables (those with colons, i.e. ':b1',':2') should be left intact. And you should not have a semicolon ';' at the end of your SQL statement.

For RDBMS Release 8.1 or later, download script SQLTXPLAIN.SQL from Note:215187.1. For 8.0 download coe_xplain_80.sql from Note:156959.1. And for 7.3 download coe_xplain_73.sql from Note:156960.1. Read the downloaded version of the script and familiarize yourself with it.

Place your SQLTXPLAIN.SQL set of files or your coe_xplain_xx.sql script and your sql.txt file(s) into a dedicated directory.

Execute SQLTXPLAIN.SQL or coe_xplain_xx.sql script from SQL*Plus connecting as apps/apps_pwd, passing as the inline parameter the name of the file containing your SQL statement sql.txt as indicated by the instructions on the corresponding script (see commands below). The SQLTXPLAIN.SQL or coe_xplain_xx.sql script will not execute your SQL statement included into sql.txt. They just parse your SQL statement and proceed to explode it into pieces for a detailed analysis.

SQL> start SQLTXPLAIN.SQL sql.txt
SQL> start coe_xplain_xx.sql sql.txt
If you need to provide to Oracle Support the output of the SQLTXPLAIN.SQL or coe_xplain_xx.sql scripts, compress and send the whole directory with all spool files within it.

From the Trace Analyzer or TKPROF, and from the spool file created by the SQLTXPLAIN.SQL or coe_xplain_xx.sql script, determine and compare the Optimizer used. It should be consistent. Document in your electronic file which Optimizer is being used: Rule Based - RBO or Cost Based - CBO.

If using CBO, good statistics of the schema objects accessed are crucial to generate an optimal execution plan. Locate in your spool file the column 'Last Analyzed'. This column tells you when you last gathered stats for each table accessed by your SQL statement. (You can do the same to review all indexes). Look also at the column that reads 'Delta Percent' to determine gap between actual number of rows in your tables (dynamically calculated with COUNT function) and the number of rows recorded in your data dictionary as part of the CBO stats for your tables accessed by your SQL statement. If your stats for the schema objects accessed by your SQL statement are more than one month old, or the gap reported under the 'delta percent' column is more then 10%, you need to gather fresh stats for your affected schema objects.

Only for CBO: If you determine that some or all the schema objects accessed by your SQL statement require refreshed stats, you must use the appropriate tool to gather stats according to your Apps Release. If your Apps Release is 11i, you may want to use the SQLTGSTATS.SQL script included in the SQLT.zip file.

Only for CBO: If you had to refresh stats, execute the SQLTXPLAIN.SQL or coe_xplain_xx.sql script again to produce a new Explain Plan. If the Explain Plan changed, measure again the performance of your original transaction, as it may have changed as well.

If you are using CBO, are on 8.1 or later, and have only identified one expensive SQL statement, there are two files that you want to recover and have available for Oracle Support. Be aware that second file is Binary, therefore you must copy across servers as such.

Find in 'user_dump_dest' directory a raw SQL Trace generated by the SQLTXPLAIN.SQL script automatically. This raw SQL Trace file is completely unrelated to the first raw SQL Trace file you generated when executing your original transaction. If SQLTXPLAIN.SQL was executed using SQL*Plus on the db server, the raw SQL Trace generated by it may had been already copied into the same dedicated directory from which the script was executed.

Generate Binary file SQLT.dmp with your CBO statistics for affected objects, by executing Export command (exp) as per INSTRUCTIONS.TXT included in SQLT.zip. Use command below. Execute export using ORACLE_HOME 8.0.6.

# exp apps/ file=SQLT tables='SQLT$STATTAB'
If you have a vanilla instance, or one in which the same transaction performs fine, follow the same steps to reproduce the Explain Plan, and compare them to verify that you can produce the same Explain Plan in both instances. If not, focus first on indexes. If you find index discrepancies among instances, solve such discrepancies.

If you are using RBO and see in your Explain Plan that a custom index is being accessed, drop the custom index and measure the performance again. Be aware that once you drop an index being accessed according to the Explain Plan, all prior measurements and files become invalid. The Explain Plan will change, as well as the performance.

If on an 11i instance you notice that your SQL statement makes references to Apps Views, find corresponding view definitions in the spool file created by the SQLTXPLAIN.SQL script. You may optionally execute the coe_view.sql to generate scripts which can be used later to clone your views from one instance into another. Be aware there may exist several versions of the same view depending on the version of the corresponding ODF file used to create the view. You can use the syntax of the command below to search from the corresponding APPL_TOP for the specific ODF file that creates a view. Once you know the file and find its version, you can search on MetaLink for newer versions:

# find . -type f -exec grep -i "CZ_COMPONENT_SELECTIONS_V" {} \; -print
If on an 11i instance, you may want to ensure all required and recommended init.ora parameters for 11i are set correctly. Since you already have at least one SQLTXPLAIN.SQL or coe_xplain_xx.sql report, near the end of them you will find a list of init.ora parameters affecting the behavior of the CBO. The init.ora parameters required for your Apps Release are clearly identified. If necessary, fix any parameter showing an incorrect setting, and repeat your test.

Apps 11i init.ora parameters

Development has provided an official list under Note:216205.1.

You may optionally download the bde_chk_cbo.sql script from Note:174605.1. This script allows to quickly validate all database initialization parameters according to Note:216205.1. This script includes which EVENTs must be set or unset for Oracle Apps 11i as well.

Advanced Troubleshooting

This phase requires special skills, and at this point most performance issues are raised to Oracle Support. If you are proficient in SQL*Plus and you understand the Explain Plan, you may want to review this section; otherwise collect the requested files and provide them to Oracle Support.

Fully read the output of the SQLTXPLAIN.SQL or coe_xplain_xx.sql script and make sense of the Explain Plan and all related information. Familiarize yourself with this report and make a sanity check on its contents.

To proceed with this phase, you need to prepare a tuning environment. This tuning environment can be located on the same instance on which the performance issue is observed, or it can be on a different instance. If the issue is observed in a Production instance, try to set the tuning environment on the Test or Development instances. Tune on the Production instance only when you have failed to reproduce the issue on a non-production environment. Reproducing an issue does not necessarily mean reproducing its performance. In most cases it is sufficient to reproduce the same 'bad' Explain Plan, rather than the slow access itself.

In general, a good tuning environment is one in which you can perform the following two independent activities at will. You may end up with two tuning environments, one for each activity.

Reproduce the exact same Explain Plan from original version of SQL statement.

Execute the expensive SQL statement in its original version and on several different 'modified' versions (hopefully improved).

Reproducing the exact same Explain Plan on a different instance usually represents a significant challenge, as the CBO decides the plan based on: CBO statistics, init.ora parameters, schema object attributes, RDBMS Release, and in a very few cases, in the Platform used. The latter is particularly true when hitting a platform specific OS or RDBMS Bug. With RBO, reproducing the same explain plan is much easier, since it depends mostly on the schema objects defined and accessed. Therefore, this advanced troubleshooting phase relates mostly to issues regarding the CBO.

The focus of the tuning effort is usually in or around the Explain Plan Operation with the largest number of rows, according to the Explain Plan from the Trace Analyzer or TKPROF report. If the column 'Rows' on the Explain Plan from the Trace Analyzer or TKPROF report shows all zeroes (meaning zeroes for all Operations), then it is almost indispensable to isolate the SQL statement, identify, define and assign the values of the bind variables, and execute from SQL*Plus with SQL Trace enabled. Then create a new Trace Analyzer or TKPROF from new raw SQL Trace. The new Trace Analyzer or TKPROF will have the Rows column of the Explain Plan populated. This relates to how SQL*Plus handles cursors compared to other tools. The cursor must be closed in order to get the number of rows column in the Explain Plan, and SQL*Plus keeps open one cursor at a time, forcing the closure of the prior cursor.

To reproduce the exact same Explain Plan from original version of SQL statement, try the following:

Copy the CBO statistics from the source instance (where the SQL performs poorly) into the destination instance (tuning environment):

When you ran the SQLTXPLAIN.SQL on the source instance, it updated a staging table SQLT$STATTAB with the CBO stats for all schema objects related to the SQL statement (tables, indexes, columns and histograms).

Use the Export command on the source instance, according to the INSTRUCTIONS.TXT file provided inside the SQLT.zip file. Generate an external binary file SQLT.dmp with the following command:

# exp apps/ file=SQLT tables='SQLT$STATTAB'
Copy this binary file from source to destination instance. Do not use ASCII. Treat always as BINARY.

Use the Import command on destination instance, as documented on the SQLTSTATTAB.SQL script, also included inside the SQLT.zip file.

#imp apps/ file=SQLT tables='SQLT$STATTAB' ignore=y
Execute script SQLTSTATTAB.SQL on the destination instance to update the data dictionary CBO stats from imported SQLT$STATTAB table.

Note: To restore the stats in the destination instance, simply gather new stats for affected schema objects. You may also want to use the SQLTGSTATS.SQL script included in the SQLT.zip file. This means you don't need to backup CBO stats on destination instance prior to overriding them with stats from source instance.

Review and compare the init.ora parameters files from source and destination instances. If these instances are Production and Test, you may have the exact same parameters. If not, annotate the differences in case you have to adjust the CBO relevant parameters in the destination instance. You don't have to take action right away, as you may produce the same Explain Plan without changing any init.ora parameter. Even if you adjust an init.ora parameter, you may be able to do so with an ALTER SESSION command for most of them, instead of modifying the init.ora file and bouncing the database altogether.

Review and compare schema object attributes such as 'Partitioned' and Parallel 'Degree'. If you find discrepancies, sync them up.

Annotate the RDBMS Release version (up to the fifth digit), as well as the Platform. You must be at least on the same RDBMS Release up to the 3rd digit before trying to reproduce the same Explain Plan. It would be better, if you are on sync up to the 4th digit.

Now try, using the SQLTXPLAIN.SQL script, to generate the same Explain Plan in source and destination. If you don't get the same Explain Plan, adjust CBO related init.ora parameters in destination and try again (use ALTER SESSION if parameter allows). If you still cannot obtain the same Explain Plan using common CBO stats, init.ora parameters, and schema object attributes, try then ruling out differences among the source and destination instances (one at a time). Determine what is different between source and destination instances. Focus on the discrepancies that may be causing the 'bad' Explain Plan (assuming the plan on destination instance performs better, of course), and rule them out (one by one) until you find which of the discrepancies causes the Explain Plan to switch from 'good' to 'bad'.

Note: In most cases, finding the root cause of a ' bad' Explain Plan, is the same than finding the solution to the performance issue.

If you find yourself in a situation in which CBO stats, schema object attributes, and init.ora, are all the same, but Platform and RDBMS Release are different, and instance in which RDBMS is newer performs better, you can be almost certain that upgrading the RDBMS engine will solve your performance issue.

If you have the same CBO stats, schema object attributes, init.ora and Platform, and only RDBMS Release is different, and the instance with the newer Release performs better, try to upgrade your RDBMS Release on the older instance.

If you, or Oracle Support, can reproduce the same 'bad' Explain Plan on the same or different Platform (common up to the 3rd digit RDBMS Release), using your CBO stats, most likely your issue is an Application Bug. In such case, the issue needs to be reported to Oracle Development and you will be given a new Bug number.

Once your performance issue has been cataloged as a new Application Bug, the next steps in the troubleshooting process require to explain and execute the SQL statement in its original form and on several different modified versions, trying to create one execution plan delivering a better performance.

Note: If you have two similar instances. One performing well and the other poorly, and they have similar data but producing different Explain Plans, as a workaround you can force the 'good' plan into the slow instance by migrating the CBO stats using SQLTXPLAIN.SQL together with SQLTSTATTAB.SQL.

To execute the expensive SQL statement in its original version and on several different modified versions, try the following:

You need to be able to isolate the expensive SQL statement for execution from SQL*Plus, at will. To do this, you need first to find the values of the bind variables referenced. If you can deduce the values by reviewing the SQL statement, do so. Otherwise, you might have to use one of the methods available for tracing with bind variables according to Note:171647.1, and then use the Trace Analyzer (Note:224270.1) to process the raw SQL Trace and identify the bind variables from your raw SQL Trace created with Event 10046 on your transaction.

Assign the values of the bind variables referenced in the SQL statement. Be careful conserving the same data types. You may need to define and assign values to bind variables. Avoid replacing bind variables with literals.

If your Explain Plan shows any table with suffix '_ALL', this means you need to set up the multi-org environment. Using the corresponding Operating Unit (ORG_ID), set multi-org with this command:

SQL> exec fnd_client_info.set_org_context('&org_id');
Use ALTER SESSION commands to turn SQL_TRACE ON and OFF, and execute your SQL statement. To facilitate the whole process, you may want to create a script with the setting of multi-org, the 'ALTER SESSION SET SQL_TRACE = TRUE;' command, the assignment of the bind variable values, your SQL statement, and the command to terminate the SQL Trace. This way you can execute the SQL statement systematically.

For INSERT, UPDATE or DELETE SQL statements, you need to focus on the subquery performing poorly (usually the main query feeding the insert/update/delete). Transform the original SQL into an isolated stand-alone query. If this is not possible, add the ROLLBACK command to the script with your INSERT, UPDATE or DELETE SQL statement.

Tuning the SQL statement requires a lot of practice and patience. All methods converge to the same principle: apply your knowledge to create a modified and improved version of the original SQL statement and determine if it performs better for every situation. Some analysts mostly use the Explain Plan leaving the benchmark of a candidate to the end. Others prefer to execute and measure the performance of each candidate (modified SQL statement). It becomes a matter of style at this level.

While iterating in this process, generating explain plans for several versions of the same SQL statement, you can use the SQLTX.SQL script (included in SQLT.zip), or the bde_x.sql script from Note:174603.1. The latter script generates a very simple Explain Plan and their execution is faster than complex SQLTXPLAIN.SQL.

Things to try in order to improve the Explain Plan and ultimately the performance of the SQL statement:

Verify all tables referenced in the FROM clause are actually joined in the WHERE clause.

Improve CBO stats, either by using a higher sample size or with histograms for columns that are filtered with literals in the WHERE clause. You can also temporarily modify the CBO stats for an index or column (only as a short term workaround).

Indexes with better selectivity for specific filter or join conditions. These indexes may ultimately be custom indexes.

Switch the optimizer from RBO to CBO, or from CBO to RBO. The latter as a temp solution only.

Use one or more CBO Hints.

Rewording the SQL statement.

Avoid overuse of UNION, ORDER BY, DISTINCT and other clauses that may not be necessary.

Using dynamic SQL to avoid poorly written code with functions like NVL or DECODE in the WHERE clause, which may affect the selectivity of the predicates.

If the SQL statement has been fully tuned, and the reason of the poor performance is purely the volume of data necessarily retrieved, then you may want to consider data partitioning or parallel query. Keep in mind that data partitioning or parallel processing are not the right solution to fix a poorly tuned SQL.

Back-end Tuning

Once you have validated Certify and Statistics Gathering, proceed with this section if your performance issue qualifies as this high-level tuning category.

Data Gathering
Initial Troubleshooting
Advanced Troubleshooting
Data Gathering (files and information)

Gather the indicated files and document in your electronic file the following information:

Architecture information: Basically how are the database server and the middle-tier configured? Are they in the same box? If not, how many boxes you have? Which type? etc. Try answering: Where do you have what?

Hardware Profile: CPU(s) number, type and speed. Amount of memory. How is the I/O subsystem configured? What is the network type and speed? etc. Provide high-level information of your hardware and components.

Server workload profile: What do you have running on same box? Databases in use on same server. Number of concurrent active users. Number of concurrent active processes at a given time (usually peak times). Basically, how busy is your box.

Do other applications or databases you may have running in the same box also perform poorly? If not, explain.

What is the current and projected system load? What is the current vs. projected number of active concurrent users. Same for active concurrent processes.

What are the concurrent processing policies? Have you moved as much of the concurrent processing to lower online user activity periods? Do you have any restrictions to concurrent processing at all? Do you use concurrent managers to restrict this intensive processing activities during the day?

Have you validated any Operating System resource contention? This includes CPU, memory and disk. Your comments should take into consideration all your boxes (back-end and middle-tier). Validate and document if you are experiencing CPU spikes, memory paging, hot disks, etc. If you have noticed memory swapping, document in detail, as well as any action being taken, including short-term actions like borrowing hardware from Development or Test servers.

Make a list of all application modules (application groups), installed and in use on this Apps instance. Example: AP, GL, FND, ONT, etc.

For the application modules (groups) affected by poor performance, document currently installed patchset level.

For same affected application modules, research on MetaLink and document in your electronic file what is the latest patchset available. Use the 'Patches' option on MetaLink main menu. Document if you can upgrade to latest patchset levels shortly.

What is the Operating System patching level in your server box? Try to rule out any known performance issues on your hardware platform. In general, try to keep your OS patching level as current as possible. It is known that several overall performance issues are caused by inadequate OS patching level. Consult your hardware vendor in this regard.

If you have any prior Performance related Report with specific recommendations regarding hardware, configuration sizing, benchmark, stress test or similar, include the report in your electronic documentation of your performance issue and provide it to Oracle Support. This includes any formal or informal recommendations made by any Oracle or 3rd party entity. Especially important if you are considering or in the process of implementing such recommendations.

Review init.ora parameters file doing a sanity check on it, and have it ready to make it available to Oracle Support. If you find that some Events are set in this file, determine if there is a strong valid reason why. If none, delete them. If your init.ora file references another file by using the command IFILE, review the referenced file and have it available as well.

Review ALERT.LOG for possible server errors or any other evident abnormalities. If the ALERT.LOG is large, have the last 48 hours of it available for Oracle Support. Be sure the ALERT.LOG includes the monitored interval where the performance was poor.

Make file APPLPTCH.TXT available to Oracle Support. This file keeps track of patches applied to Apps.

Identify up to the top 10 user transactions performing poorly. This transactions are usually what is causing your users to complain of the poor performance in the first place. Examples: entering an order, saving a line, performing a query, etc. Document for each of this up to 10 'critical' user transactions:

Transaction name or short description. Example: booking an order

Performance during normal system load (secs/mins)

Expected performance (secs/mins)

Performance when system load is almost zero (when only one or very few users are active on instance)

Initial Troubleshooting

At this point, you can pursue your performance issue with Oracle Support. Provide as many of the requested files as possible. Or, you may opt to participate more pro-actively in the initial troubleshooting phase by performing the steps in this section before contacting Oracle Support.

For 11i instances: Verify required and recommended init.ora parameters are set correctly. Use the provided script AFCHKCBO.sql and Interoperability Notes as well. Generate the AFCHKCBO.TXT file containing the Apps 11i required init.ora parameters names and values. Make this file available to Oracle Support. Fix any discrepancy, and document possible reason why 'current' and 'required' columns don't have the same value. If the AFCHKCBO.sql script and the Interoperability Notes require different values, set the values of the Note. To execute the script use the syntax below:
# sqlplus apps/
SQL> SPOOL AFCHKCBO.TXT;
SQL> start $FND_TOP/sql/AFCHKCBO.sql
SQL> SPOOL OFF;
SQL> QUIT;
For 11i instances: There is another script that validates all required and recommended init.ora parameters according to RDBMS Release. Use script bde_chk_cbo.sql from Note:174605.1 as an extension to AFCHKCBO.sql. Be aware that script bde_chk_cbo.sql provides more detail than AFCHKCBO.sql.

For 11i instances: Verify CBO statistics by executing the bde_last_analyzed.sql script from Note:163208.1. This script reports CBO stats per application group (schema name) and per date. It also creates a summary at the beginning indicating how old the CBO stats are, if data dictionary objects are free of CBO stats, and if you have partitioned tables requiring you fix their global stats. Review BDE_LAST_ANALYZED.TXT reports and make them available to Oracle Support.

For 10.7 and 11.0 instances: Verify you are gathering your CBO stats at least one per month, all schema objects, with an estimate of 10%

For 8.0 and later: when the system is performing poorly, take one snapshot of the SQL area, to easily identify if there is any evident expensive SQL being executed, or recently executed. For 8.1 and later, use SQLTAREAT.SQL from Note:238684.1. For 8.0 use coe_sqlarea_80.sql from Note:163209.1. Read and get yourself familiarized with the specific version of SQLTAREAT.SQL script and its output. Compress the whole directory which contains the SQLAREAT.SQL generated spool file(s).

Advanced Troubleshooting

This phase is not complex, but it requires you to invest more time initially, monitoring the performance of your instance for up to one working day. Therefore, you may want to proceed to reporting to Oracle Support your overall bad performance issue at this time. Once your issue has been reported, proceed immediately with this advanced troubleshooting phase, in order to quickly generate the necessary files to pursue a final resolution.

For 7.3 and 8.0: Generate and provide at least one REPORT.TXT file from UTL scripts 'ULTBSTAT/UTLESTAT'. Your DBA should be familiar with these common performance monitoring scripts.

For 8.1 and later: Install the latest version available of the StatsPack package. This package is automatically available on 8.1, but it requires it be installed from its location at $ORACLE_HOME/rdbms/admin into the database (as any other package). Look for detailed instructions in the document spdoc.txt within the same directory. Your DBA should already either be familiar with this package, or get familiar with it since it replaces former UTL scripts 'ULTBSTAT/UTLESTAT'. Read Note:153507.1 for more information on StatsPack for Oracle Apps. Once installed, monitor poor performance during 4-8 hours, taking snapshots every 30 mins during the whole monitored interval (4-8 hours). Then generate one or more StatsPack Report based on the snapshots while performance was worse (usually between 1 and 2 hours within the 4-8 hours monitored interval). Provide these reports to Oracle Support.

For all RDBMS Releases, monitor OS performance at the same time database performance is monitored. For 8.1 and later, every 30 mins during the whole monitored interval (4-8 hours). For 7.3 and 8.0, every 30 mins during the same interval of 'ULTBSTAT/UTLESTAT' execution. Use standard OS performance monitoring tools like: vmstat, iostat, mpstat and top.

If there is an obvious resource contention in your OS, stop here and try to alleviate it with permanent or temporary actions at the OS level.

Have your DBA read and analyze your ULTBSTAT/UTLESTAT or StatsPack Report. Search on MetaLink for possible known issues with the same characteristics.

If you opt to be pro-active reducing the number of performance issues due to known problems, keep your code as recent as possible, starting by the OS and moving towards RDBMS, leaving Apps code last. Upgrading the OS software is usually painless, the RDBMS requires minor testing, and the Apps layer requires significant user testing.

Provide all your gathered files, performance template, and dial-in to Oracle Support. Familiarize yourself with Oracle Direct Connect ODC

Tech-Stack Tuning

Once you have validated Certify and Statistics Gathering, proceed with this section if your performance issue qualifies as this high-level tuning category.

Data Gathering (files and information)

Gather the indicated files and document in your electronic file the following information:

How long does it take for the process to complete (specify hours/mins/secs)?

How long did it use to take (before having the performance issue)?

What is the expected performance for this process (specify hours/mins/secs)?

Architecture information: Basically how are the database server and the middle-tier configured? Are they in the same box? If not, how many boxes you have? Which type? etc. Try answering: Where do you have what?

Hardware Profile: CPU(s) number, type and speed. Amount of memory. How is the I/O subsystem configured? What is the network type and speed? etc. Provide high-level information of your hardware and components.

Server workload profile: What do you have running on same box? Databases in use on same server. Number of concurrent active users. Number of concurrent active processes at a given time (usually peak times). Basically, how busy is your box.

Do other applications or databases you have running on the same box also perform poorly? If no, explain.

Do other applications running on the same client also perform poorly? If no, explain.

If the issue relates to slowness in loading a Form or navigating, does it reproduce when the client is connected directly to the network hub closest to the server?

What is the current and projected system load? What is the current vs. projected number of active concurrent users. Same for active concurrent processes.

What are the concurrent processing policies? Have you moved as much of the concurrent processing to lower online user activity periods? Do you have any restrictions to concurrent processing at all? Do you use concurrent managers to restrict this intensive processing activities during the day?

Have you validated any Operating System resource contention? This includes CPU, memory and disk. Your comments should take into consideration all your boxes (back-end and middle-tier). Validate and document if you are experiencing CPU spikes, memory paging, hot disks, etc. If you have noticed memory swapping, document in detail as well as any action being taken, including short-term actions like borrowing hardware from Development or Test servers.

Make a list of all application modules (application groups), installed and in use on this Apps instance. Example: AP, GL, FND, ONT, etc.

For the application modules (groups) affected by poor performance, document the currently installed patchset level.

For the same affected application modules, research on MetaLink and document in your electronic file what is the latest patchset available. Use 'Patches' option on MetaLink main menu. Document if you can upgrade to latest patchset levels shortly.

What is the Oracle Forms Release version?

Which is the JINITIATOR version?

Browser name and version?

Document in your electronic file, in full detail, the complete navigation path, as well as step-by-step instructions to reproduce your issue. If the transaction performing poorly is a query, document which parameters are passed to the query as well as which parameters are NULL, or automatically defaulted. Be as specific as possible.

Proceed to report your Tech-Stack performance issue to Oracle Support.

Reporting to Oracle

Providing to Oracle well organized, accurate, and comprehensive information and files, helps to expedite the total resolution time. Try to determine the right balance between the initial time invested in gathering as much information and files early in the process, with the benefit they provide to the overall process reducing the number of iterations between the end-user, the technical user, Oracle Support, and Oracle Development. Reports like the one produced by the SQLTXPLAIN.SQL script consolidate pieces of information like CBO stats, indexes, init.ora parameters, etc. Having all this information gathered systematically and into one single place, certainly reduces the number of iterations and therefore the total resolution time.

Requested Files for Transaction Tuning Issues

At the very minimum, provide files 1 to 5 below. If you pro-actively participated on the initial troubleshooting phase, or Oracle Support has guided you through it, provide files 6 to 9 accordingly.

Apps Performance Bug Template - Transaction Tuning
For Pro*C Concurrent Programs, MODULES.TXT with versions of modules
For Concurrent Programs, Log file with debugging information
Raw SQL Trace from the transaction, with or without Event 10046 details (compressed), complete or incomplete
Trace Analyzer and/or TKPROF file(s) with Explain Plans
SQL.TXT file(s) with identified expensive SQL
Compressed file with spool files generated by SQLTXPLAIN.SQL
Only for CBO and SQL1.TXT: Raw SQL Trace produced by SQLTXPLAIN.SQL
Only for CBO and SQL1.TXT: Binary file SQLT.dmp with CBO stats
Requested Files for Back-End Tuning Issues

At the very minimum, provide files 1 to 5 below. If you pro-actively participated on the initial troubleshooting phase, or Oracle Support has guided you through it, provide files 6 to 8 accordingly. If you opted to, or Oracle Support instructed you to perform the advanced troubleshooting steps, provide files 9-11 accordingly.

Apps Performance Bug Template - Back-End Tuning
Any prior Performance related Report available
File init.ora, including any ifile(s) referenced on the init.ora
ALERT.LOG file, including last 48 hours
APPLPTCH.TXT file
For 11i, AFCHKCBO.TXT and/or BDE_CHK_CBO.TXT with required init.ora parameters
For 11i, BDE_LAST_ANALYZED.TXT with summary of CBO stats
For 8.1 or later, SQLAREAT.SQL spool files with expensive SQL statements
For 7.3 or 8.0, REPORT.TXT produced by bstat/estat tool
For 8.1 or later, StatsPack Report
Set of stats from OS performance monitoring tools, like: vmstat, iostat, mpstat and top
Requested Files for Tech-Stack Tuning Issues

Apps Performance Bug Template - Tech-Stack Tuning
Related Documents

Scripts

All related COE, BDE, TRCA, SQLT and PROF scripts can be downloaded from MetaLink

MetaLink
Script
Title
224270.1
TRCANLZR.SQL
Trace Analyzer (8.1.6+)
215187.1
SQLTXPLAIN.SQL
Enhanced Explain Plan and related info for one SQL statement (8.1+)
243755.1
profiler.sql
Implementing and Using the PL/SQL Profiler (8.1+)
156959.1
coe_xplain_80.sql
Enhanced Explain Plan for given SQL Statement (8.0)
156960.1
coe_xplain_73.sql
Enhanced Explain Plan for given SQL Statement (7.3)
174603.1
bde_x.sql
Simple Explain Plan for given SQL Statement (8.1+)
156972.1
coe_view.sql
Clones views across instances for SQL tuning exercises (8.0+)
238684.1
SQLAREAT.SQL
Top 10 Expensive SQL from SQL Area (8.1+)
163209.1
coe_sqlarea_80.sql
Top 10 Expensive SQL from SQL Area (8.0)
169630.1
bde_session.sql
Expensive SQL and resources utilization for given Session ID (8.1+)
174605.1
bde_chk_cbo.sql
Current, required and recommended Apps 11i init.ora params (11i)
163208.1
bde_last_analyzed.sql
Verifies Statistics for all installed Apps modules (11i)
156968.1
coe_stats.sql
Automates CBO Stats Gathering using FND_STATS and Table sizes (11i)
156969.1
coe_trace.sql
SQL Tracing Apps online transactions with Event 10046 (11i)
156970.1
coe_trace_11.sql
SQL Tracing Apps online transactions with Event 10046 (11.0)
156971.1
coe_trace_all.sql
Turns SQL Trace ON for all open DB Sessions (8.0+)
156965.1
coe_locks.sql
Session and serial# for locked Rows (7.3+)
Templates

MetaLink
Apps Performance Bug Template
Transaction Tuning
169938.1
Back-End Tuning
169939.1
Tech-Stack Tuning
Notes

MetaLink
Title
39817.1
Interpreting Raw SQL Trace and DBMS_SUPPORT.START_TRACE
153507.1
Oracle Applications and StatsPack
171647.1
Tracing Oracle Applications using Event 10046
170223.1
Profile Option: Initialization SQL Statement - Custom

Related
Products
Oracle E-Business Suite > Applications Technology > Application Object Library > Oracle Application Object Library
Oracle E-Business Suite > Applications Technology > Application Object Library > Oracle Application Object Library
Keywords
COE; EXPLAIN PLAN; SQL TUNING; BDE; APPSPERF; COESCRIPTS
Errors
SQL2; SQL1

Back to top

Rate this document

Top 10 Backup and Recovery best practices. [ID 388422.1]

Top 10 Backup and Recovery best practices. [ID 388422.1]

In this Document
Purpose
Top 10 Backup and Recovery best practices.
Questions and Answers

Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.1 and later [Release: 9.2 and later ]
Information in this document applies to any platform.
Purpose

Top 10 Backup and Recovery best practices.


This document assumes that you are doing the Backup and Recovery basics
- Running in Archivelog mode
- multiplexing the controlfile
- Taking regular backups
- Periodically doing a complete restore to test your procedures.
Questions and Answers

1. Turn on block checking.
REASON: The aim is to detect, very early the presence of corrupt blocks in the database.
This has a slight performance overhead, but will allow Oracle to detect early
corruption caused by underlying disk, storage system, or I/O system problems.

SQL> alter system set db_block_checking = true scope=both;


2. Turn on block tracking when using RMAN backups (if running 10g)
REASON: The block tracking file contains a bitmap that is used during incremental backups
Each bit represents an extent, so only those extents that have been modified will be read and backed up.
If this is not used, all blocks must be read to determine if they have been modified since the last backup.

SQL> alter database enable block change tracking using file '/u01/oradata/ora1/change_tracking.f';


3. Duplex log groups and members and have more than one archive log dest.
REASON: If an archivelog is corrupted or lost, by having multiple copies in multiple locations,
the other logs will still be available and could be used.

If an online log is deleted or becomes corrupt, you will have another member that can be
used to recover if required.

SQL> alter system set log_archive_dest_2='location=/new/location/archive2' scope=both;
SQL> alter database add logfile member '/new/location/redo21.log' to group 1;


4. When backing up the database use the 'check logical' parameter
REASON: This will cause RMAN to check for logical corruption within a block as well as the normal
head/tail checksumming. This is the best way to ensure that you will get a good backup.

RMAN> backup check logical database plus archivelog delete input;


5. Test your backup.
REASON: This will do everything except actually restore the database. This is the best method to
determine if your backup is good and usable before being in a situation where it is
critical and issues exist.

RMAN> restore validate database;


6. Have each datafile in a single backup piece
REASON: When doing a partial restore RMAN must read through the entire piece to get the
datafile/archivelog requested. The smaller the backup piece the quicker the restore can
complete. This is especially relevent with tape backups of large databases or where the
restore is only on individual / few files.

RMAN> backup database filesperset 1 plus archivelog delete input;


7. Maintain your RMAN catalog/controlfile
REASON: Choose your retention policy carefully. Make sure that it compliments your tape subsystem
retention policy, requirements for backup recovery strategy. If not using a catalog,
ensure that your controlfile record keep time instance parameter matches your retention policy.

SQL> alter system set control_file_record_keep_time=21 scope=both;
This will keep 21 days of backup records.

Run regular catalog maintenance.
REASON: Delete obsolete will remove backups that are outside your retention policy.
If obsolete backups are not deleted, the catalog will continue to grow until performance
becomes an issue.

RMAN> delete obsolete;

REASON: crosschecking will check that the catalog/controlfile matches the physical backups.
If a backup is missing, it will set the piece to 'EXPIRED' so when a restore is started,
that it will not be eligible, and an earlier backup will be used. To remove the expired
backups from the catalog/controlfile use the delete expired command.

RMAN> crosscheck backup;
RMAN> delete expired backup;


8. Prepare for loss of controlfiles.
set autobackup on
REASON: This will ensure that you always have an up to date controlfile available that has been
taken at the end of the current backup not during.

RMAN> configure controlfile autobackup on;

keep your backup logs
REASON: The backup log contains parameters for your tape access, locations on controlfile backups
that can be utilised if complete loss occurs.

9. Test your recovery
REASON: During a recovery situation this will let you know how the recovery will go without
actually doing it, and can avoid having to restore source datafiles again.

SQL> recover database test;


10. Do not specify 'delete all input' when backing up archivelogs
REASON: Delete all input' will backup from one destination then delete both copies of the
archivelog where as 'delete input' will backup from one location and then delete what has
been backed up. The next backup will back up those from location 2 as well as new logs
from location 1, then delete all that are backed up. This means that you will have the
archivelogs since the last backup available on disk in location 2 (as well as backed up
once) and two copies backup up prior to the previous backup.

Oracle Applications System Administration Scripts [ID 214088.1]

Applications Performance

Performance Troubleshooting Chart

Performance Troubleshooting Chart(<-- Click here for details & download)
This is a beta version of a troubleshooting flowchart. The intent is to provide a series of troubleshooting steps in a flowchart format for Performance troubleshooting. We are testing different deployment methods, so your feedback is encouraged in reference to ease of use and content. Please use the feedback link at the bottom of the chart for such comments.


Locks for given Session ID

bde_session_locks.sql(<-- Click here for details & download)
This script creates a report with locks for one session that is not responding (hanging), because of a Lock.


Validates and Rebuilds Fragmentated Indexes

bde_rebuild.sql(<-- Click here for details & download)
This script validates and proceeds to generate a dynamic script to rebuild them.


Analyze Indexes to determine Fragmentation

bde_analyze_indexes.sql(<-- Click here for details & download)
This script will analyze indexes to determine fragmentation


Current, Required and Recommended Apps 11i init.ora params

bde_chk_cbo.sql(<-- Click here for details & download)
This script displays the current value, the required value (if any), the recommended value (if any), and the default value (if any).


Simple Explain Plan for given SQL Statement

bde_x.sql(<-- Click here for details & download)
Script generates a Simple Explain Plan for one SQL statement, required to diagnose apps performance issues (transaction tuning).


Expensive SQL and Resources Utilization for a Given Session ID

bde_session.sql(<-- Click here for details & download)
This script creates a report with relevant information for one session that is either performing poorly or not responding (hanging).


Verifies Statistics for all Installed Apps Modules 11.5

bde_last_analyzed.sql(<-- Click here for details & download)
Script verifies statistics for all installed Apps modules 11.5


Changes CBO Stats Selectivity for a Given Index and Column

bde_chg_stats.sql(<-- Click here for details & download)
Script that changes CBO stats selectivity for a given index and column


Clone Views Across Instances for SQL Tuning Exercises

coe_view.sql(<-- Click here for details & download)
This script facilitates cloning views across instances for SQL tuning exercises


Trace Apps Online Transactions with Event 10046

coe_trace.sql(<-- Click here for details & download)
This script will Generates SQL Trace with bind variables and waits information for an Oracle Applications Form (equivalent of Event 10046 level 12)


Automate CBO Stats Gathering

coe_stats.sql(<-- Click here for details & download)
This script automates CBO stats gathering using FND_STATS and table sizes


Top 10 Expensive SQL from SQL Area

coe_sqlarea.sql(<-- Click here for details & download)
This script scans sql area and sql text v$ dynamic performance views and displays Top n SQL Statements in terms of resources utilization.


SQL Tracing online transactions using Event 10046

coe_event_10046.sql(<-- Click here for details & download)
Process and Session info for one Concurrent Request


Session and Serial# for Locked Rows

coe_locks.sql(<-- Click here for details & download)
This script displays all sessions holding a lock on a table or row.


Import CBO Stats from COE_STATTAB_XYZ

coe_import_stattab.sql(<-- Click here for details & download)
This script uploads data dictionary statistics from table COE_STATTAB_XYZ...


Enhanced Explain Plan for given SQL Statement

SQLTXPLAIN.sql(<-- Click here for details & download)
Given one SQL Statement as input, generate a comprehensive report.. (sql tuning).


Audit Trail

Active Users executing FORMs or Conc Programs

FNDFindActiveUsers115.sql(<-- Click here for details & download)
This script generates a list of active apps users with at least one open form, or executing at least one concurrent program.


Trace

Enhanced Explain Plan for given SQL Statement

bde_system_event_10046.sql(<-- Click here for details & download)
This script is used to turn SQL trace ON with LEVEL 12 for any concurrent program that starts its execution AFTER the EVENT 10046 is turned ON at the SYSTEM level.
TRCANLZR.sql(<-- Click here for details & download)
Trace Analyzer - Interpreting Raw SQL Traces generated by EVENT 10046

Wednesday, February 23, 2011

Best Practices for Performance for Concurrent Managers in E-Business Suite

Best Practices for Performance for Concurrent Managers in E-Business Suite [ID 1057802.1]
Modified 16-FEB-2011 Type BULLETIN Status PUBLISHED

In this Document
Purpose
Scope and Application
Best Practices for Performance for Concurrent Managers in E-Business Suite
References

Applies to:
Oracle Application Object Library - Version: 11.5.0 to 12.1 - Release: 11.5.10 to 12
Information in this document applies to any platform.
Purpose
Provide the best practices to achieve better performance for concurrent manager in Oracle E-Business Suite.
Scope and Application
Applications DBAs, System Administrators involved in configuration and administration of Oracle E-Business Suite.
Best Practices for Performance for Concurrent Managers in E-Business Suite
Best Practices for Performance for Concurrent Managers in E-Business Suite

This Document contains 3 topics.

1. Generic Tips
2. Transaction Manager (TM)
3. Parallel Concurrent Processing (PCP) Environment


Generic Tips

1) Sleep Seconds - is the number of seconds your Concurrent manager waits between checking the list of pending concurrent requests (concurrent requests waiting to be started).

Tip: Set the sleep time to be very brief during periods when the number of requests submitted is expected to be high. Otherwise set the sleep time to a high number (e.g. 2 minutes) . This avoids constant polls to check for new requests.

2) Increase the cache size (number of requests cached) to at least twice the number of target processes.

For example, if a manager's work shift has 1 target process and a cache value of 3, it will read three requests, and try to run those three requests before reading any new requests.

Tip: Enter a value of 1 when defining a manager that runs long, time-consuming jobs, and a value of 3 or 4 for managers that run small, quick jobs.

3) Create specialized concurrent managers to dedicate certain process either short or long running programs to avoid queue length.

4) To maximize throughput consider reducing the sleep time of the Conflict Resolution Manager (CRM). The default value is 60 seconds. You can consider setting to 5 or 10 seconds.

5) Avoid enabling an excessive number of standard or specialized managers. It can degrade the performance due polling on queue tables (FND_CONCURRENT_REQUESTS...). You need to create specialized managers only if there is a real need.

6) Set the system profile option "Concurrent: Force Local Output File Mode" to "Yes" if required . You need to apply patch 7530490 for R12 (or) 7834670 for 11i to get this profile.

Refer Note.822368.1: Purge Concurrent Request FNDCPPUR Does Not Delete Files From File System or Slow performance

Note:- The profile option "Concurrent: Force Local Output File Mode" is set to "No" by default. After applying the patch, set the profile option to YES will cause FNDCPPUR to always access files on the local file system, hence FNDCPPUR will remove the OS files faster.To enable this feature, All Concurrent Manager nodes must be able to access the output file location via the local filesystem

7) Truncate the reports.log file in log directory. Refer Note.844976.1 for more details

Truncation of file "reports.log" is a regular maintenance work of Application DBA. Make sure that reports log file size should not increase to its maximum limit of 2 GB. There is no purge program to truncate file "reports.log". This maintenance needs to be done manually and regularly depending on number of concurrent program which uses "reports.log". You can safely truncate "reports.log".

8) Ensure "Purge Concurrent Request and/or Manager Data, FNDCPPUR," is run at regular intervals with "Entity" parameter as "ALL". A high number of records in FND_CONCURRENT tables can degrade the performance.

9) Ensure that the log/out files are removed from the locations shown below as you run "Purge Concurrent Request and/or Manager Data program".

$APPLCSF/$APPLLOG
$APPLCSF/$APPLOUT

In the event that it does not remove the log/out files, over a period of time it will slow down the performance. Please refer to the following note which suggests the patch which fixes it.

Note.822368.1: Purge Concurrent Request FNDCPPUR Does Not Delete Files From File System or Slow performance


10) Defragment the tables periodically to reclaim unused space / improve performance

FND_CONCURRENT_REQUESTS
FND_CONCURRENT_PROCESSES
FND_CRM_HISTORY
FND_ENV_CONTEXT
FND_TEMP_FILES


How to defragment

10.1) alter table . move;
10.2) Note that, some indexes might become unusable after table is moved, check the index status from dba_indexes for the table moved and rebuild them too as explained in next bullet.
select owner, index_name, status from dba_indexes
where table_owner = upper('&OWNER') and
table_name = upper('&SEGMENT_NAME');
10.3) alter index . rebuild online;
Note: Ensure the tablespace in which the object currently exists has got sufficient space before you move/defragment . Always take backup of the tables before moving the data. It is recommended to perform ths action on Test instance initially then testing thoroughly before performing it on Production instance.

10.4) You will need to collect the statistics for the tables.

For example:
exec fnd_stats.gather_table_stats ('APPLSYS','FND_CONCURRENT_REQUESTS',PERCENT=>99);

Transaction Manager (TM)

11 ) Profile Concurrent:Wait for Available TM - Total time to wait for a TM before switchover to next available TM. Consider setting this to 1 (second).

12) Ensure enough TMs exist to service the incoming request load.

13) When the load is high, set the following profile to optimum values to achieve better results.

PO: Approval Timeout Value - Total time for workflow call (When initiated from Forms) to time out.

14) Set the sleep time on the Transaction Manager to a high number (e.g. 10 minutes), this avoids constant polls to check for shutdown requests.

Parallel Concurrent Processing (PCP) Environment

15) If the failover of managers is taking too long refer to Note:551895.1: Failover Of Concurrent Manager Processes Takes More than 30 Minutes

16) Set profile option 'Concurrent: PCP Instance Check' to 'OFF' if instance-sensitive failover is not required. Setting it to 'ON' means that concurrent managers will fail over to a secondary application tier node if the database instance to which it is connected goes down.

17) Transaction Manager uses DBMS_PIPE to communicate with application session prior to 11i.ATG_PF.H RUP3. DBMS_PIPE in turn uses OS Pipe.We might use Advance Queue(AQ) with 11i.ATG_PF.H RUP3 by setting System Profile ‘Concurrent: TM Transport Type' to ‘QUEUE'

Note Pipes are more efficient but require a Transaction Manager to be running on each DB Instance (RAC). So you might want to use "Queue" for easy maintenance.

18) Add these parameters depends on your Database version

+ _lm_global_posts=TRUE
+ _immediate_commit_propagation=TRUE (11g RAC)
+ max_commit_propagation_delay=0 (9i RAC)

How to find out if a product is installed in e-Business Suite?

Goal
How to find out if a product is installed in e-Business Suite?

Solution

E-Business Suite 11i users can find out what products are installed in e-Business Suite, and their patch levels, via Oracle Applications Manager. See the note reference at the end of this note for details.

A list of the installed products may also be obtained by running the script $AD_TOP/sql/adutconf.sql, or by querying the file $APPL_TOP/admin/applprod.txt. These methods are documented in the notes referenced below.

Users can find out the patch level of any installed e-BS product by running the following query via SQL:

$ sqlplus apps /

SQL> SELECT substr(APPLICATION_SHORT_NAME,1,8) product,
substr(PRODUCT_VERSION,1,14) version,
substr(PATCH_LEVEL,1,11) patch_level,
FROM fnd_application a, fnd_product_installations p
WHERE a.application_id = p.application_id
ORDER BY application_short_name
/

If the product code is known, the following query may be run for individual products:

SQL> SELECT patch_level
FROM fnd_product_installations
WHERE patch_level LIKE ''
/
for example: WHERE patch_level LIKE 'BIS'

The product code is the 2- or 3-letter code you see when you search for a patch in Metalink by product family, and in the name of the patchset, e.g. 11i.BIS.L.

As a double check that the database knows that the product is installed, the following query should produce the same answer:

SQL> SELECT fa.application_id id, fa.application_short_name app, fa.application_name, fpi.status,
fpi.patch_level
FROM fnd_application_all_view fa, fnd_product_installations fpi
WHERE fa.application_id = fpi.application_id
AND fpi.patch_level LIKE ''
/

Bear in mind that it is possible to have most e-Business Suite products installed without applying a patch, because they are shipped with our base rapidinstall releases of e-Business Suite.

Remember too that having a product installed is one thing, being licensed to use it is another. You need to ask your Oracle Account Manager if you are licensed to use a product. Oracle Product Support does not hold customer licensing information

Tuesday, February 22, 2011

MTL_TRANSACTIONS_INTERFACE to the GL_INTERFACE.

Scope and Application

This document will be used to explain the flow of transactions from the MTL_TRANSACTIONS_INTERFACE to the GL_INTERFACE.

The aim of this document is to help and assist in the resolution of transaction Interface related issues. Unprocessed Transactions / Closing INV Accounting Period FAQ

Q1. What is the MTL_TRANSACTIONS_INTERFACE table used for?


A1. This is the Interface between non-Inventory applications and the Inventory
Transactions module.

In other words any other module other than Inventory that wants to update Inventory has to come through this table. Modules such as WIP (Work In Progress) and OE (Order Entry) first pass their records to the
MTL_TRANSACTIONS_INTERFACE (MTI) for validation.

The Transactions Manager (INCTCM) reads records from the MTI table, validates them and moves the successful transactions into the MTL_MATERIAL_TRANSACTIONS_TEMP table, and submits Transaction workers (sub-processes - INCTCW) which then process these records through inventory. This process consists of data derivation, validation, and the transfer of records from MTL_TRANSCTIONS_INTERFACE, MTL_TRANSACTIONS_LOTS_INTERFACE and MTL_SERIAL_NUMBERS_INTERFACE into their associated TEMP (temporary) tables from where the transactions processor processes them.

Both the Lots and Serial number tables above are used when items being updated are under 'Lot' or 'Serial' number control. For example :- In the case of a Sales Order, if the item is being shipped to a client and the lot and serial number are being used, these tables need to be updated to show that the lot or serial number is no longer available in the Inventory stock.

It is important to note that in general the processors will not move the transactions from this table if the following fields are not set as follows.

LOCK_FLAG = 2
PROCESS_FLAG = 1
transaction_mode = 3


Q2. What is the MTL_MATERIAL_TRANSACTIONS_TEMP table used for?

A2. The transactions are passed to the MTL_MATERIAL_TRANSACTONS_TEMP table after initial validation by the Transactions Manager (INCTCM) from the MTL_TRANSACTIONS_INTERFACE. A job id is attached and a Transactions Worker (INCTCW) is submitted by the INCTCM process to get the records processed and moved to the MTL_MATERIAL_TRANSACTONS table.

This table is also used by the Inventory and Purchasing modules which write transactions directly into this table after validation.

Inventory Module Forms like the Miscellaneous transactions form write directly into this table. The transactions which are created through these form are via on-line processing. It is from this table that the inventory quantities finally get updated and serial/lot numbers get updated.


Q3. What type of issues will you see with the MTL__TRANSACTIONS_INTERFACE and MTL_MATERIAL_TRANSACTIONS_TEMP tables?

A3. The issues can be related to stuck transactions in these tables.

The following is a list of errors that you may see in the error_code, error_explanation columns in the above tables:

NOTE: In Release 11 the APP-XXX errors do not show any more.

ERROR_CODE ERROR EXPLANATION

APP-05367 Invalid Item
APP-05341 Invalid sub-inventory
APP-05343 Invalid transaction date
APP-05345 Invalid transaction UOM
APP-05354 Invalid locator segments
APP-05365 Invalid distribution account segments
APP-05372 Transaction processor error
APP-05526 Invalid locator
APP-05518 Negative balances not allowed
APP-05064 Quantity must be less than or equal to available to transact for that item at its specific control level
APP-05520 No open period found for date entered
Account period
Lot records
Serial records


APP-05367 Invalid Item
Check the attributes against the set required for the transaction type.
i.e. Order entry, PO etc.

APP-05341 Invalid Subinventory
Check and make sure that this record does not already exist on the MTL_MATERIAL_TRANSACTIONS_TEMP table as sometimes the process does not clear some of the records out of MTL_TRANSACTIONS_INTERFACE correctly.
If this is the case it is a matter of deleting the records from the MTL_TRANSACTIONS_INTERFACE.

Check the subinventory against the available MTL_SECONDARY_INVENTORIES on the system for the given ORGANIZATION_ID against this transaction.
If the subinventory exists, check the TRANSACTION_TYPE_ID, for example:
If it is a Purchase Order then you need to check the MTL_SUPPLY to ensure that the supply exists for this transaction.

APP-05343 Invalid transaction date
In certain circumstances, and depending on the transaction type, the accounting period is not open. There is no issue in changing the date to the current date and resubmitting it through the system.

APP-05345 Invalid transaction UOM
Check the UOM measure being used and find out if it is valid for the organization source. If not then the UOM needs to be set up. This error can also be due to the conversion classes having not been set-up.

APP-05354 Invalid locator segments
APP-05355 The Locator segments are invalid for the given sub inventory, organization Combination.

Check under Inventory Responsibility -> set-up -> flexfields -> key -> segments 'stock locators'. Ensure each segment has been enabled.

APP-05365 Invalid distribution account segments
The distribution account segments has its base in the Account Key Flexfield set-up. It is this Flexfield structure that determines how many segments should be populated into the segments within the MTL_TRANSACTION_INTERFACE table.
In order to check if the distribution account is correct we need to join the details back to the GL_CODE_COMBINATION table to validate the account code being used for the transaction. Check the error_explanation field as this may identify what segment is actually incorrect for example:
APP-1756 Value 'XXXX' is not defined.

Ensure that the segments point to a valid row in the GL_CODE_COMBINATIONS table.

APP-05372 Transaction processor error
For this error check the ERROR_EXPLANATION to find out the exact message as to why it is possibly failing.
These error'd transactions can usually have the three processing flags reset and can be re-submitted as the error is usually attached to records in a group where one of the records has errored with a more severe error.

APP-05526 Invalid locator
This is a list of checks to perform:
1.Extract the Organization_id and cross check tables to see if the org is under locator control.
2.Are the locator details filled in correctly on the transaction
3.Has the Organisation set-up been modified.

APP-05518 Negative balances not allowed.
This message will be given if there is not enough on hand inventory to satisfy all the transactions within a batch. Therefore, ensure that the transaction quantity is enough to satisfy the sum of all the transaction quantities for a particular batch.

APP-05064 Quantity must be less than or equal to Available to transact for that item at its specific control level. (For Example: subinventory,locator,lot,serial)
1. If you specify a subinventory/locator while entering the order, the system will attempt to ship the items from that subinventory/locator. If there is not enough available stock to reserve/transact in that particular subinventory/locator the program will error out with the above error. However, if there are no subinventories/locators specified while entering the order, the system will pick the stock from where it finds available stock in that Organization.

2. Check onhand and available quantity for the errored items.

3. The records would have errored out due to some other row in the batch not having enough stock, so the entire batch would fail. Find the row that has the error explanation populated. Resubmit all the other rows except the one which has error explanation , if the same error occurs for other rows, do the same process once again excluding that row.

4. Please note that Available Quantity = On Hand Quantity - Reservations (Soft and Hard Reservations).

APP-05520 No open period found for date entered
The Accounting Period is not currently open for the transaction.
1.Check that the period is open for the transaction date

Q4. What type of issues will you see with the MTL_MATERIAL_TRANSACTIONS table?

A4. Transaction is valued (unit cost*quantity = $ amount)
Once the data gets here the transaction is almost complete except for the fact that it needs to have the costing details finally updated to the MTT row and the accounting details written to the MTL_TRANSACTION_ACCOUNTS table for transfer to the General Ledger. This is a transactional historical table and is the holding point for transactions to be costed.

The Cost Manager is a concurrent job that runs in the background. (CMCTCM)

When the COSTED_FLAG = 'N' (Not Processed) - this means the record is awaiting costing.
If the COSTED_FLAG = NULL then the transaction has already been processed.
If the COSTED_FLAG = 'E' then the transaction has errored during costing and the ERROR_CODE and ERROR_EXPLANATION fields need to be checked.


Q5. What type of issues will you see with the MTL_TRANSACTION_ACCOUNTS table?

A5. The details of the transactions are written into this table as Debits and Credits. This data is picked up when running the General Ledger Transfer routine:
Navigation Path -> Inventory Responsibility -> Accounting Close Cycle -> General Ledger Transfers)
This concurrent request takes the transactions with a GL_BATCH_ID of -1 and passes them to the
GL_INTERFACE for processing and the batch is given it's proper batch number.

When the transfer to GL is completed, a column called GROUP_ID gets populated in the GL_INTERFACE table with a gl_batch_id. The GL BATCH identifier is used in the GROUP ID field,
so only the batch which is in error is prevented from being imported and posted. Also, adding a GROUP ID allows for a more definitive level of control not only across locations but within a location.


Q6. Where do you find Pending/Errored Inventory Transactions?

A6.1. Navigate to Inventory Responsibility -> Accounting Close Cycle -> Inventory Accounting Periods
-- Select Pending Button related to an OPEN period.
-- In the top region -- Resolution Required
-- If it shows pending records, These must be fixed prior to the system allowing the period to be closed.
-- The form only shows a count of pending records against the period.

A6.2. Navigate Inventory Responsibility -> Transactions -> Transaction Open Interface
-- This form queries the MTL_TRANSACTIONS_INTERFACE table
-- Records can be resubmitted from this form.

A6.3. Navigate Inventory Responsibility -> Transactions -> Pending Transactions
-- This form queries the MTL_MATERIAL_TRANSACTIONS_TEMP table
-- Records can only be resubmitted via the form.
-- Records must be processed out of this form in order to close the inventory accounting periods.

A6.4. Navigate Inventory Responsibility -> Transactions -> Material Transactions
-- Records can be viewed from this form to see whether the transactions have the costed flag set to 'YES' or 'No', also other related columns under Alternate Region -> 'Reason/Reference'.
-- We re-submit the records only through SQL.


Q7. Where do you find Pending/Errored WIP Move and WIP Resource Transactions?

A7.1. Navigate Work in Process Responsibility -> Move Transactions -> Pending Move Transactions
-- This form queries the WIP_MOVE_TXN_INTERFACE table
-- Records can be updated, deleted, and resubmitted via the form.

A7.2. Navigate Work in Process Responsibility -> Resource Transactions -> Pending Resource Transactions
-- This form queries the WIP_COST_TXN_INTERFACE table
-- Records can be updated, deleted, and resubmitted via the form.


Q8. What are the major tables involved in Material Movement for Inventory and WIP Material, Move, and Resource Transactions?

A8. See below:

MTL_TRANSACTIONS_INTERFACE
-- INCTCM is the Transaction Manager for this Table.

MTL_MATERIAL_TRANSACTIONS_TEMP
-- INCTCM is the Transaction Manager for this Table

MTL_MATERIAL_TRANSACTIONS
-- CMCTCM is the Cost Manager for the records to be costed in this table.
-- CMCCCM is the Cost Collection Manager for the records to be imported to Project Mfg.

WIP_MOVE_TXN_INTERFACE
-- WIP Move Transaction Worker processes records in this table (WICTCM)

WIP_MOVE_TRANSACTIONS
-- Must be viewed and resubmitted via SQL with the scripts below

WIP_COST_TXN_INTERFACE
-- Resource Cost Worker processes records in this table.


Q9. How do you resolve Pending Material Transactions?

A9. Resolving Pending Material Transactions is a process of determining and fixing what is preventing a record from being processed through the MTL_TRANSACTIONS_INTERFACE table. Details of pending transactions can be viewed through the application by navigating to the Transaction
Open Interface form.

Using the Transaction Open Interface window, you can view, edit, correct and resubmit transactions received through the open interface.
There are five selections in the alternate region list of values: Error, Location, Source, Intransit and Other. These provide detailed information to help you resolve pending transactions. In the Error alternate region:

a. The error code describes the error on the last attempt to process the line item.
b. The error explanation gives a reason for the error.
c. The process flag indicates whether the row has been processed by the concurrent manager.

The process flag status codes are:
1 = Pending
2 = Running
3 = Error

Resubmitting Transactions for Processing:
In the Transaction Open Interface window, check the Resubmit [] box next to the transaction you want to resubmit or choose Resubmit All from the Special menu. If you have many transactions to resubmit,
use the Resubmit All button to select all transactions for processing and then selectively deselect individual transactions you do not want to resubmit. Save your work to submit the transactions for processing.


Q10. How do you resolve Pending WIP Cost Transactions?

A10. Resolving Pending WIP Cost transactions is a process of determining and fixing what is preventing a record from being processed through the WIP_COST_TXN_INTERFACE table. Pending transactions can be viewed through the application by navigating to the WIP Responsibility -> pending resource transaction form.

In the Pending Resource Transaction window you can view, update, delete, and resubmit resource transactions that have failed validation and remain in the WIP_COST_TXN_INTERFACE table. You can also resubmit transactions whose concurrent process has failed and have a processing phase of Complete and process status of Error. There are eight selections in the alternative region list of values: Processing,
Source, Concurrent Request, Job or Schedule Name, Operation, Resource, Transaction and Comments.

Errored transactions will have the Transaction ID and Group ID populated and the Status will be error. Pending transactions will have the Transaction Id and Group ID fields blank and the Status will be pending.

To view error details for failed resource transactions, select the errored transaction and click on the [Error] button. The Pending Resource Transaction error window appears. Column indicates the name of the column in the resource transaction interface table (WIP_COST_TXN_INTERFACE) that failed validation. Message indicates why the transaction failed.

To resubmit failed resource transactions:
In the Pending Resource Transactions widow either check the transaction's Resubmit check box to resubmit one record or choose select All for Resubmit from the Special Menu then save your work.


Q11. When attempting to load legacy data into the MTL_TRANSACTIONS_INTERFACE table, into what column is the PO number input?

A11. There is not a direct column for PO number.In the Oracle Manufacturing Implementation Manual, locate the section on Open Transactions Interfaces. This section describes the transaction type id's and
there is not a PO number. The transaction_reference column can be used to hold the PO number. This column is optional and shows up on reports and transaction displays. Since a column for the PO number does not directly exist, a transaction_reference field can be used to input this information.
In Release 10.7, we do a Miscellaneous Receipt (PO Receipts are not supported).
In Release 11, Purchasing Module has a Receiving Interface and we do not see any data coming to this table anymore.

Customers that currently have release 10.7 and do not have this functionality will need to upgrade to release 11.0 or higher, which contains the production version of this functionality.


Q12. Why is the distribution account ID required in MTL_TRANSACTIONS_INTERFACE?

A12. All issues and receipts of asset items to an asset subinventory and sales order shipments require the distribution account id that originates from the GL code combinations. This account id is required to
create a complete audit trail of the transaction.

How to install and configure samba

Enterprise Linux: Samba HowTo [ID 416921.1]
Modified 31-AUG-2007 Type HOWTO Status PUBLISHED
In this Document
Goal
Solution

Applies to:

Linux Kernel - Version: 2.6.9
Linux x86
Goal

How to install and configure samba
Solution

Enterprise Linux: Samba HowTo

Contents:
1. Brief
2. Step by step installation and configuration
3. Service/Server management
4. Problem diagnosis: logs, diagnostic tools,etc
5. Reference also to
6. Samba Client Configuration and Use
7. Reference

1. Brief

To provide printer and file sharing, Microsoft Windows uses a facility known as SMB (Server Message Block). This same facility is sometimes known as NetBIOS or LanManager. Thanks to Andrew Tridgell and others, Linux systems provide support for SMB via a package known as Samba. Like SMB, Samba lets you:
* Share printers and files among Microsoft Windows, OS/2, Netware, and Unix systems
* Establish a simple nameserver for identifying systems on your local area network
* Backup PC files to a Linux system and restore them
* Administer users and passwords

Samba has proven its reliability and high performance in many organizations. According to the online survey at http://www.samba.org/pub/samba/survey/ssstats.html, Bank of America is using Samba in a configuration that includes about 15,000 clients, and Hewlett-Packard is using Samba in a configuration that includes about 7,000 clients.


Samba is an Open Source/Free Software suite that has, since 1992, provided file and print services to all manner of SMB/CIFS clients, including the numerous versions of Microsoft Windows operating systems. Samba is freely available under the GNU General Public License.

Samba software suite on Enterprise Linux is a collection of programs that implements the Server Message Block (commonly abbreviated as SMB) protocol for UNIX systems.


2. Step by step installation and configuration
2.1 Download Samba and installation:
1. Download the binary samba rpm package from ftp://ftp.sernet.de/pub/samba

Select the platform of your box. I select rhel4-i386 as my platform and show installation and configuration steps below:
ftp://ftp.sernet.de/pub/samba/rhel4-i386/libsmbclient-3.0.24-30.i386.rpm
ftp://ftp.sernet.de/pub/samba/rhel4-i386/samba3-client-3.0.24-30.i386.rpm
ftp://ftp.sernet.de/pub/samba/rhel4-i386/samba3-3.0.24-30.i386.rpm

2. mkdir /tmp/samba
3. download the rpm file to /tmp/samba
4. rpm -Uvh /tmp/samba/*.rpm

2.2 Installation from ULN

In Enterprise Linux system,SAMBA include as followed rpm packages:
samba-*
samba-common-*
system-config-samba-*
samba-client-*
You can install above packages from the Enterprise Linux CD/DVD media or via up2date get those from Oracle Unbreakable Linux Network(ULN) repository.

2.3 Configuration for file sharing

Samba's configuration is stored in the smb.conf file, which usually resides in /etc/samba/smb.conf .

2.3.1 smb.conf example

[global]
workgroup = mygroup
log file = /var/log/samba/%m.log
max log size = 500
encrypt passwords = yes

[homes]
comment = Home Directories
browseable = no
read only = no


[Music]
path = /data/mp3
public = yes
read only = yes
write list = @kate

2.3.2 smb.conf parameters
2.3.2.1 Configuring global variables

[Global Parameters]
workgroup = mygroup : this is the name of your network group. It is important that both Samba and Windows are in the same workgroup. Please read your Windows documentation on how to change your Windows pc's workgroup name.

encrypt passwords = yes: Samba can work with encrypted or unencrypted passwords. However, Windows 98, Windows NT, and Windows 2000 utilize encrypted passwords. The only time that this should be set to no is when you have any older Windows systems running on your network ie: Windows 95, Windows 3.x. If this is the case you will have to do some registery modifications to your Windows 98, NT, 2000 to allow them to send unencrypted passwords across the network. Not the most secure situation though.


2.3.2.2 Configuring Share variables

[Share Parameters]

[homes]
comment = Home Directories
browseable = no
read only = no

[homes] When you create a user on your Linux pc (more on this later) it will automatically create a home folder for you in /home/yourusername. Think of this as your "My Documents" for Linux.

read only = no: By default Samba will always make any directory read only for security reasons, so we need to let Samba know that we want to be able to write to this directory.
browseable = no: defines when you map a network drive to Samba, it will map directly to your user directory ie: \\home\kate (this is my username on Linux and Samba) This share /home/kate is browseable only by you. Remember this is much the same as the "My Documents" folder in Windows


[Music]
path = /data/mp3
public = yes
browseable = yes
read only = yes
write list = @kate

[Music] This will create a share for mp3 storage. Again lets go over the share parameters for this.

path = /data/mp3: This tells us the directory is found on the Samba server as /data/mp3, later when we map the network drive on the Windows pc, it will be seen as "Music" in Network Neighborhood

browseable = yes: This share will show in in Network Neighborhood as "Music"

public = yes: Specifies anyone can access and view the contents of /data/mp3

write list = kate:

Although anyone can view and excute (meaning see and play any mp3 in this directory). For security and practical reasons I have set this share so that only kate (thats me) can delete or add files. You can add as many names as you wish to this line ie:, john etc. To exclude any person from being able to access this share altogether, add the line: invalid users = vicky, steve. These names are the logon names from Windows, and are not case sensitive. They also must have a logon name and Samba password on the Linux pc.

In order for Samba to accomplish all this we need to set certain Linux file permissions such as these. This can be done by opening your file manager (in this case Konqueror) and right clicking on the /data/mp3 share and choosing properties

3. Service/Server management

3.1 Adding Users and Restarting Samba

example:
1. adduser kate
useradd -d /home/kate kate
2. init kate's password
passwd kate
3. init kate's smbpasswd
smbpasswd -a kate
4. /etc/init.d/smb restart


4. Problem diagnosis: logs, diagnostic tools,etc

4.1 diagnostic tools

To verify that the parameters are correct in the smb.conf file or to debug configuration problems, use the testparm command.

4.2 logs

For debugging problems with Samba in general, the log files log.smbd and log.nmbd under the /var/log/samba directory are invaluable.
The parameter log level in the global section of the smb.conf file determines the amount of detailed information Samba writes to the log files, with level 0 being the most general and 10 being the most detailed. Each logging level contains the messages from that level, in addition to the logging messages below it. For example, a logging level of 5 contains messages from level 5, plus those from levels 0 through 4.

# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/%m.log
debuglevel = 4


5.Reference also to:

man samba
man 8 smbd
man 5 smb.conf

6. Samba Client Configuration and Use

example :Microsoft Windows Client
Microsoft Windows 3.11, 9x, and NT have built-in support for the SMB protocol, so systems running these operating systems can easily access your Samba server's resources. Under Microsoft Windows 9x and NT, you can access Samba resources by using the Windows Explorer. Log on using a userid that's authorized to access Samba resources. Then click on Network Neighborhood and you should see a subtree that corresponds to your Samba server. By expanding the subtree, you can see the browseable file and printer shares that are available. You can easily drag and drop files to and from a shared directory, assuming your userid is permitted the necessary access.

7. Reference
http://us4.samba.org/samba/
http://en.wikipedia.org/wiki/Samba_software

Saturday, February 19, 2011

After post clone you will find two instance names in front end old and new, In concurrent administrator mode.

*****************************************

After post clone you will find two instance names in front end old and new, In concurrent administrator mode.

*****************************************

Apps must be down and DB must be Up and running

*****************************************

In Toad

desc fnd_concurrent_queues;

select node_name, node_name2 from fnd_concurrent_queues;

*****************************************

SQL>startup

conn apps/apps

SQL>update fnd_concurrent_queues set node_name='TEST, where node_name2 is null;

SQL>commit;

SQL>select node_name from fnd_concurrent_queues;

******************************************
Run auto config in both DB and Apps
******************************************
THE - END
******************************************