Lately I started implementing Data Guard - Physical Standby - as a DRP environment for our production E-Businsess Suite database and I must share with you one issue I encountered during implementation. I chose one of our test environments as a primary instance and I used a new server, which was prepared to the standby database in production, as the server for the standby database in test. Both are Red-Hat enterprise linux 4. The implementation process went fast with no special issues (at lease I thought so...), everything seems to work fine, archived logs were transmitted from the primary server to the standby server and successfully applied on the standby database. I even executed switchover to the standby server (both database and application tier), and switchover back to the primary server with no problems. The standby database was configured for maximum performance mode, I also created standby redo log files and LGWR was set to asynchronous (ASYNC) network transmission. The exact setting from init.ora file:
At this stage, when the major part of the implementation had been done, I found some time to deal with some other issues, like interfaces to other systems, scripts, configure rsync for concurrent log files, etc... , and some modifications to the setup document I wrote during implementation. While doing those other issues, I left the physical standby instance active so archive log files are transmitted and applied on the standby instance. After a couple of hours I noticed the following error in the primary database alert log file:
I don't remember if I've ever had a corruption in redo log file before... The primary instance resides on a Netapp volume, so I checked the mount option in /etc/fstab but they were fine. I asked our infrastructure team to check if something went wrong with the network during the time I got the corruption, but they reported that there was no error or something unusual. Ok, I had no choice but to reconstruct the physical standby database, since when an archive log file is missing, the standby database is out of sync'. I set the 'log_archive_dest_state_2' to defer so no further archive log will be transferred to the standby server, cleared the corrupted redo log files (alter database clear unarchived logfile 'logfile.log') and reconstruct the physical standby database. Meanwhile (copy database files takes long...), I checked documentation again, maybe I missed something, maybe I configured something wrong.. I have read a lot and didn't find anything that can shed some light on this issue. At this stage, the standby was up and ready. First, I held up the redo transport service (log_archive_dest_state_2='defer') to see if I'll get a corruption when standby is off. After one or two days with no corruption I activated the standby. Then I saw the following sentence in Oracle® Data Guard Concepts and Administration 10g Release 2 (10.2): One moment, I thought to myself, the standby server is based on AMD processors and the primary server is based on Intel's.. Is it the problem?! Meanwhile, I got a corruption in redo log file again which assured there is a real problem and it wasn't accidentally. So I used another AMD based server (identical to the standby server) and started all over again – primary and standby instances. After two or three days with no corruption I started to believe the difference in the processors was the problem. But one day later I got a corruption again (Oh no…) I must say that on the one hand I was very frustrated, but on the other hand it was a relief to know it's not the difference in the processors. So it is not the processors, not the OS and not the network. What else can it be?! And here my familiarity with the "filesystemio_option" initialization parameter begins (thanks to Oracle Support!). I don't know how I missed this note before, but all is written here - Note 437005.1: Redo Log Corruption While Using Netapps Filesystem With Default Setting of Filesystemio_options Parameter. When the redo log files are on a netapp volume, "filesystemio_options" must be set to "directio" (or "setall"). When "filesystemio_options" is set to "none" (like my instance before), read/writes to the redo log files are using the OS buffer cache. Since netapp storage is based on NFS (which is stateless protocol), when performing asynchronous writing over the network, the consistency of writes is not guaranteed. Some writes can be lost. By setting the "filesystemio_options" to "directio", writes bypasses the OS cache layer so no write will be lost. Needless to say that when I set it to "directio" everything was fine and I haven't gotten any corruption again. Aviad |
Tuesday, March 17, 2009
Corruption in redo log file when implementing Physical Standby
Posted by Aviad at 5:54 PM 2 comments
Labels: Data Guard, Network, Troubleshooting, Unix\Linux
Tuesday, March 10, 2009
JRE Plug-in “Next-Generation” – Part II
In my last post "JRE Plug-in “Next-Generation” – to migrate or not?" I wrote about a Forms launching issue in EBS right after upgrading JRE (Java Plug-in) to version 6 update 11 which works with the new next-generation Java Plug-in architecture. The problem happens inconsistently and it only works when I disable the "next-generation Java Plug-in". Following a SR I've opened to Oracle support about this issue, I was being asked to verify that the profile option "Self Service Personal Home Page Mode" is set to "Framework Only". We have this profile option set to "Personal Home Page" as our users prefer this way to the "Framework Only" way. It's important to note that "Personal Home Page" is not a supported value for the "Self Service Personal Home Page Mode" profile option and may cause unexpected issues. After setting the profile option to "Framework Only" the problem has resolved and the screen doesn't freezes anymore. So the solution in my case was to set the profile option "Self Service Personal Home Page Mode" to "Framework Only" (we are still testing it but it look fine so far), however there are two more options that seems to work, even when the profile option set to "Personal Home Page" and "next generation Java Plug-in" is enabled. 1) Uncheck "Keep temporary files on my computer" I'm not sure how or why, but it solves the problem, no more freezing this way.. 2) Set “splashScreen” to null - No need to bounce any service. Again, it's not so clear how or why, but it solves the problem as well. Now, we just need to convince our users to accept the "framework only" look and feel, and then we would consider upgrading all our clients to the new next-generation Java Plug-in. You are welcome to leave a comment or share your experience with the new Java Plug-in. Aviad |
Posted by Aviad at 11:22 AM 0 comments
Labels: Developer 6i, Troubleshooting, Upgrades
Wednesday, February 18, 2009
JRE Plug-in “Next-Generation” – to migrate or not?
It has been more than half a year since we've migrated from Oracle Jinitiator to Sun Java JRE Plug-in (Java 6 update 5) in our Oracle Applications (EBS) system, and I must say, I'm not satisfied yet. For the first months we had been struggling with a lot of mouse focus bugs which have made our users very angry about this upgrade. Although we've applied some patches related to this bugs, we still have some with no resolution. As part of an SR we had opened about mouse focus issue, we was advised by Oracle to install the latest Java JRE (Java 6 update 12 this days) as a possible solution for the remaining bugs. Starting with Java 6 update 10, Sun has introduced the new "next-generation Java Plug-in", which makes troubles with Oracle EBS. You can read more about this new architecture at Sun Java site - "What is next-generation Java Plug-in". Right after installing Java 6 update 11, I encountered a problem - when trying to open forms the screen freezes.
There is an unpublished opened bug for this problem: Bug 7875493 - "Application freezes intermittently when using JRE 6U10 and later". I've been told by Oracle support that they have some incompatibilities with the new next-generation architecture and that they are working with Sun about it. Meanwhile there are 2 workarounds: (the second doesn't work for me but suggested by Oracle support) 1) Disable the "next generation Java Plug-in" option: 2) Set the swap file to system managed + Tune the heap size for java: - Go to Control Panel -> Java -> Select the "Java" tab -> Click "View..." (in Java Applet Runtime Settings frame) -> update the "Java Runtime Parameters" field with: "-Xmx128m -Xms64m". This workaround doesn't work for me. For now, I've decided to stay with the "old" Java Plug-in 6 update 5 and do not upgrade our users to the new next-generation Java Plug-in. I Hope the following updates of Java Plug-in will be better or Oracle will publish a patch to solve this problem. I’ll keep update as soon as I have more info’. Aviad |
Posted by Aviad at 12:42 PM 5 comments
Labels: Developer 6i, Troubleshooting, Upgrades
Thursday, January 29, 2009
How to enable trace for a CRM session
Posted by Aviad at 5:30 PM 8 comments
Labels: Sql scripts, Troubleshooting
Thursday, August 7, 2008
How to Configure OEM 10g Database Control after Clone
After cloning an EBS environment I had tried to start the OEM 10g Database Control (DBConsole) and I got this message: [oratest@testsrv1 ~]$ emctl start dbconsole However, it was an acceptable message since DB Console wasn't configured to this instance yet. Using emca I've tried to recreate the DB Control configuration files as follow: [oratest@testsrv1 ~]$ emca -config dbcontrol db ... Well, I thought it looks fine, but when I opened the DB Console I saw this message at the top of the page: error: After some research, logs digging and Metalink searches, I found that the Agent component should be relinked manually. I will show my actions step by step:
Following this procedure will make the DBConsole configured and work for the new cloned instance. |
Posted by Aviad at 1:21 PM 0 comments
Labels: OEM, Troubleshooting
Tuesday, July 29, 2008
How to enable FND_HELP search by creating an index on FND_LOBS efficiently
Have you ever tried to use the search option of Online Help in Oracle Applications? I checked it on firefox, hope to get more accurate message, and I got this: I checked fnd_help package and it's compiled and looks fine. These errors appeared in error_log_pls: [Mon Jul 28 10:34:54 2008] [warn] mod_plsql: Stale Connection due to Oracle error 20000 I found note 306239.1 - "Cannot Search Online Help After Fresh Install of 11.5.10" which suggest that Applications interMedia Text indexes are corrupt. In my instance it even wasn't exist... I followed this note which instructs to:
But aflobbld.sql had been running for more than 10 hours and the size of DR$FND_LOBS_CTX$I table has reached to 35 GB ! Note 396803.1 - "FND_LOBS_CTX is having huge size, how to reduce the sizeof the index?" suggests it's a bug, indexing all documents in FND_LOB table, also the binary files, while using wrong filter. So how can we make aflobbld.sql to index only FND_HELP documents? For each row in FND_LOBS table the file_format column is populated with one of the following values: IGNORE, BINARY, TEXT. Note 397757.1 - "How to Speed Up Index Creation on FND_LOBS by indexing Only FND_HELP Data" suggests the steps to do it. These are the steps:
You are welcome to leave a comment . Aviad |
Posted by Aviad at 11:57 AM 2 comments
Labels: AOL, Troubleshooting
Tuesday, June 24, 2008
How to execute TKPROF on trace files larger than 2GB ? --> Use pipe
Here is a nice trick to work with files larger than 2GB on Unix/Linux using pipe. First case - TKPROF When trying to execute TKPROF on a trace file larger than 2 GB I got this error:
In order to successfully execute TKPROF on this trace file you can use the mkfifo command to create named pipe as follow:
This way you'll successfully get the output file.
Second case - spool Similar issue with spool to file larger than 2GB can be treat similarly.
Related Notes: Note 62427.1 - 2Gb or Not 2Gb - File limits in Oracle Aviad |
Posted by Aviad at 1:54 PM 1 comments
Labels: DB Tools, Troubleshooting, Unix\Linux
Friday, June 6, 2008
Mix of Old & New style buttons in OA Framework pages
After some heavy patches applied on our system we noticed that some buttons in OAF pages looks like the old style gray buttons while the others are fine new style yellow buttons.
(The "Advanced" is the old style and all the others are the new style) Trying to clear cache ($COMMON_TOP/_pages) and bounce Apache didn't solve the problem. The solution is hiding within jserv.properties:
And the problem will be resolved...
Related Note: 368188.1 - Buttons Are Not Rendering Correctly In Self Service Framework Pages. Aviad |
Posted by Aviad at 4:59 PM 0 comments
Labels: AutoConfig, Troubleshooting
Thursday, May 29, 2008
FND_GLOBAL affected by New Global Performance Changes
After applying ATG Rollup 5 patch (and above) we discovered an issue with some of our custom developments. ORA-20001: Oracle error -20001: ORA-20001: Oracle error -4092: ORA-04092: cannot SET NLS in a trigger and this: ORA-20001: Oracle error -2074: ORA-02074: cannot SET NLS in a distributed transaction has been After some debug work we found that this issue happens when executing FND_GLOBAL.apps_initialize more than once within a trigger/via a db link in the same transaction. According to Note: 556391.1 - "ORA-02074: Cannot SET NLS in a Distributed Transaction" this issue cause by a new global performance changes. Oracle Development said: "Very sorry if the new global performance changes have exposed you to this error, but there is no way we can back out these changes. They are not only complex and wide spread but required to maintain functional performance levels. Using fnd_global to change user/resp context from a trigger is not only not supported it is ill advised." OK, So we had to find a workaround to this issues and we found two... I'll start with a sample of the new behavior of fnd_global to demonstrate the issue and the solutions/workarounds will come right after. SQL> create table test1 (a number, b number); SQL> insert into test1 (a) values (1001); SQL> insert into test1 (a) values (1002); SQL> commit; SQL> create or replace trigger test1_trg_bi SQL> select fnd_global.user_id from dual; SQL> update test1 set b=1101 where a=1001; SQL> select fnd_global.user_id from dual; SQL> update test1 set b=1102 where a=1002; update test1 set b=1102 where a=1002 ORA-20001: Oracle error -20001: ORA-20001: Oracle error -4092: ORA-04092: cannot SET NLS in a trigger As you can see, the second update failed because apps_initialize was executed for the second time in the same transaction. Now I'll show two ways to workaround this issue: 1) As suggested in Note: 556391.1 - "ORA-02074: Cannot SET NLS in a Distributed Transaction" a wrapper Concurrent Request which contain a call to the context set (apps_initialize) and afterwards submits the original request, is one possible solution. instead: create or replace trigger test1_trg_bi create the following trigger: create or replace trigger test1_trg_bi additionally - create a new plsql concurrent (WRAPPER_CONC) that contains the fnd_global.apps_initialize and submits the ORIGINAL_CONC concurrent request. This way, the apps_initialize statement executed in a separate transaction with no error. This is the preferred and recommended solution by Oracle. 2) The second solution is easier to implement, works fine but according to Note: 556391.1 is not supported since it contains calls to fnd_global within a database trigger. Anyway... The idea is to call the apps_initialize in an Autonomous Transaction procedure. Follow this sample: SQL> create or replace procedure test1_apps_init (p_user_id number) is Procedure created SQL> create or replace trigger test1_trg_bi Trigger created SQL> select fnd_global.user_id from dual; SQL> update test1 set b=1101 where a=1001; SQL> select fnd_global.user_id from dual; SQL> update test1 set b=1102 where a=1002; SQL> select fnd_global.user_id from dual; As you can see, the update statements were executed successfully this time and the session was updated with the appropriate user context in each update statement. Those two solutions are working fine, but keep in mind that the second is not supported. You are welcome to leave a comment. Aviad |
Posted by Aviad at 12:59 PM 8 comments
Labels: AOL, Patches, Troubleshooting
Monday, February 4, 2008
UTL_FILE_DIR issue after applying patch 5985992 'TXK AUTOCONFIG RUP Q'
Do you have more than 240 characters in your utl_file_dir? if so, you should read this before applying patch 5985992 'TXK AUTOCONFIG RUP Q (Jul/Aug 2007)'. After applying this patch, AutoConfig on database tier failed with the following error: [PROFILE PHASE] AutoConfig is exiting with status 1 It wasn't clear why afdbprf.sh failed so I ran it manually from ssh terminal and I got this: afdbprf.sh started at Tue Jan 29 17:43:21 IST 2008 The environment settings are as follows ... ORACLE_HOME : .... Application Id : 0 Looking into afdbprf.sql (executed by afdbprf.sh) reveals the problem: ....... --Setting BIS_DEBUG_LOG_DIRECTORY -- This profile option was earlier set in addbprf.sql via bug 2843457, Now moved here for bug 5722442 In order to fix bug 5722442, the UTL_FILE_LOG updated with the value of s_db_util_filedir from the database context file and a new bug was created (not a bug according to Bug 6404909). If the s_db_util_filedir contains more than 240 characters it can't be stored in a profile since the PROFILE_OPTION_VALUE column defined as varchar2(240). The s_db_util_filedir initialized when creating the database context file by adbldxml.pl, and set up with the value of utl_file_dir database parameter. I'm not sure why it should be updated with all directories within utl_file_dir and not with the relevant directories only...?! The solution according to Note:458511.1 - "After patch 5985992 AutoConfig On Database Tier Fails with script afdbprf.sh" is to change the value of s_db_util_filedir in the database context file to a value less the 240 characters and run AutoConfig again. And it works, of course... What should I do if I my utl_file_dir contains more than 240 characters?! Actually I don't have a good answer to this question but I will try to locate all the places on which this issue might affect when s_db_util_filedir will be updated with a value less than 240 chars.
You are welcome to leave a comment or update with additional information regarding this issue. Aviad |
Posted by Aviad at 5:10 PM 2 comments
Labels: AutoConfig, Patches, Troubleshooting
Monday, January 21, 2008
Oracle Discoverer Query Prediction functionality and Performance
Lately we noticed that our Discoverer reports runs very slow. What is Query Prediction in Discoverer? “Discoverer includes functionality to predict the time required to retrieve the information in a Discoverer query. The query prediction is the elapsed time while the following message appeared on the bottom left of Discoverer Desktop window: "Determining query time estimate". For each report we tested, we found query prediction runs 30%-50% (!!!) from the report’s total run time. Next phase was to start a SQL trace on Discoverer session to see what actually happens when running a Discoverer report. This is the relevant section from the SQL Trace: SELECT QS_ID, QS_COST, QS_ACT_CPU_TIME, This table records query prediction statistics while running Discoverer reports. There is no logic by estimating query run time longer than the report’s query itself… Since the query prediction functionality is important to our users we avoid from disable this functionality (by setting the QPPEnable to 0). I tried to find information about purging the EUL5_QPP_STATS and I found this: “How to delete old query prediction statistics” in Oracle® Business Intelligence Discoverer Administration Guide 10g Release 2 (10.1.2.1) There is a SQL script at [ORACLE_ HOME]\discoverer\util\eulstdel.sql – that deletes all query prediction statistics that were created before a specified date. Great! I had no choice but rebuild the EUL5_QPP_ENABLE table (by export, drop table and import). After recreation of EUL5_QPP_STATS table I ran a Discoverer report again and query prediction takes insignificant time, almost nothing… :-) This is from the trace I took after: SELECT QS_ID, QS_COST, QS_ACT_CPU_TIME, I checked this issue on Discoverer Desktop 10g (10.1.2.2) but it is relevant to the web tools (Discoverer viewer and Discoverer Plus) as well, since the query prediction functionality exist in these tools like in the client version. You are welcome to leave a comment. Aviad |
Posted by Aviad at 5:18 PM 11 comments
Labels: Discoverer, Performance, Troubleshooting
Wednesday, October 10, 2007
Troubleshooting after Upgrade Oracle Applications 11i to 10g
Following the last post on Troubleshooting during Upgrade Oracle Applications 11i to 10g, in this post I'm going to write about troubleshooting AFTER upgrade Oracle Applications 11i to 10g. |
Posted by Aviad at 12:30 PM 1 comments
Labels: Troubleshooting, Upgrades
Wednesday, October 3, 2007
Troubleshooting during Upgrade Oracle Applications 11i to 10g
During the Oracle Apps Database upgrade to 10g that I wrote about in the previous post, I ran into some errors. In Oracle_Server.log: ($ORACLE_HOME/cfgtoollogs/dbua/[SID]/upgrade/)
Hope you won't get into this errors, but if so, you can use this post as a reference... :-) Feel free to leave a comment or to share your experience with 10g upgrade! You can also register for email subscription to this blog using the box at the right side menu bar. Aviad |
Posted by Aviad at 9:20 AM 6 comments
Labels: Troubleshooting, Upgrades
Tuesday, September 25, 2007
Login Page return "Page Not Found" Error
Today I cloned a new test environment on a new server, after all services startup I tried to get the login page by http://ServerName.domain:port/OA_HTML/AppsLocalLogin.jsp but I got the error message “The page cannot be found”. |
Posted by Aviad at 10:23 AM 3 comments
Labels: Troubleshooting





