Tuesday, January 26, 2010

Patching OMS to 10.2.0.5 problem

When patching to OMS 10.2.0.5 on Windows, this error encountered:
ADMN-705021

The configuration files for this Oracle Application Server instance are inconsistent with the
configuration stored in the repository. In order to protect the repository,
no further configuration or deployment operations are allowed until the problem with the configuration on the filesystem is resolved. This condition arises when a prior operation was unsuccessful. The exception associated with this failed operation is:

{0}

. Please also check the logs located at
ORACLE_HOME/dcm/logs to determine why DCM was unsuccessful in updating
the configuration files on disk. Some possible causes are:

* permissions on files
* file contention issues on Windows NT
* internal Oracle error

After resolving the problem that prevented DCM from updating the configuration
files, you may use the dcmctl resyncInstance command to resolve the problem.
Alternatively, you can stop and then restart the active dcmctl or EMD
process and resyncInstance will automatically be performed.
Resolution:

Base Exception:
Transaction failed in Plugin cannot rename old configuration file:e:\OMS\oms10g\diagnostics\config\logloader.xml.
Resolution:
Transaction failed in Plugin.
Just run %ORACLE_HOME%\dcm\bin\dcmctl shutdown and retry the patch.

Wednesday, January 20, 2010

Install Enterprise Linux on HP dx2700

Installing Linux on HP dx2700 was a pain. On first trial, the installer was hang on loading ata_piix driver. The BIOS setting for SATA Port 0/1 Working Mode was Native.
On second trial, I set the hard drives setting on BIOS to None (Like the one I used on Windows 2003 installation). The installation went OK until reboot. The computer displayed "Error loading operating system". Then I realized that I haven't reenabled the hard disk and changed the boot sequence. Also I changed SATA Port 0/1 Working Mode to Legacy. After that everything was OK.
Of course if I set BIOS setting for SATA Port 0/1 Working Mode to Legacy before installation. The installation will be fine, but the hard drive will be detected as hda, the performance will be poor.

Friday, January 15, 2010

Remove Enterprise Manager from EBS Database

Shutdown and startup database in restrict mode.
Run this sql as sysdba: emca -deconfig dbcontrol db -repos drop

Tuesday, January 12, 2010

Cancel Invoice error with AP_INV_IS_CREDITED_INV

When canceling invoice, AP_INV_IS_CREDITED_INV error shown. There is a correction on the invoice. You have to fix the data directly on database. Use the following steps to fix the data:
1. Login as apps user to the database.
2. Identify the invoice_id of the invoice to be canceled using
select invoice_id from ap_invoices_all where invoice_num='your invoice number'
3. Verify that your invoice is a corrected invoice using
select invoice_id, line_number from ap_invoice_lines_all where invoice_id = corrected_inv_id
4. You should see your invoice_id on the result, if not then you are facing another problem.
5. Fix the data using this sql
update ap_invoice_lines_all set corrected_inv_id=null where invoice_id='your invoice id from step 2' and line_number='line number from step 3'
6. Don't forget to commit.
7. Cancel your invoice from application.

Friday, December 11, 2009

Be very careful when using tar

I often use tar to make cold database file backup since one big file is faster to copy via network. One time I accidentally entered wrong command on tar, I entered 'tar cvfj /u01/oracle/DEV/db/apps_st/data/* data.tar.bz2'. The tar ran fine until encountered error at the end with no tar file created. Then I realized that the tar command should be 'tar cvfj data.tar.bz2 /u01/oracle/DEV/db/apps_st/data/'.
When I tried to start the DEV database instance, it woudn't start. It said a_archive01 is corrupted (I don't remember the exact error). Luckily it was a DEV instance, I can easily clone again from production instace.
I haven't tried it for second time to make sure it was wrong tar command that made the corruption, but still it is better to be more careful.

Tuesday, December 1, 2009

Exception trying to access the repository. java.sql.SQLException: ORA-02291: integrity constraint (SYSMAN.MGMT_ARU_FAM_PRD_PRD_FK) violated

Problem: Trying to refresh from My Oracle Support on Grid Control 10.2.0.5 and receive Exception trying to access the repository. java.sql.SQLException: ORA-02291: integrity constraint (SYSMAN.MGMT_ARU_FAM_PRD_PRD_FK) violated - parent key not found.
Solution: Go to Deployment tab, select Provisioning > Administration. On Software Library Configuration section, select Purge to purge deleted entities.

Friday, October 30, 2009

Clone E-business suite and grid control problem

When discovering oracle applications on grid control 10.2.05, you encounter error "Wrong System Name" or "Waited for five minutes" and you see the context file mentioned on the log is not correct, then
1. Source your environment for EBusiness Suite instance.
2. Run sqlplus as apps user
SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
COMMIT;
EXIT;
3. Run AutoConfig on all tiers, firstly on the DB tier and then the APPS tiers, to repopulate the required system tables.
4. Bounce Agent.
5. Retry to discover EBusiness Suite instance.

Wednesday, October 28, 2009

Grid Agent URL connection interrupted

