Académique Documents
Professionnel Documents
Culture Documents
Gather Schema Statistics or Gather Table Statistics or running FND_STATS fails with "ORA-20005: object
statistics are locked".
Example:
In 10g, if a queue is created or recreated during the upgrade, automatic statistics gather gets locked (disabled) on
these queue.
The following statement can be used to check the tables which have statistics locked:
SOLUTION:
exec dbms_stats.unlock_schema_stats('schema_owner');
exec dbms_stats.unlock_table_stats('table_owner','table_name');
Example:
SQL> exec dbms_stats.unlock_schema_stats ('AR');
SQL> exec dbms_stats.unlock_table_stats('AR', 'AR_REV_REC_QT');
As indicated in the above error message, this is due to the PERL setting. We dint have the PERL5LIB set :
total 16
drwxr-x--- 2 oradev dba 4096 Feb 9 04:33 include
drwxr-x--- 2 oradev dba 4096 Feb 9 04:33 bin
drwxr-x--- 4 oradev dba 4096 Feb 9 04:33 lib
drwxr-x--- 4 oradev dba 4096 Feb 9 04:33 man
-bash-3.00$ PERL5LIB=/d02/oradev/devdb/10.2.0/perl/lib/5.8.3
-bash-3.00$ export PERL5LIB
-bash-3.00$ id
uid=500(oradev) gid=502(dba) groups=502(dba)
While running adcfgclone.pl as oracle user, the session just hangs without giving any error in the log
file. The issue was that it wasn’t able to connect to the database as:
sqlplus "/as sysdba"
Deep dive:
Most generally this can occur due to improper shutdown of the database. While in the course of a database
shutdown, if any of the oracle process is not completed killed and it holds a large shared memory segment,
such issues can occur which would prevent from normal database operation.
So next time when an instance tries to start it is not able to grab a large chunk of memory to get started.
After the database has been shut down , there shouldn’t be any processes running as oracle on the server level:
eg:
Here in the above example, a single oracle process holds 789785472 bytes of shared memory, even after
shutdown. If the database instance is started, then we would expect abnormal behaviors on the database side,
like the login issue that we are discussing now.
This can cleaned as mentioned below:
ipcrm -m < shmid>
eg:
ipcrm -m 884763
Error:
12/11/01 08:19:10 [2] [libopmnoc4j] AJP13: Receiving response code: 500 while configured success code is:
200
12/11/01 08:19:10 [2] [libopmnoc4j] Ping URL for proc: 887947305 failed while
pingingurl:/reports/rwservlet/pingserver?start=auto
Search String:
REP-56105
tail –f OC4J~OC4J_BI_Forms~default_island~1
ConfigFileName: /u01/oracle/product/ais10g/forms90/server/forms/server/formsweb.cfg
SOLUTION:
Work Around:
@ cd $ORACLE_HOME/opmn/conf
@ cp opmn.xml opmn.xml.PINGAUTO
@ < /category>
@ cd $ORACLE_HOME/opmn/bin
SOLUTION:
Also Check for the domain name in /u01/oracle/product/ais10g/webcache
Scenario:
Business critical concurrent request is running from more than 2 hours which was supposed
to complete within 1 hour.
The standard manager and the manager responsible to execute the critical concurrent
request (custom manager) were overloaded with many requests. The server on which these
managers run had very high server load and all CPU’s were utilized.
After diagnosis, we had to kill few requests which were running from more than 2 hours and
were creating load on the server. These requests were in fact not performing anything and
had gone zombie.
The server load came down and CPU’s available were set free to execute new
requests/processes.
However the business critical request was still running and wasn’t moving ahead at all. The
database session associated was also not executing anything.
Challenge:
Since this being a critical business request, we couldn’t terminate the request coz we had
already lost few hours running it. At the same time the database session also wasn’t
performing any execution and the whole request was not going anywhere even though it
showed running normal status.
Trick:
Hence a new database session will get created as soon as the old one is killed and the
request starts running. Since the server on which the request is supposed to get processed
also had no issues now, the request went through very fast without any issues ;)
None of the users are able to login to the Oracle Apps R12 URL. The URL just hangs without giving any
information.
All the application services were up. Couldn’t find any significant load on the CPU and the number of concurrent
requests running at the time was normal.
Solution:
We would need to do changes to -Xms ( for start heap memory ) and -Xmx ( for maximum heap memory
) of the opmn.xml. Changing the Xmx to 512 MB and Xms to 128 MB will help.
>>>> Increase Java Heap Size for the OC4J instance as per the available memory (RAM) & restart the
instance.
You can do it with AS Control -> OC4J Instance -> Administration Tab -> Server Properties -> Java options.
Update -Xms -Xmx java options. Once updated, stop and start the OC4J instance to pick up the changes.
SOLUTION:
1. Compile jsp:
cd $FND_TOP/patch/115/bin
perl ojspCompile.pl --compile --flush
Error:
Solution:
adopmnctl.sh stop
$ORA_CONFIG_HOME/10.1.3/j2ee/forms/persistence/forms_default_group_1/jms.state.lock,
$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/persistence/oacore_default_group_1/jms.state.lock
$ORA_CONFIG_HOME/10.1.3/j2ee/oafm/persistence/oafm_default_group_1jms.state.lock
Requirement: Shared appl_top / Shared application tier file system. If not follow the Step 2 below.
How to perform:
2. Create a shared APPL_TOP by following Metalink Note 233428.1 for sharing the application tier files
system and allow the node 2 to share for concurrent manager node ( Node 1).
3. Edit context file on the Forms and Web node2 and change following context variables:
Issue:
All the concurrent managers are down with a status message: system hold, fix manager.
The administer Concurrent manager screen has Actual: 0 and Target: 1 for all managers.
- Please check the system profile: Concurrent: GSM Enabled. This should be set to ‘Y’
PL/SQL script to create libraries for FNDSM and FNDSVC and create Managers for Preexisting Nodes. Future
nodes will be handled by db trigger.
ERROR:
ORA-00257: archiver error. Connect internal only, until freed.
Cause:
- The error is caused by the fact that the database archiver process is unable to archive the current online redolog
due to lack of space in the destination for the archivelogs.
Solution:
The basic idea is to free space so as to make room for new archiving to happen. This can be addressed in
multiple ways.
- Imagine a situation where the space increased in step 1 gets filled, ie, 5 GB. Set an alternative archiving
destination, so that when the primary destination is full, archiving is automatically performed to the alternate
destination:
log_archive_dest_1='LOCATION=use_db_recovery_file_dest NOREOPEN
ALTERNATE=LOG_ARCHIVE_DEST_2'
log_archive_dest_2='LOCATION=/other_dest_for_archiving'
log_archive_dest_state_1='enable'
log_archive_dest_state_2='alternate'
db_recovery_file_dest='/db01/mine/oracle/product/10.1.0/db_1/flash_recovery_area'
db_recovery_file_dest_size=5G
- Check the archive_log_dest and verify if the path mentioned exists and is valid.
- Take a backup of the existing archive files (recommended) OR it can be deleted to make more free archiving
space.
This can be done at the server level where files can be manually deleted. However incase of ASM storage with
rman, below mentioned way is recommended (which would perform backup and then deleting):
Example :
The Release 12.0.4 instance was cloned from another identical instance.
Have tried clearing the cache (_pages). Have tried recompiling jsps and bouncing however the problem still persists.
Cleared all the Apache and related logs and found an interesting error.
$INST_TOP/logs/ora/10.1.3/j2ee/oacore/oacore_default_group_1/application.log
Solution:
Recently we came across a forms time out issue. All the user forms sessions were getting disconnected after an
Hour. The FORMS_TIMEOUT variable was set to 120 mins though. This should practically disconnect the forms
session after 2 hours.
Here the reason for the issue is because of the mismatch of the ICX and OC4J timeout session parameters.
OC4J session timeout, if not set, defaults to 20 minutes. This will cause the oc4j session to timeout
before the Apps/ Forms session timeout which is defined by profile option "ICX: Session Timeout"
Profile option "ICX: Session Timeout" and autoconfig variable "s_oc4j_sesstimeout" in context file should
match.
Example:
In case you need the session to timeout after 2 hrs then the profile option "ICX: Session Timeout" and
autoconfig variable "s_oc4j_sesstimeout" should be set to 120.
SOLUTION:
Some options of opatch:
Opatch apply –invPtrLoc
Opatch apply –no_inventory
Which opatch
~/Oraclemine/10.2.0/OPatch/opatch
(Oracle06) 5005469 - -bash $ opatch apply -invPtrLoc $ORACLE_HOME/oraInst.loc
Invoking OPatch 10.2.0.2.0
. Oracle interim Patch Installer version 10.2.0.2.0
@ Copyright (c) 2005, Oracle Corporation. All rights reserved..
. Oracle Home: /mine/oracle/oraclemine/10.2.0
Central Inventory: /mine/oracle/oraclemine/10.2.0/oraInventory
from : /mine/oracle/oraclemine/10.2.0/oraInst.loc
OPatch version: 10.2.0.2.0
OUI version: 10.2.0.2.0
OUI location: /mine/oracle/oraclemine/10.2.0/oui
Log file location:
/mine/oracle/oraclemine/10.2.0/cfgtoollogs/opatch/opatch-2006_Apr_25_21-58-34-PDT_Tue.log
. ApplySession applying interim patch '5005469' to OH/mine/oracle/oraclemine/10.2.0'
List of Homes on this system:
OPatchSession cannot load inventory for the given Oracle Home
/mine/oracle/oraclemine/10.2.0. Possible causes are:
No read or write permission to ORACLE_HOME/.patch_storage
Central Inventory is locked by another OUI instance
No read permission to Central Inventory
The lock file exists in ORACLE_HOME/.patch_storage
The Oracle Home does not exist in Central Inventory
.
Apply Session failed: ApplySession failed to prepare the system. No detail available.
System intact, OPatch will not attempt to restore the system
.
OPatch failed with error code 73
===========================================================================
I have checked that patch_lock file is not available on $ORACLE_HOME/.patch_storage and no lock on
Inventory. Also required permissions are exisitng for .patch_storage and oraInventory. .
lsinventory gives the following info
===========================================================================
(oracle06) 5005469 - -bash $ opatch lsinventory -invPtrLoc
$ORACLE_HOME/oraInst.loc
Invoking OPatch 10.2.0.2.0
. Oracle interim Patch Installer version 10.2.0.2.0
@ Copyright (c) 2005, Oracle Corporation. All rights reserved..
.Oracle Home : /mine/oracle/oraclemine/10.2.0
Central Inventory : / mine /oracle/ oraclemine /10.2.0/oraInventory
from : / mine /oracle/ oraclemine /10.2.0/oraInst.loc
OPatch version : 10.2.0.2.0
OUI version : 10.2.0.2.0
OUI location : / mine /oracle/ oraclemine /10.2.0/oui
Log file location :
/ mine /oracle/ oraclemine /10.2.0/cfgtoollogs/opatch/opatch-2006_Apr_25_22-00-16-PDT_Tue.log .
List of Homes on this system:
Inventory load failed... OPatch cannot load inventory for the given Oracle
Home.
Possible causes are:
Oracle Home dir. path does not exist in Central Inventory
Oracle Home is a symbolic link
Oracle Home inventory is corrupted
LsInventory Session failed: OracleHomeInventory::load() gets null oracleHomeInfo .OPatch failed with
error code 72
===========================================================================
Looks like $ORACLE_HOME is not attached to the local inventory. Attaching the ORACLE_HOME to the
inventory.
Run runClone.sh as mentioned under "Run 10g Cloning" step . This will resolve the issue
SQL> !pwd
/d02/oracle/proddb/9.2.0/admin/PROD_mine01/udump
SQL> alter session set tracefile_identifier=mine; ( this would set the trace file name as mine)
Session altered.
Database altered.
Target Instance:
This would copy the trace file to a new file named mine.sql and all the required changes can be done to mine.sql as
mentioned below:
vi mine.sql
esc:se nu
check where the create controlfile line starts ( double copy of create control file line)and delete till there.
esc:1,60d
if yes then bring the cursor to the last line of the wanted set
escd shift+g
Now change the path of data files and save the file .
esc:%s,oracle/proddata,oradev/devdata,g
The entire practice above is to create a new set of controlfile and below mentioned steps would check if all datafiles
have been copied properly:
vi mine.sh
esc:%s,',,g
esc:%s/,//g
esc:%s,^,ls -ltr ,g
chmod +x mine.sh
./mine.sh 2> mine.log
check the log file and see if there any data file missing.( mine.log file size shud be zero )
At this point we are ready with the control file and we are also sure that all data files have been copied to the target
instance.
Now open another session and keep monitoring the alert log file.
SQL> @mine.sql
Control file created.
Meanwhile go to the source instance and go to alert log file and do a tail -500 and check for the path of the log file
using the sequence number asked for recovery.
( In this case the sequence number is 88922, hence check in source instance for the log file path for this
sequence number . This will be there in alertlog file. Then change the path of log file according to the target
instance and give it. Sometimes this will ask for multiple files with different sequence number)
Check the alert log file while performing the below task.
There should be no errors.
SQL> startup;
ORACLE instance started.
Then Drop temp tablespace and create new temp tablespace. Then add temp files into it.
Oracle Process Manager (PM) is the centralized process management mechanism in Oracle Application Server and
is used to manage Oracle AS processes. It starts, stops, restarts and detects death of these processes. The Oracle
AS processes that PM is configured to manage are specified in the opmn.xml file. The start and stop functions are
executed by the OPMN as per the user commands.
OPMN (Oracle Process monitoring and Notification services ) are a set of processes that manage mid-tier
Application Server components like Oracle HTTP Server (Apache) and OC4J containers.
OPMN consists of the Process Manager and the Notification Server.
Oracle Notification Server (ONS) is the transport mechanism for failure, recovery, startup and other related
notifications between components in Oracle Application Server. It operates according to a publish-subscribe model:
an Oracle AS component receives a notification of a certain type as per its subscription to ONS. When such a
notification is published, ONS sends it to the appropriate subscribers.
Four parameters determine the behavior of the Oracle Process Manager and Notification services process in
managing the iAS middle tier comprising of OC4J instances and the Apache HTTP server. They are
a) restart-on-death
b) ping timeout
c) ping interval
d) reverse-ping timeout
The settings for these parameters need to be governed by the heap sizing of the OC4J container JVMs, the latencies
involved with garbage collection algorithms and the response times of the HTTP server.
The way in which the parameters affect the functioning of OPMN is as follows:
- OPMN pings the process managed by it,ie, OC4J instances and http server periodically and expects a response
within a certain time out period. OPMN would try this 3 times before it declares the process as dead (due to no
response) and then it would kill and restart the particular process. OPMN manages the failover and availability of the
processes it manages.
Reasons for Oracle HTTP Server not responding to OPMN ping could be:
- due to a high load of concurrent requests which requires many http server attention.
- because of timeouts between the various modules of Apache and the servers servicing client requests
- bulk data received from any of the modules.
- all new connections are not getting processed due to the server being fully occupied.
- it can spawn, with many connections remaining in the CLOSE_WAIT state
- due to thrashing when NFS hiccups cause files that need to be served to be unavailable to it
- because of synchronization issues with the various mutexes that it needs to support for the proper
functioning of its modules.
Reasons for OC4J containers not responding to OPMN ping could be:
While the container is processing servlet or EJB logic within the JVM within which it runs, new objects get created in
its heap memory area all the while.
When the garbage collection thread starts to run, it looks for objects that it can release to the heap memory pool
based upon several algorithms that depend upon the kind of references the objects have to themselves. Since the
collection is "generational", i.e., objects having references are promoted to an older generation and presumed to
have a longer lifetime, objects with weak references are candidates for "cleaning" up, and their occupied memory
gets released to the global heap of the JVM.
In this way, memory is reclaimed back into the the heap memory pool and made available for use in the creation of
newer objects. The forays made by the garbage collector to reclaim memory in the heap are governed by several
algorithms and every such collection takes a finite amount of time during which no other work of application
processing is possible. And when the collection is over the entire heap, the full GC consists of a
mark/sweep/compact cycles that "mark" the memory to be reclaimed, "sweep" the memory into the corresponding
generations and "compact" the holes created when the memory is reclaimed, in order as to create contiguous
memory for future object creation.
These strategies consume more time, as to be expected, and can result in a delay in the container responding to an
OPMN ping cycle. During such full GC scans, OPMN can and will kill and restart the container, causing it to lose the
state of the application or request it was processing at that time.
Since full GC scans (referred to to as stop-the-world scans) can happen at any time during the lifetime of a request or
an application, there is always the danger of OPMN killing a perfectly functioning container on the assumption that it
was "hung" since it was "unresponsive".
Heap memory settings for OC4J containers
Changes are made in the opmn.xml file in the <java-option> sections for each OC4J instance:
-Xms ( for start heap memory ) and -Xmx ( for maximum heap memory ).
The recommended settings for the -Xmx value are 512MB as typical applications need that much of memory to
avoid java.lang.OutOfMemoryError exceptions as seen from experience.
Start with an -Xms value of 128MB to prevent side effects of "Too many files open" errors when this setting is
higher, as garbage collection kicks in only later for higher -Xms values, resulting in open file handles not getting
released by the GC.
<java-option>-server -Xms128M -Xmx512M
This sets the min and max thread-pool sizes to the same value and the keepAlive parameter to "-1" -
recommended for production environments, this will ensure that idle threads are never destroyed to allow for
thread reuse without the overhead for new thread creation. The min, max and queue values can be left at the
default as specified here.
cd $ORACLE_HOME/appsutil/scripts/CRP3_MINEZ
As applcrp3 user:
cd $ADMIN_SCRIPTS_HOME
Restore the Backup into MINE8 server under /d21 mount point.
Setup Host File:
Change the owner Ship of /d21/oracrp3 folder and the file under it to applcrp3
cd /d21
su – applcrp3
cd /d21/applcrp3/CRP3/apps/apps_st/comn/clone/bin
Do you want the the target system to have the same port values as the source system (y/n) [y]? : n
Choose a value which will be set as APPLPTMP value on the target node [1]: 2
Cross Check if the Context File generated is correct or not, check with following command if the respective
components are enabled on MINE8:
su - applcrp3
cd /d21/applcrp3/CRP3/apps/apps_st/comn/clone/bin
CONTEXT_FILE configuration:
# sonapssh minez
$ su – applcrp3
1. Login to Oracle E-Bsonapness Suite as sysadmin user sonapng the internal URL
4. From the 'Find system profile option Values' window, select the server and get the valie MINE8 into it.
5. Query for %NODE%TRUST%. You will see a profile option named 'Node Trust Level'. The value for this profile
option at the site level will be Normal. Leave this setting unchanged.
6. Set the value of this profile option to External at the server level. The site level value should remain set to Normal
To change the value of the Responsibility Trust Level profile option at the responsibility level for a particular
responsibility, perform the following steps:
7. Login to Oracle E-Bsonapness Suite as sysadmin user sonapng the internal URL
10. From the 'Find system profile option Values' window, select the responsibility that you want to make available to
users logging in via the external web tier
11. Query for %RESP%TRUST%. You will see a profile option named 'Responsibility trust level'. The value for this
profile option at site level will be Normal. Leave this setting unchanged.
12. Set the value of this profile option for the chosen responsibility to External at the responsibility level. The site-level
value should remain Normal.
13. Repeat for all responsibilities that you want to make available from the external web tier.
1. Set the value of Application Server Security Authentication (s_appserverid_authentication) to SECURE, in the
CONTEXT_FILE on all the nodes.
3. After AutoConfig completes successfully, restart Oracle HTTP Server and OC4J processe
Change the following JVM parameter in the CONTEXT_FILE as mentioned in the below table:
Run Autoconfig
Run AutoConfig from ADMIN_SCRIPTS_HOME sonapng adautocfg.sh.
REFERENCE
Metalink Document: “Oracle E-Bsonapness Suite R12 Configuration in a DMZ” Document ID: 380490.1
By default, Oracle EBS R12 has forms 10g Stack in servlet mode.
Now the question is how is the client server connections handled?
In Servlet mode we have a java servlet called the forms listener servlet which is responsible for the
communication between the Forms java client and the oracle application serverforms services.
Unlike Socket mode, the Forms Servlet mode doesn’t require an additional forms port to handle communication
between client and the application server. The forms servlet architecture operates through the http server port.
All forms connections happen through the http port. Hence desktop clients can’t access forms directly in
servlet mode.
The servlet architecture is designed to work with industry standards, and also to be fully supported for advanced
network configurations with no additional ports or SSL configuration.
In Oracle Applications R12 customers who want load balancing must use the servlet implementation in which
forms servers can be balanced across multiple application servers by using a hardware load balancer along with
the 10g Application Server.
The entries:
serverURL=
connectMode=
Would be as mentioned below:
This can also be verified in the context file in 11i and R12:
We can change the forms servlet mode to socket and how we do it is:
Note: context file is the full path of the context file of the instance. Mode is the mode to which the form has to be
changed. Port number used to run Forms in socket mode. The default port number is 9095.A port number is not
needed if servlet mode is used. Recommended value for autoconfig is NO.
Note: If we need to change the forms mode from socket to servlet mode then all steps remain same except
for the script which we run and the verification step:
1. $FND_TOP/bin/txkrun.pl -script=ChangeFormsMode \
-contextfile=$INST_TOP/appl/admin/mycontext.xml \
-mode=servlet \
-runautoconfig=No
No Port number is required as it would use the http port.
2. Verification of servlet mode should reflect:
The "mode" directive displayed in Sun Java Console when launching forms- based applications, is set
to http,native
Direct Forms Servlet Launch is:
web_protocol>://<web_host>.<web_domain>:<web_port>/forms/frmservlet
>> Log in as Application user, set environment variable and run below:
$IAS_ORACLE_HOME/Apache/Apache/bin/httpd –version
>> Log in as Application user, set environment variable and run below query:
>> Log in as Application user, set environment variable and run below query:
>> Log in as Application user, set environment variable and run below query:
>>Log in as Application user, set environment variable and run below query:
Or
>> *.pld are source code of *.pll which are inturn source of *.plx. *.pll is in $AU_TOP/resource and to find its
version check
IGSAU012.pll:
$Header IGSAU012.pld 115.1.115100.1 2004/04/01 05:40:18 appldev ship $
Or
9. OA Framework Version
>> http:// hostname.domainName:port/OA_HTML/OAInfo.jsp (Only for 11i); Log in as Application user, set
environment variable and run below query:
>> Log in as Application user, set environment variable and run below query:
Discoverer Version for 11i or R12 (10g AS) >> Check under Application Server Section as 10g AS Discoverer
is on standalone.
version: 1
dn:
orcldirectoryversion: OID 10.1.4.0.1
or
SQL> select attrval from ods.ds_attrstore where entryid = 1 and attrname = ‘orcldirectoryversion’;
Or
Or
>> Metalink Note 605398.1: How to find the version of the main EM components