Sunday, August 28, 2011

Gather Schema Statistics Failed after Major Upgrades >> Few Common Issues..

Issue: Customer reported "Gather Schema Statistics" concurrent program Erroring out after Major Upgrades as part of PMP.

Troubleshooting:

Reviewed the history and found that request ran successfully earlier 2weeks to this Task.

Req ID : 9065020 Gather Schema Statistics

Error logs :-

ORACLE error 6550 in FDPSTP

Cause: FDPSTP failed due to ORA-06550: line 1, column 7:

PLS-00307: too many declarations of 'GATHER_SCHEMA_STATS' match this call

ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

.

After searching Metalink found below related note :

Gather Schema Statistics Fails with PLS-00307: Too Many Declarations Of GSS (Doc ID 951033.1)

Reviewed and worked accordingly

SQL> select ARGUMENT_TEXT from fnd_concurrent_requests where request_id = '9065020';

ARGUMENT_TEXT

--------------------------------------------------------------------------------

ALL, 25, 3, NOBACKUP

Compared to the list of parameters to the successful Request ID, and found that there are many other parameters .

Also took double confirmation comparing with that of Production Instance

Request ID with parameters ALL, 10, 4, NOBACKUP, , LASTRUN, GATHER AUTO, , Y ==>> for Gather Schema Statistics IN Prod

Workaround 1:-

-------------

Ran new request with complete parameters similar to that of Production...

9087325 ==> ALL, 25, 3, NOBACKUP, , LASTRUN, GATHER AUTO, , Y

Now request went bit further and failed again...

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

****** AGAIN Request Failed , But for diff error *****

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

New Error Information:

-1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated

Unable to correctly update the history table - fnd_stats_hist.

-1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated

Unable to correctly update the history table - fnd_stats_hist.

-1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated

Unable to correctly update the history table - fnd_stats_hist.

-1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated

Unable to correctly update the history table - fnd_stats_hist.

-1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated

Unable to correctly update the history table - fnd_stats_hist.

-1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated

ORA-20005: object statistics are locked (stattype = ALL)

+---------------------------------------------------------------------------+

End of log messages from FND_FILE

+---------------------------------------------------------------------------+

+---------------------------------------------------------------------------+

Executing request completion options...

Finished executing request completion options.

+---------------------------------------------------------------------------+

Concurrent request completed

Current system time is 28-AUG-2011 16:51:59

+--------------------------------------------------------------------------

Researched again for this new error in Metalink... and found below note

Workaround 2:

----------------

Solution: Support Note 781813.1

Find out all duplicates and/or obsolete rows in FND_HISTOGRAM_COLS and delete one of them.

Remember to take backup of the FND_HISTOGRAM_COLS table before deleting any data.

SQL> select table_name, column_name, count(*)

from FND_HISTOGRAM_COLS

group by table_name, column_name

having count(*) > 1; 2 3 4

TABLE_NAME COLUMN_NAME COUNT(*)

------------------------------ ------------------------------ ----------

JE_FR_DAS_010 TYPE_ENREG 2

JE_FR_DAS_010_NEW TYPE_ENREG 2

JE_BE_LINE_TYPE_MAP SOURCE 2

JG_ZZ_SYS_FORMATS_ALL_TL JGZZ_EFT_TYPE 2

JE_BE_LOGS DECLARATION_TYPE_CODE 2

JE_CH_PAYMENT_REF PAYMENT_TYPE 2

JG_ZZ_SYS_FORMATS_ALL_B JGZZ_EFT_TYPE 2

JE_BE_VAT_REP_RULES LINE_TYPE 2

JE_BE_VAT_REP_RULES SOURCE 2

JE_BE_VAT_REP_RULES VAT_REPORT_BOX 2

10 rows selected.

-- Use above results on the following SQL to delete duplicates

delete from FND_HISTOGRAM_COLS

where table_name = '&TABLE_NAME'

and column_name = '&COLUMN_NAME'

and rownum=1;

-- Use following SQL to delete obsoleted rows

delete from FND_HISTOGRAM_COLS

where (table_name, column_name) in

(

select hc.table_name, hc.column_name

from FND_HISTOGRAM_COLS hc , dba_tab_columns tc

where hc.table_name ='&TABLE_NAME'

and hc.table_name= tc.table_name (+)

and hc.column_name = tc.column_name (+)

and tc.column_name is null

);

Deleted all the duplicates .. IN my case I dont have any obsolete rows.. SO next queue is not useful this time...

Verification:

SQL> select table_name, column_name, count(*)

from FND_HISTOGRAM_COLS

group by table_name, column_name