When trying to open agent URL, something like https://host:3872/emd/main, you receive connection interrupted message on your browser. Go to your agent home/bin directory.
> ./emctl stop agent
> ./emctl secure agent
> ./emctl start agent

EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet..

When you execute "emctl upload" command, you receive "EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet..."
Check your repository URL, you probably use secure connection to OMS, change the URL to https://oms_server:1159/em/upload. Restart your agent.

Patching Setup - My Oracle Support authorization failed

When you receive this message when setup patching on Grid Control 10.2.0.5: "My Oracle Support authorization failed. - Although metalink credentials are correct and successfully validated, an error occurred while downloading a sample patch from the patch url specified. Please check log files for details." then go see the log file on $ORACLE_HOME/sysman/log/emoms.log.
Just see some lines at the end of the file, use tail -n 100 emoms.log.
If you see ORA-14400, then using sqlplus and as sysman, run this on sqlplus:
exec emd_maintenance.analyze_emd_schema(‘SYSMAN’);

Friday, July 31, 2009

Unable to compile invalid object ORA-04030

Solution from http://oracledbas.blogspot.com/2009/02/ora-04030-out-of-process-memory.html

SQL> alter package apps.XLA_00200_AAD_S_000010_PKG COMPILE BODY;
alter package apps.XLA_00200_AAD_S_000010_PKG COMPILE BODY
*
ERROR at line 1:
ORA-04030: out of process memory when trying to allocate 4108 bytes (PLS
non-lib hp,pdzgM64_New_Link)

Solution
1.SQL>select object_name,object_type from dba_objects where status='INVALID';
OBJECT_NAME OBJECT_TYPE
----------------------------------- -------------------
XLA_00200_AAD_S_000010_PKG PACKAGE BODY
XLA_00200_AAD_S_000011_PKG PACKAGE BODY

2. SQL> alter system set plsql_optimize_level =0;
System altered.

3.SQL> alter package apps.XLA_00200_AAD_S_000010_PKG COMPILE BODY;
Package body altered.

4.SQL> alter package apps.XLA_00200_AAD_S_0000011_PKG COMPILE BODY;
Package body altered.

5.SQL> alter system set plsql_optimize_level =2;
System altered.

Thursday, July 30, 2009

Don't forget to turn SLA: Enable Diagnostic off

If you need to set SLA: Enable Diagnostic to yes, then you must set it back to no right after you run your SLA request. If you forget to do so, your database will grow rapidly. Mine has grown 1.6 Gb in only one day!

Monday, July 27, 2009

Blank Page Accessing R12 - 'Missing class: _RF' in OACore application.log

Applies to:

Oracle Applications Technology Stack - Version: 12.0
This problem can occur on any platform.

Symptoms

On 12.0, trying to connect to the home page (http://<server>.<domain>.<port#>), redirects to http://<server>.<domain>.<port#>/OA_HTML/AppsLocalLogin.jsp which shows a blank page.

Further more, the application.log file of the OACore OC4J shows the following error stack:

javax.servlet.ServletException: oracle.classloader.util.AnnotatedClassNotFoundException:

Missing class: _RF

Dependent class: oracle.jsp.runtimev2.JspPageInfo
Loader: oc4j:10.1.3
Code-Source: /oracle/apps/tech_st/10.1.3/j2ee/home/lib/ojsp.jar
Configuration: <code-source> in META-INF/boot.xml in /oracle/apps/tech_st/10.1.3/j2ee/home/oc4j.jar

This load was initiated at oacore.web.html.jsp8892557:0.0.0 using the loadClass() method.

The missing class is not available from any code-source or loader in the system.
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:387)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)

Cause

JSPs need recompilation.


Solution

-- To implement the solution, please execute the following steps:
Either:
A. Set the JSP compilation to Automatic using the following steps:
1. Use the vi editor to edit the $CONTEXT_NAME.xml context file used by AutoConfig and change the value for "s_jsp_main_mode" from "justrun" to "recompile" (without the double quotes)

NOTE
~~~~~
Backup the context file before editing it.

2. Run Autoconfig to propagate the changes to the configuration files.

3. Verify that now the
$INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml has

<init-param>
<param-name>main_mode</param-name>
<param-value>recompile</param-value>
</init-param>

4. Restart the Middle Tier services and access the applications to load JSP's which will cause them to be recompiled on the run.

5. After successfully accessing the applications, use the vi editor to edit the $CONTEXT_NAME.xml context file used by AutoConfig and revert the value for "s_jsp_main_mode" to "justrun" (without the double quotes) in order not to hamper the performance of your system.

6. Run AutoConfig to propagate the changes.

NOTE
~~~~~

You can always use the next option to compile JSP's manually at any time.

OR
B. Recompile the JSP manually using the following steps:
1. Telnet to your server using applmgr user and source the environment by running the script:

/oracle/apps/apps_st/appl/APPS<SID>_<host>.env

2. Run the commands

UNIX

cd $FND_TOP/patch/115/bin
perl ojspCompile.pl --compile --flush -p 2

Windows

cd %FND_TOP%\patch\115\bin
- perl -x ojspCompile.pl –compile –flush

3. Restart the Middle Tier services.