having count(*) > 1; 2 3 4

no rows selected

SQL> sho user

USER is "APPS"

9087344 == > Gather Schema statistics >>> Failed again....

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

****** AGAIN Request Failed , But for diff error *****

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

After research found that

ORACLE error 20005 in FDPSTP

Cause: FDPSTP failed due to ORA-20005: object statistics are locked (stattype = ALL)

ORA-06512: at "APPS.FND_STATS", line 806

ORA-06512: at line 1

.

General Procedure:

-------------------

Check all the tables which come under Locked status :

select owner,table_name from dba_tab_statistics where stattype_locked is not null;

For each and every table , unlock using below query

dbms_stats.unlock_table_stats(OWNER,TABLE);

Finally Now execute the Gather Schema Statistics and see its getting successful.

Ex : 9087399 ==> Gather Schema Statistics >>> Completed Normal




Thanks

Kiran Ginni

Saturday, August 20, 2011

Issue : HRMS Patching in R12 facing below issue." ORA-01017: invalid username/password; logon denied"

While Performing HRMS Patching in R12 facing below issue.

Details :

RELEASE_NAME

--------------------------------------------------

12.1.1

DB :

11.2.0.1.0

OS :

Linux auohspten04 2.6.18-92.1.17.0.2.el5 #1 SMP Tue Nov 18 05:20:06 EST 2008 x86_64

cat: /etc/redhat-lsb: read error [Is a directory]

Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)

Activity: Patch 10281212 (ALL) ==> Release 12.1 HRMS RUP4

Issue :

Patch failed and here is the terminal Output:

NOTE: If you do not currently have certain types of files installed

"u10281212us.log" [readonly] 5005L, 286643C

Time is: Sat Aug 20 2011 22:37:16

FAILED: file otlouk1drp.sql on worker 1 for product ota username OTA.

Time is: Sat Aug 20 2011 22:39:06

ATTENTION: All workers either have failed or are waiting:

FAILED: file otlouk1drp.sql on worker 1.

FAILED: file sspdlcon.sql on worker 2.

ATTENTION: Please fix the above failed worker(s) so the manager can continue.

Current time is: Sat Aug 20 2011 22:39:06

Checked the Log files :

From adwork001.log :

"adwork001.log" [readonly] 179L, 4550C

Connecting to APPS......Connected successfully.

Time when worker started job: Sat Aug 20 2011 22:37:17

Start time for file is: Sat Aug 20 2011 22:37:17

Connecting to OTA......Unable to connect.

AD Worker error:

The following ORACLE error:

ORA-01017: invalid username/password; logon denied

occurred while executing the SQL statement:

CONNECT OTA/*****

from adwork002.log :

Start time for file is: Sat Aug 20 2011 22:37:17

Connecting to OTA......Unable to connect.

AD Worker error:

The following ORACLE error:

ORA-01017: invalid username/password; logon denied

occurred while executing the SQL statement:

CONNECT OTA/*****

Time when worker failed: Sat Aug 20 2011 22:38:57

Connecting to APPS......Connected successfully.

Manager says to quit.

Investigation & Workarounds:-

----------------------

Tried to connect as OTA & SSP users from backend terminals

$ sqlplus OTA/xxxxxx

SQL*Plus: Release 10.1.0.5.0 - Production on Sun Aug 21 01:21:04 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

$ sqlplus SSA/xxxxxx

SQL*Plus: Release 10.1.0.5.0 - Production on Sun Aug 21 01:22:01 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

Shows that none of the above two users getting connected...

Tried to change the passwords to apps using FNDCPASS:

FNDCPASS apps/xxxxxx 0 Y system/Y6bMC8me ORACLE OTA xxxxxxx

FNDCPASS apps/xxxxxx 0 Y system/Y6bMC8me ORACLE SSP xxxxxxx

Note : These are Apps DB accounts so, used "ORACLE" as mode for FNDCPASS utility.

Verify the logs and see if the password properly updated.

Now again verifying from backend sql prompt

SQL> conn OTA/xxxxxx

SQL> sho user

USER is "OTA"

SQL> conn SSP/xxxxxx

Connected.

SQL> sho user

USER is "SSP"

Worked...

Trial 1:-

----------

Now using adctrl tried to restart the failed workers ...

Still facing same issue....

Next: Upon investigation found that Patch was still picking old passwords from cache. Its not able to get the newly updated passwords.

Final Solution: Started the patch from scratch which now picked correctly updated new passwords and patch successfully got applied.

Learning:-

------------

Whenever facing such user account connectivity issues. Though we fix the issue we need to make sure that the whole patch need to be restarted again to get things affected.

Note: Before doing that make sure your patch has no side effects to restart from beginning.

Estimate how much more downtime this will turn out?

In case you are planning in Production. Make sure you gather all the knowledge in Non-Prod Iteration and proactively change the passwords before applying in Production..

This will certainly save your time and effort.

>>>> Have a happy reading <<<<<

Thanks

Kiran G

Issue : R12 Apache Service not coming UP after performing HRMS Upgrade & Autoconfig.

Apps : 12.1.3

Database : 11.2.0.2

Checking the status of Apache service using below command

[AMD64] apkiranginni@kiranginni > adapcctl.sh start

You are running adapcctl.sh version 120.7.12010000.2

Starting OPMN managed Oracle HTTP Server (OHS) instance ...

opmnctl: opmn is already running.

opmnctl: starting opmn managed processes...

================================================================================

opmn id=kiranginni:10025

no processes or applications matched this request

adapcctl.sh: exiting with status 0

adapcctl.sh: check the logfile /kiranginni/mtlog/kiranginni_kiranginni/logs/appl/admin/log/adapcctl.txt for more information ...

On Another Node 08:

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

You are running adapcctl.sh version 120.7.12010000.2

Starting OPMN managed Oracle HTTP Server (OHS) instance ...

opmnctl: opmn is already running.

opmnctl: starting opmn managed processes...

================================================================================

opmn id=ramuginni:10025

0 of 1 processes started.

ias-instance id=kiranginni_ramuginni.ramuginni.mydomain.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

--------------------------------------------------------------------------------

ias-component/process-type/process-set:

HTTP_Server/HTTP_Server/HTTP_Server/

Error

-> Process (index=1,uid=1849172640,pid=9919)

failed to start a managed process after the maximum retry limit

Log:

/kiranginni/mtlog/kiranginni_ramuginni/logs/ora/10.1.3/opmn/HTTP_Server~1.log

adapcctl.sh: exiting with status 0

adapcctl.sh: check the logfile /kiranginni/mtlog/kiranginni_ramuginni/logs/appl/admin/log/adapcctl.txt for more information ...

.end std out.

.end err out.

From error Log :

/kiranginni/inst/apps/kiranginni_ramuginni/ora/10.1.3/Apache/Apache/bin/apachectl startssl: execing httpd

Syntax error on line 92 of /kiranginni/inst/apps/kiranginni_ramuginni/ora/10.1.3/Apache/Apache/conf/trusted.conf:

--------

11/08/14 20:50:11 Start process

--------

/kiranginni/inst/apps/kiranginni_ramuginni/ora/10.1.3/Apache/Apache/bin/apachectl startssl: execing httpd

Syntax error on line 92 of /kiranginni/inst/apps/kiranginni_ramuginni/ora/10.1.3/Apache/Apache/conf/trusted.conf:

[AMD64] apkiranginni@ramuginni > adident Header trusted.conf

trusted.conf:

$Header trusted_conf_1013.tmp 120.1.12000000.3 2008/02/19 11:16:21 upinjark ship $

[AMD64] apkiranginni@ramuginni >

[AMD64] apkiranginni@ramuginni > /Apache/conf/trusted.conf <

/kiranginni/inst/apps/kiranginni_ramuginni/ora/10.1.3/Apache/Apache/conf/trusted.conf:

$Header trusted_conf_1013.tmp 120.3.12010000.4 2009/11/10 09:18:23 sbandla ship $

Solution : Copied from Old snapshot before the activity and then tested by starting the services

[AMD64] apkiranginni@ramuginni > adopmnctl.sh status

You are running adopmnctl.sh version 120.6.12010000.5

Checking status of OPMN managed processes...

Processes in Instance: kiranginni_ramuginni.ramuginni.mydomain.com

---------------------------------+--------------------+---------+---------

ias-component | process-type | pid | status

---------------------------------+--------------------+---------+---------

OC4JGroup:default_group | OC4J:oafm | 10238 | Alive

OC4JGroup:default_group | OC4J:oacore | 9972 | Alive

OC4JGroup:default_group | OC4J:oacore | 9971 | Alive

HTTP_Server | HTTP_Server | 19869 | Alive

adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /kiranginni/mtlog/kiranginni_ramuginni/logs/appl/admin/log/adopmnctl.txt for more information ...

Fixed on another Node 08:



Cause of the Issue : After analysis found that improper customisations during Pre-Health checks caused the issue.

Need to be very careful while doing customizations. In this case since this file has wrong syntax clearly, we are on top of it to correct and made the service available soon.



Thanks
Kiran G