Sunday, July 17, 2011

Issue : ARP_APP_PKG, ARP_PROCESS_APPLICATION, ARP_PROC_RECEIPTS1, ARP_PS_UTIL package Body's got Invalid during Extended Baseline patching.

4 ARP Invalids generated after performing Extended Base line patching

Apps : 11.5.10.2

Activity : Extended baseline patching

Main issue is 4 new Invalids got generated during Post Health checks. Unfortunately these are appearing in Production where in didn't appear in Non-Prod.

Details:

Below are the 4 Invalids

OWNER OBJECT_NAME OBJECT_TYPE

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

APPS ARP_APP_PKG PACKAGE BODY

APPS ARP_PROCESS_APPLICATION PACKAGE BODY

APPS ARP_PROC_RECEIPTS1 PACKAGE BODY

APPS ARP_PS_UTIL PACKAGE BODY

Trying to compile these Invalids manually using below commands

alter package apps.ARP_APP_PKG compile body;

alter package apps.ARP_PROCESS_APPLICATION compile body;

alter package apps.ARP_PROC_RECEIPTS1 compile body;

alter package apps.ARP_PS_UTIL compile body;

** Error Details **

SQL> alter package apps.ARP_APP_PKG compile body;

Warning: Package Body altered with compilation errors.

SQL> sho error;

Errors for PACKAGE BODY APPS.ARP_APP_PKG:

LINE/COL ERROR

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

90/7 PL/SQL: SQL Statement ignored

329/14 PL/SQL: ORA-00984: column not allowed here

329/14 PLS-00302: component 'INCLUDE_IN_ACCUMULATION' must be declared

SQL>

SQL> alter package apps.ARP_PROCESS_APPLICATION compile body;

Warning: Package Body altered with compilation errors.

SQL> sho error;

Errors for PACKAGE BODY APPS.ARP_PROCESS_APPLICATION:

LINE/COL ERROR

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

385/8 PL/SQL: SQL Statement ignored

386/51 PL/SQL: ORA-00904: "INCLUDE_IN_ACCUMULATION": invalid identifier

1850/3 PL/SQL: Statement ignored

1850/12 PLS-00302: component 'INCLUDE_IN_ACCUMULATION' must be declared

3347/6 PL/SQL: SQL Statement ignored

3348/12 PL/SQL: ORA-00904: "INCLUDE_IN_ACCUMULATION": invalid identifier

SQL> alter package apps.ARP_PROC_RECEIPTS1 compile body;

Warning: Package Body altered with compilation errors.

SQL> sho error;

Errors for PACKAGE BODY APPS.ARP_PROC_RECEIPTS1:

LINE/COL ERROR

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

717/6 PL/SQL: SQL Statement ignored

718/12 PL/SQL: ORA-00904: "INCLUDE_IN_ACCUMULATION": invalid identifier

791/6 PL/SQL: SQL Statement ignored

792/12 PL/SQL: ORA-00904: "INCLUDE_IN_ACCUMULATION": invalid identifier

1281/6 PL/SQL: SQL Statement ignored

1282/12 PL/SQL: ORA-00904: "INCLUDE_IN_ACCUMULATION": invalid identifier

SQL>

SQL> alter package apps.ARP_PS_UTIL compile body;

Warning: Package Body altered with compilation errors.

SQL> sho error;

Errors for PACKAGE BODY APPS.ARP_PS_UTIL:

LINE/COL ERROR

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

409/7 PL/SQL: SQL Statement ignored

413/17 PL/SQL: ORA-00904: "RA"."INCLUDE_IN_ACCUMULATION": invalid

identifier

430/7 PL/SQL: SQL Statement ignored

435/17 PL/SQL: ORA-00904: "RA"."INCLUDE_IN_ACCUMULATION": invalid

identifier

Solution:

Ran the script as apps user as mentioned in Note : 737508.1

SQL> sho user

USER is "APPS"

SQL> !hostname -f;id

kiranginni.ramu.com

uid=20000(apkirang) gid=20000(aakirang) groups=5341(infallai),20000(aakirang)

SQL> CREATE OR REPLACE FORCE VIEW ar_receivable_applications AS

SELECT

RECEIVABLE_APPLICATION_ID ,

LAST_UPDATED_BY ,

LAST_UPDATE_DATE ,

CREATED_BY ,

CREATION_DATE ,

AMOUNT_APPLIED ,

AMOUNT_APPLIED_FROM ,

TRANS_TO_RECEIPT_RATE ,

GL_DATE ,

CODE_COMBINATION_ID ,

SET_OF_BOOKS_ID ,

DISPLAY ,

APPLY_DATE ,

APPLICATION_TYPE ,

STATUS ,

PAYMENT_SCHEDULE_ID ,

LAST_UPDATE_LOGIN ,

CASH_RECEIPT_ID ,

APPLIED_CUSTOMER_TRX_ID ,

APPLIED_CUSTOMER_TRX_LINE_ID ,

APPLIED_PAYMENT_SCHEDULE_ID ,

CUSTOMER_TRX_ID ,

LINE_APPLIED ,

TAX 2 3 4 5 6 7 8 9 10 11 _APPLIED ,

FREIGHT_APPLIED ,

RECEIVABLES_CHARGES_APPLIED ,

ON_ACCOUNT_CUSTOMER ,

RECEIVABLES_TRX_ID ,

EARNED_DISCOUNT_TAKEN ,

UNEARNED_DISCOUNT_TAKEN ,

DAYS_LATE ,

APPLICATION_RULE ,

GL_POSTED_DATE ,

COMMENTS ,

ATTRIBUTE_CATEGORY ,

ATTRIBUTE1 ,

ATTRIBUTE2 12 13 ,

ATTRIBUTE3 ,

ATTRIBUTE4 ,

ATTRIBUTE5 ,

ATTRIBUTE6 ,

ATTRIBUTE7 ,

ATTRIBUTE8 ,

ATTRIBUTE9 ,

ATTRIBUTE10 ,

POSTABLE ,

POSTING_CONTROL_ID ,

ACCTD_AMOUNT_APPLIED_FROM ,

ACCTD_AMOUNT_APPLIED_TO ,

ACCTD_EARNED_DISCOUNT_TAKEN ,

ATTRIBUTE11 ,

ATTRIBUTE12 ,

ATTRI 14 15 BUTE13 ,

ATTRIBUTE14 ,

ATTRIBUTE15 ,

CONFIRMED_FLAG ,

PROGRAM_APPLICATION_ID ,

PROGRAM_ID ,

PROGRAM_UPDATE_DATE ,

REQUEST_ID ,

USSGL_TRANSACTION_CODE ,

USSGL_TRANSACTION_CODE_CONTEXT ,

EARNED_DISCOUNT_CCID ,

UNEARNED_DISCOUNT_CCID ,

ACCTD_UNEARNED_DISCOUNT 16 _TAKEN ,

REVERSAL_GL_DATE ,

CASH_RECEIPT_HISTORY_ID ,

ORG_ID ,

TAX_CODE ,

GLOBAL_ATTRIBUTE1 ,

GLOBAL_ATTRIBUTE2 ,

GLOBAL_ATTRIBUTE3 ,

GLOBAL_ATTRIBUTE4 ,

GLOBAL_ATTRIBUTE5 ,

GLOBAL_ATTRIBUTE6 ,

GLOBAL_ATTRIBUTE7 ,

GLOBAL_ATTRIBUTE8 ,

GLOBAL_ATTRIBUTE9 ,

GL 17 OBAL_ATTRIBUTE10 ,

GLOBAL_ATTRIBUTE11 ,

GLOBAL_ATTRIBUTE12 ,

GLOBAL_ATTRIBUTE13 ,

GLOBAL_ATTRIBUTE14 ,

GLOBAL_ATTRIBUTE15 ,

GLOBAL_ATTRIBUTE16 ,

GLOBAL_ATTRIBUTE17 ,

GLOBAL_ATTRIBUTE18 ,

GLOBAL_ATTRIBUTE19 ,

GLOBAL_ATTRIBUTE20 ,

GLOBAL_ATTRIBUTE_CATEGORY , 18

CONS_INV_ID ,

CONS_INV_ID_TO ,

LINE_EDISCOUNTED ,

TAX_EDISCOUNTED ,

FREIGHT_EDISCOUNTED ,

CHARGES_EDISCOUNTED ,

LINE_UEDISCOUNTED ,

TAX_UEDISCOUNTED ,

FREIGHT_UEDISCOUNTED ,

CHARGES_UEDISCOUNTED ,

RULE_SET_ID ,

EDISC_TAX_ACCT_RULE ,

UNEDISC 19 20 21 _TAX_ACCT_RULE ,

LINK_TO_TRX_HIST_ID ,

LINK_TO_CUSTOMER_TRX_ID,

APPLICATION_REF_TYPE ,

APPLICATION_REF_ID ,

APPLICATION_REF_NUM ,

CHARGEBACK_CUSTOMER_TRX_ID ,

SECONDARY_APPLICATION_REF_ID ,

PAYMENT_SET_ID ,

APPLICATION_REF_REASON ,

CUSTOMER_REFERENCE ,

cus 22 tomer_reason ,

applied_rec_app_id ,

secondary_application_ref_type ,

secondary_application_ref_num,

ON_ACCT_CUST_ID,

ON_ACCT_CUST_SITE_USE_ID,

ON_ACCT_PO_NUM,

INCLUDE_IN_ACCUMULATION

FROM AR_RECEIVABLE_APPLICATIONS_ALL

WHERE NVL(ORG_ID,NVL(TO_NUMBER(DECODE 23 (SUBSTRB(USERENV('CLIENT_INFO'),1 ,1),' ',

NULL, SUBSTRB(USERENV('CLIENT_INFO'),1,10))),-99)) =

NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),1,1),' ',

NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10))),-99); 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128

View created.

Compiling the Apps Schema using adadmin :

Extracted information from the terminal..

All workers have quit.

Dropping FND_INSTALL_PROCESSES table...

FND_INSTALL_PROCESSES table dropped.

Dropping AD_DEFERRED_JOBS table...

AD_DEFERRED_JOBS table dropped.

sqlplus -s APPS/***** @/kirang/applmgr/11510/ad/11.5.0/admin/sql/adutlrcmp.pls APPLSYS ***** APPS ***** ***** 4 0 NONE FALSE

...

...

Done purging timing information for prior sessions.

AD Administration is complete.

Errors and warnings are listed in the log file

/kirang/applmgr/11510/admin/kirang/log/adadmin.log

and in other log files in the same directory.

Verification:-

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

Compared Post Invalids and dropped as all the earlier 4 Invalids got compiled.

SQL> SELECT OWNER, OBJECT_NAME, OBJECT_TYPE FROM DBA_OBJECTS WHERE STATUS='INVALID' MINUS SELECT OWNER, OBJECT_NAME, OBJECT_TYPE FROM invbkp_17jul11;

no rows selected

SQL> drop table invbkp_17jul11;

Table dropped.

Summary:-

===========

View APPS.AR_RECEIVABLE_APPLICATIONS does not have column INCLUDE_IN_ACCUMULATION

The file that adds this column to the view is arb5473882.sql 115.3, and it is delivered in Patch 7317995 that customer applied, however, for some reason, the column was added to AR.AR_RECEIVABLE_APPLICATIONS_ALL table, but it was not added to the view.

Ran that script as mentioned in the Note and Compiled Apps Schema through adadmin.


Thanks

Kiran G

Saturday, July 16, 2011

Info : Quick Process to edit any parameter of SPFILE

************************
Steps to edit spfile parameter. SPFILE should not be modified directly, follow below procedure...
************************

Note: Need to convert pfile, Edit the file and replace with Spfile


a) Creating the PFILE From SPFILE
SQL> create pfile='pfile' from spfile;

b) Taking backup of existing SPFILE as OS File.
SQL>! cp /kiranginni/oradata/data01/spfilekiranginni.ora /kiranginni/oradata/data01/spfilekiranginni.ora_one

c) COMMAND to open newly created pfile to edit
SQL> !vi $ORACLE_HOME/dbs/pfile

d) SAVE & QUIT the modified information in PFILE.

e) Bounce the Database to get latest parameter getting effective.
shutdown immediate;

f) Now creating SPFILE back from PFILE (At this step we are getting modified entries to SPFILE).

g) startup

h) Verification

i) Remove the temporary pfile


-----------
Ex:- Here we are going to see that 102 parameter in spfile should be changed to 112 after Upgrade.
=========

Query V$PARAMETER

select name, value
from v$parameter
where value like '%/102%' ; SQL> 2 3
core_dump_dest
/kiranginni/oracle/product/102/admin/kiranginni_auohsppol03/cdump


SQL> !ls -l /kiranginni/oracle/product/102/admin/kiranginni_auohsppol03/cdump
ls: /kiranginni/oracle/product/102/admin/kiranginni_auohsppol03/cdump: No such file or directory

SQL> create pfile='pfile' from spfile;

File created.

SQL> sho parameter pfile
spfile string /kiranginni/oradata/data01/spfileP
PPOLI.ora
SQL> !cp /kiranginni/oradata/data01/spfilekiranginni.ora /kiranginni/oradata/data01/spfilekiranginni.ora_one

SQL> !ls -ltrd /kiranginni/oradata/data01/spfilekiranginni.ora /kiranginni/oradata/data01/spfilekiranginni.ora_one
-rw-r----- 1 orkiranginni dbkiranginni 6656 Jul 16 21:12 /kiranginni/oradata/data01/spfilekiranginni.ora
-rw-r----- 1 orkiranginni dbkiranginni 6656 Jul 17 00:58 /kiranginni/oradata/data01/spfilekiranginni.ora_one




Modified:
SQL> !vi $ORACLE_HOME/dbs/pfile



SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> create spfile from pfile='pfile';

File created.

SQL> startup
ORACLE instance started.
Total System Global Area 2421977088 bytes
Fixed Size 2228800 bytes
Variable Size 1140854208 bytes
Database Buffers 1258291200 bytes
Redo Buffers 20602880 bytes
Database mounted.
Database opened.


Verify:
SQL> select name, value
from v$parameter
where value like '%/102%'
2 3 4
SQL> /

no rows selected


>> Removed the temporary pfile
rm $ORACLE_HOME/dbs/pfile

SQL> sho parameter pfile
spfile string /kiranginni/oracle/product/112/dbs
/spfilekiranginni.ora


Done with the action plan. Now parameter got changed as well as SPFILE is kept as default parameter file.



Thnks
kiran ginni

Issue : Unable to generate XML file in Database node

Main Issue : Unable to generate XML file in Database node due to multiple smaller issues as below.
Activity : Performed 11.2.0.2 upgrade from 10.2.0.4 and this is one of Post Upgrade activity.

Details...

$ perl adbldxml.pl tier=db appsuser=APPS appspasswd=xxxxxxx

Starting context file generation for db tier..
Using JVM from /kiranginni/oracle/product/112/jdk/bin/java to execute java programs..

The log file for this adbldxml session is located at:
/kiranginni/oracle/product/112/appsutil/log/adbldxml_07162355.log
AC-20010: Error: File - listener.ora could not be found at the location:
/kiranginni/oracle/product/112/network/admin/kiranginni_ginninode/listener.ora
indicated by TNS_ADMIN. Context file can not be generated.

Could not Connect to the Database with the above parameters, Please answer the Questions below


Enter Hostname of Database server: $
$
$ lsnrctl start kiranginni

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 16-JUL-2011 23:55:51

Copyright (c) 1991, 2010, Oracle. All rights reserved.

Starting /kiranginni/oracle/product/112/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /kiranginni/oracle/product/112/network/admin/listener.ora
Log messages written to /kiranginni/oracle/product/112/log/diag/tnslsnr/ginninode/kiranginni/alert/log.xml
TNS-01151: Missing listener name, kiranginni, in LISTENER.ORA

Listener failed to start. See the error message(s) above...

$




Troubleshooting :-


Issue 1: "AC-20010: Error: File - listener.ora could not be found at the location: "
Cause : No listener file in $TNS_ADMIN.


Verification:
$ echo $TNS_ADMIN
/kiranginni/oracle/product/112/network/admin/kiranginni_ginninode
$ pwd
/kiranginni/oracle/product/112/appsutil/bin
$ cd /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode
-ksh: cd: /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode: [No such file or directory]
$ cd /kiranginni/oracle/product/
$ ls -ltrd *
drwxr-xr-x 4 orkiranginni dbkiranginni 4096 Jul 16 11:51 102
-rw-r--r-- 1 orkiranginni dbkiranginni 75 Jul 16 13:47 oraInst.loc
drwxrwxr-x 11 orkiranginni dbkiranginni 4096 Jul 16 13:59 diag
drwxr-xr-x 2 orkiranginni dbkiranginni 4096 Jul 16 14:01 checkpoints
drwxrwx--- 5 orkiranginni dbkiranginni 4096 Jul 16 14:50 ora11GR2Inventory
drwxr-xr-x 81 orkiranginni dbkiranginni 8192 Jul 16 23:52 112
$ cd 102
$ ls
customkiranginni_ginninode.env dbs network ood.env kiranginni_ginninode.env
$ cd network
$ ls
admin
$ cd admin
$ ls
kiranginni_ginninode


Solution for Issue 1:- (copying the missing files from Old Oracle HOME)
$ cp -r kiranginni_ginninode /kiranginni/oracle/product/112/network/admin/
$ ls -ltrd /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode
drwxr-xr-x 2 orkiranginni dbkiranginni 4096 Jul 16 23:57 /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode
$



Tried to start the listener after copying.
Failed



Issue 2 : "TNS-01201: Listener cannot find executable /kiranginni/oracle/product/102/bin/oracle for SID kiranginni "

$ lsnrctl start kiranginni

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 16-JUL-2011 23:57:30

Copyright (c) 1991, 2010, Oracle. All rights reserved.

Starting /kiranginni/oracle/product/112/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode/listener.ora
Log messages written to /kiranginni/oracle/product/112/log/diag/tnslsnr/ginninode/kiranginni/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCkiranginni)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ginninode.ramu.com)(PORT=10010)))
TNS-01201: Listener cannot find executable /kiranginni/oracle/product/102/bin/oracle for SID kiranginni

Listener failed to start. See the error message(s) above...

$ pwd
/kiranginni/oracle/product/102/network/admin
$ cd /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode
$ ls -ltrd *
-rwxr-xr-x 1 orkiranginni dbkiranginni 2 Jul 16 23:57 listener_ifile.ora
-rwxr-xr-x 1 orkiranginni dbkiranginni 1333 Jul 16 23:57 listener.ora
-rwxr-xr-x 1 orkiranginni dbkiranginni 2 Jul 16 23:57 sqlnet_ifile.ora
-rw-r--r-- 1 orkiranginni dbkiranginni 623 Jul 16 23:57 sqlnet.ora
-rw-r--r-- 1 orkiranginni dbkiranginni 2287 Jul 16 23:57 tnsnames.ora
$

Reason: since there are still 102 entries in the files..



Solution :
Taken backup of listener file and modified all the 102 to 112

:%s/102/112/g

Quit with saving.

Now starting the listener again ==> This time it started successfully..

$ vi listener.ora

#
# $Header: ad8ilsnr.ora 115.7 2010/04/14 06:16:10 upinjark ship $
#
# ###############################################################
#
# This file is automatically generated by AutoConfig. It will be read and
# overwritten. If you were instructed to edit this file, or if you are not
# able to use the settings created by AutoConfig, refer to Metalink document
# 165195.1 for assistance.
#
# ###############################################################

#

#
# Net8 definition for Database listener
#

kiranginni =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= EXTPROCkiranginni))
(ADDRESS= (PROTOCOL= TCP)(Host= ginninode.ramu.com )(Port= 10010))
)

SID_LIST_kiranginni =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /kiranginni/oracle/product/112)
(SID_NAME = kiranginni)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /kiranginni/oracle/product/112)
(PROGRAM = extproc)
)
)

STARTUP_WAIT_TIME_kiranginni = 0
CONNECT_TIMEOUT_kiranginni = 10
TRACE_LEVEL_kiranginni = OFF

LOG_DIRECTORY_kiranginni = /kiranginni/oracle/product/112/network/admin
LOG_FILE_kiranginni = kiranginni
TRACE_DIRECTORY_kiranginni = /kiranginni/oracle/product/112/network/admin
TRACE_FILE_kiranginni = kiranginni
ADMIN_RESTRICTIONS_kiranginni = OFF


IFILE=/kiranginni/oracle/product/112/network/admin/kiranginni_ginninode/listener_ifile.ora
"listener.ora" 49L, 1333C written
$ lsnrctl start kiranginni

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 16-JUL-2011 23:58:40

Copyright (c) 1991, 2010, Oracle. All rights reserved.

Starting /kiranginni/oracle/product/112/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode/listener.ora
Log messages written to /kiranginni/oracle/product/112/log/diag/tnslsnr/ginninode/kiranginni/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCkiranginni)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ginninode.ramu.com)(PORT=10010)))

Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCkiranginni))
STATUS of the LISTENER
------------------------
Alias kiranginni
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 16-JUL-2011 23:58:40
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /kiranginni/oracle/product/112/network/admin/kiranginni_ginninode/listener.ora
Listener Log File /kiranginni/oracle/product/112/log/diag/tnslsnr/ginninode/kiranginni/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCkiranginni)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ginninode.ramu.com)(PORT=10010)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "kiranginni" has 1 instance(s).
Instance "kiranginni", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
$




Second Issue is resolved.


Now need to investigate why "adbldxml.pl" is failing.





Issue 3:- "ORA-39710: only connect AS SYSDBA is allowed when OPEN in UPGRADE mode"


Details :
Starting context file generation for db tier..
Using JVM from /kiranginni/oracle/product/112/jdk/bin/java to execute java programs..

The log file for this adbldxml session is located at:
/kiranginni/oracle/product/112/appsutil/log/adbldxml_07170000.log

Could not Connect to the Database : ORA-39710: only connect AS SYSDBA is allowed when OPEN in UPGRADE mode

Connecting to the kiranginni database instance...

Connection paramaters values:
Database server hostname ==> ginninode.ramu.com
Database listener port ==> 10010
Database SID ==> kiranginni
Database schema name ==> APPS

Could not Connect to the Database : ORA-39710: only connect AS SYSDBA is allowed when OPEN in UPGRADE mode


AC-40000: Error: Exception - java.sql.SQLException: ORA-39710: only connect AS SYSDBA is allowed when OPEN in UPGRADE mode
occured while connecting to the database - kiranginni

Could not Connect to the Database with the above parameters, Please answer the Questions below


Enter Hostname of Database server[ginninode.ramu.com]:

Enter Port of Database server[10010]:

Enter SID of Database server[kiranginni]:

Could not Connect to the Database : ORA-39710: only connect AS SYSDBA is allowed when OPEN in UPGRADE mode


Could not Connect to the Database with the above parameters, Please answer the Questions below




Since database was in Upgrade mode left after OLAP steps.

solution: Shutdown immediate and restarting in Normal mode before proceeding with XML Building....




Enter Hostname of Database server[ginninode.ramu.com]:

Enter Port of Database server[10010]:

Enter SID of Database server[kiranginni]:

Enter the value for Display Variable: localhost:22.0

The context file has been created at:
/kiranginni/oracle/product/112/appsutil/kiranginni_ginninode.xml
you have mail in /var/spool/mail/orkiranginni

Verification whether xml file got created or not ?
$ ls -ltrd /kiranginni/oracle/product/112/appsutil/kiranginni_ginninode.xml
-rw-r--r-- 1 orkiranginni dbkiranginni 11808 Jul 17 00:09 /kiranginni/oracle/product/112/appsutil/kiranginni_ginninode.xml
$



XML got created.
All Issues are resolved and got XML generated on Database Node.



Note : Information taken own Exp while working on 11.2.0.1 Upgrade...

Fnd_cant_insert_user_role when assigning a responsibility in R12

Whenever assign user responsibilities, next time user responsibilities are queried they are no longer in the form (FNDSCAUS) they are not visible.

A second attempt to assign the same responsibility produces the error
Oracle Error -20001: ORA-20001: FND_CANT_INSERT_USER_ROLE has been detected in
FND_USER_RESP_GROUPS_API.INSERT_ASSIGNMENT

The cause of the issue is that there are no subscribers defined for AQ WF_BPEL_Q

Solution
1. Drop / recreate the subscriber as follows:

declare
lagent sys.aq$_agent;
subscriber_exist exception;
pragma EXCEPTION_INIT(subscriber_exist, -24034);
begin
lagent := sys.aq$_agent('WF_BPEL_Q',null,0);
dbms_aqadm.add_subscriber(queue_name
=>APPS.WF_BPEL_Q',subscriber=>lagent,rule=>'1=1');
exception
when subscriber_exist then
-- just add the rule if subscriber exists
dbms_aqadm.alter_subscriber(queue_name =>'APPS.WF_BPEL_Q',
subscriber=>lagent,
rule=>'1=1');
end;
/

2. Run the concurrent request Workflow Directory Services User/Role Validation.

1.1 "Workflow Directory Services User/Role Validation" Parameters : 100000, Yes, No, No"
1.2 "Workflow Directory Services User/Role Validation" Parameters : 100000, No, Yes, No"

3. Bounce Apache

Also read Note:549040.1 - How Standard Business Events Work With WF_BPEL_Q?


Note : Information gathered from "OracleajiDba"

Issue : R12 Error 'Function not available to this responsibility' When Trying to Access Custom Form

After Upurade from 11i to R12 users cannot access the custom form in R12 which was working fine in 11.5.10.2.

Following errors getting whenever access custom form

"Function not available to this responsibility. Change Responsibilities or contact your System Administrator".



The reason for this issue is that, missing entry for CUSTOM_TOP under default.env file. In R12, CUSTOM_TOP should be defined under default.env in $INST_TOP/ora/10.1.2/forms/server directory.

Solution

1. Login to server with APPLMGR manager user access.

2. Go to $INST_TOP/ora/10.1.2/forms/server directory.

3. Ensure that your CUSTOM_TOP's are registered in the default.env file.

This means that, you should create an entry for environment variable CUSTOM_TOP (which contains physical path to your custom directory) like below in default.env file present under location $INST_TOP/ora/10.1.2/forms/server directory.

For Example:
APPL_TOP=/home/applmgr/PROD/apps/apps_st/appl
CUSTOM_TOP=/home/applmgr/PROD/apps/apps_st/custom

4. Restart the middle tier services.

5. Retest the issue.

Note : Information gathered from "Oracleajidba"

How to Debug Enabled on 11i & R12

When we used to send debug details to oracle support for troubleshooting, we have to perform the following for enable and collect debug information from HTTP, OC4J and OPMN services of R12.

Run the following script on all middle tiers as the application file system owner. A file named after the servername and date will be created in every server under the /tmp directory. Upload the resulting zip file from every server to your service request on Metalink.
zip -r /tmp/`uname -n`_`date +%m%d%y.%H%M`_iAS_CONFIG.zip \
$ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf \
$ORA_CONFIG_HOME/10.1.3/config \
$INST_TOP/pids/10.1.3/Apache \
$ORA_CONFIG_HOME/10.1.3/j2ee/ \
$ORA_CONFIG_HOME/10.1.3/javacache/admin \
$ORA_CONFIG_HOME/10.1.3/network/admin \
$ORA_CONFIG_HOME/10.1.3/opmn

First of all, need to shutdown the http server, oc4j and opmn services, for that:
cd $ADMIN_SCRIPTS_HOME
$adapcctl.sh stop
$adoacorectl.sh stop
$adformsctl.sh stop
$adoafmctl.sh stop
$adopmnctl.sh stop

Then need to take the backup existing log files for safe custody.
$LOG_HOME/ora/10.1.3/Apache
$LOG_HOME/ora/10.1.3/j2ee
$LOG_HOME/ora/10.1.3/opmn

1. Enable http ODL logging

Edit httpd.conf file, add the following to the end of file $ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf/httpd.conf

OraLogMode oracle
OraLogSeverity TRACE:32
OraLogDir $LOG_HOME/ora/10.1.3/Apache/oracle
Please use the full path to $LOG_HOME e.g.
OraLogDir = /u01/inst/apps/JCB_atg/logs/ora/10.1.3/Apache/oracle

Warning: the log.xml file created by the http ODL log can get very large.
Diligence must be taken to monitor this file and maintain its size under the 2GB limit which when exceeded can cause issues with login

2. Increase OC4J logging for oacore

edit j2ee-logging.xml adjust the following in file:
$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/config/j2ee-logging.xml



3. Increase OC4J logging for forms

edit j2ee-logging.xml adjust the following in file:
$ORA_CONFIG_HOME/10.1.3/j2ee/forms/config/j2ee-logging.xml



edit orion-web.xml adjust the following in file:
$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml

debug_mode
true

4. Increase OPMN Logging

edit opmn.xml adjust the following in file:
$ORA_CONFIG_HOME/10.1.3/opmn/conf/opmn.xml



Startup the http server, oc4j and opmn

Reproduce the issue

Access the following urls and inform support if the url was successful or unsuccessful:

http://.:/OA_HTML/ServletPing
http://.:/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE
http://.:
http://.:/OA_HTML/jsp/fnd/aoljtest.jsp
http://.:/OA_MEDIA/FNDLOGOL.gif
http://.:/forms/frmservlet
http://:/OA_HTML/fndvald.jsp?username=sysadmin&password=

Run this inventory script and upload the html output

$ADPERLPRG $FND_TOP/patch/115/bin/TXKScript.pl -script=$FND_TOP/patch/115/bin/txkInventory.pl -txktop=$APPLTMP -outfile=$APPLTMP/Report_Inventory.html

Shutdown the http server, oc4j and opmn

Run these commands to zip up the required log files:

zip -r /tmp/`uname -n`_`date +%m%d%y.%H%M`_iAS_HTTP.zip $LOG_HOME/ora/10.1.3/Apache/*log* $LOG_HOME/ora/10.1.3/Apache/*lock* $LOG_HOME/ora/10.1.3/Apache/oracle $INST_TOP/pids/10.1.3/Apache
zip -r /tmp/`uname -n`_`date +%m%d%y.%H%M`_iAS_OC4J.zip $LOG_HOME/ora/10.1.3/j2ee/ $LOG_HOME/appl/rgf/*log*
zip -r /tmp/`uname -n`_`date +%m%d%y.%H%M`_iAS_OPMN.zip $LOG_HOME/appl/admin/log/ $LOG_HOME/ora/10.1.3/opmn/

The commands will create zip files in the /tmp directory named after the server name and date. Please now run the following script to compile the 3 zip files into 1 zip. Upload the resulting zip file to the associated service request.

zip -r /tmp/`uname -n`_`date +%m%d%y.%H%M`_iAS_Debug.zip /tmp/*zip*

Finally, revert the changes and re-start the services


Note : Information gathered from "Oracleajidba"

Thursday, July 14, 2011

Info : >> Steps To Clean Nonexistent Nodes Or IP Addresses From FND_NODES

After completing the ADCLONE process, or implementing Autoconfig, the FND system tables have incorrect values. The OAM Dashboard reflects the target machine name and the source machine name although the source machine is no longer being used. In some cases, there are IP addresses from nonexistent machines in FND_NODES.

The workflow agent listeners fail to start reflecting the following errors posted within the log file:

oracle.apps.fnd.cp.gsc.SvcComponentContainerException:
oracle.apps.fnd.wf.common.ContextFactoryException: Error instantiating AppsContext ->
AOLJ_JAVA_EXCEPTION (MESSAGE=ProfileCache: getLocalJDBCConnection() == null)
AOLJ_JAVA_EXCEPTION (MESSAGE=Not able to create new database connection: FND SQL_PLSQL_ERROR in
FND_SECURITY_PKG.FND_ENCRYPTED_PWD
SECURITY_INVALID_DBC_PARAMETER (PARAMETER=GUEST_USER_PWD)
(FILE=/kirang/vol01/oracle/GINNI/GINNIappl/fnd/11.5.0/secure/GINNI_kiranginni/GINNI.dbc)
(ROUTINE=AppsConnectionManager.makeGuestConnection)
ORA-01422: exact fetch returns more than requested number of rows
SQL_PLSQL_ERROR (ROUTINE=FND_SECURITY_PKG.FND_ENCRYPTED_PWD) (ERRNO=-1422) (REASON=ORA-01422:
exact fetch returns more than requested number of rows)
at oracle.apps.fnd.cp.gsc.SvcComponentContainer.getNewWorkflowContext(SvcComponentContainer.java:1321)

Could not start Service Component Container because an unexpected RuntimeException or other
Throwable occurred -> oracle.apps.fnd.cache.CacheException
oracle.apps.fnd.cache.CacheException
at oracle.apps.fnd.cache.AppsCache.get(AppsCache.java:228)
at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1464)
at oracle.apps.fnd.profiles.Profiles.getProfile(Profiles.java:333)
at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfileFromDB(ExtendedProfileStore.java:210)

Cause
The Nodes in the OAM Dashboard are retrieved from the FND_NODES table. Further investigation showed that the FND_NODES table had both node names and node_modes 'O' as activated.

ie:
SQL> select node_name "Node Name", node_mode "Mode", support_cp "C",
support_web "W", support_admin "A", support_forms "F"
from FND_NODES;

NODE_NAME N S S S S
------------------------------ - - - - -
TARGET O Y Y Y Y
SOURCE O Y Y Y Y

Solution

Do not directly Delete from FND_NODES table because the support_' columns will be affected and will not incorporate the correct information throughout in OAM. As documented in OAM.G Documentation, Note: 226826.1 About Oracle Applications Manager Mini-Pack 11i.OAM.G, the data cleanup issues with cloning that surface in the OAM UI have been fixed in the latest cloning patches.

1. Retrieve the latest patch for the cloning tools:

2. After applying the above patch to the system that is to be cleaned, run the following in SQL*Plus. Note that this will delete all data from system tables such as FND_NODES, FND_OAM_CONTEXT_FILES, etc. The correct information for the current system will be repopulated when AutoConfig is run.

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.

Issue : >> icxwtab.odf is unable to create index ICX_TRANSACTIONS_U1

Sometime while patching, adpatch fails on script icxwtab.odf with the following errors:
As specified in Metalink Note 430673.1:
ERROR
The table is missing the index ICX_TRANSACTIONS_U1
or index ICX_TRANSACTIONS_U1 exists on another table.
Create it with the statement:

Start time for statement below is: Mon May 07 2007 14:23:44

CREATE UNIQUE INDEX ICX.ICX_TRANSACTIONS_U1 ON ICX.ICX_TRANSACTIONS
(TRANSACTION_ID) LOGGING STORAGE (INITIAL 4K NEXT 104K MINEXTENTS 1
MAXEXTENTS UNLIMITED PCTINCREASE 0 FREELIST GROUPS 4 FREELISTS 4 ) PCTFREE
10 INITRANS 11 MAXTRANS 255 COMPUTE STATISTICS TABLESPACE ICXX

Statement executed.
AD Worker error:
The index cannot be created as the table has duplicate keys.

Use the following SQL statement to identify the duplicate keys:

SELECT TRANSACTION_ID, count(*)
FROM ICX.ICX_TRANSACTIONS
GROUP BY TRANSACTION_ID
HAVING count(*)>1

AD Worker error:
Unable to compare or correct tables or indexes or keys
because of the error above

SPECIFIC DATA
Ran the suggested query, and here is the output:

TRANSACTION_ID COUNT(*)
-------------------------- -------------
148341124 2
431640607 2
555224577 2
1202811809 2

Cause
These duplicate transactions are there because the concurrent program that deletes temporary session data (program that removes old entries in ICX_SESSIONS and ICX_TRANSACTIONS) is not executed on a regular basis. As a result, these tables grow in space and there is the possibility that the sequences cycle and restart, creating duplicate primary keys.

The following justifies how the issue is related to this specific customer:

SELECT TRANSACTION_ID, count(*)
FROM ICX.ICX_TRANSACTIONS
GROUP BY TRANSACTION_ID
HAVING count(*)>1

TRANSACTION_ID COUNT(*)
-------------------------- --------------
148341124 2
431640607 2
555224577 2
1202811809 2

This is explained in the following unpublished bug: Bug 5001287 PERFORMANCE PROBLEM WHEN APPROVING POS WITH ICX_TRANSACTIONS

Solution
To implement the solution, please execute the following steps:

1. Run the purge program:
a. The name of the program is "Purge Inactive Sessions" located under the "Apps for the Web Manager" responsibility.
b. The internal name is ICXDLTMP.
c. Also you can find this SQL script under $ICX_TOP/sql (named ICXDLTMP.sql).

2. Rerun the failed worker (icxwtab.odf).

3. Migrate the solution as appropriate to other environments.

4. This program should be executed at least once a week to clean up ICX_TRANSACTIONS and ICX_SESSION tables, otherwise they will continue to grow.

Thursday, July 7, 2011

Patch : 9295268 conflicts with : 9044638

Action Plan to apply patch : 9295268 in Forms ORACLE HOME.

Downloaded the patch and checked its files :
$ cd 9295268
$ ls
etc files README.txt


Verification whether patch applied already ?
$ cd OPatch
$ ./opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc | grep 9295268

$ cat $ORACLE_HOME/oraInst.loc
inventory_loc=/kirang/product/oraInventory
inst_group=aakirang
$


Applying :-
Go to the patch Unzipped directory.
$ORACLE_HOME/OPatch/opatch -invPtrLoc $ORACLE_HOME/oraInst.loc apply

Note: $ORACLE_HOME should be set to "/kirang/product/1012/" ==> Forms oracle Home.





Issue:-
========
While applying this got below information




************
Creating log file "/kirang/product/1012/.patch_storage/9295268/Apply_9295268_07-08-2011_05-11-52.log"

Invoking fuser to check for active processes.

Conflicting patches: 9044638,

Patch(es) 9044638, conflict with the patch currently being installed (9295268).

If you continue, patch(es) 9044638, will be rolled back and the
new patch (9295268) will be installed.

Note: If the patch currently being installed (9295268) is rolled back,
it is recommended that the fixes being rolled back here (9044638, ) are reinstalled.

If a merge of the new patch (9295268) and the conflicting patch(es)
9044638, is required, contact Oracle Support Services and request
a Merged patch.

Do you want to STOP?
Please respond Y|N >
*************





Explanation:-
=============
After observing found that patch : 9295268 that we are applying is conflicting with already existing patch : 9044638 in our ORACLE_HOME.

Verification:
$ $ORACLE_HOME/OPatch/opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc | grep 9044638
[ Bug fixes: 7573720 7567072 8428638 6446152 7231982 8374931 7242694 9044638 9295268 8217396 7021759 7046878 7229760 7215354 6999812 6251633 8623626 7171994 6770810 1947595 8859958 7240862 8920655 7358376 6790720 8974551 7000696 7833659 8485711 5465339 7034183 6821297 6724714 6823259 7175618 6704955 8820459 7261996 7497494 ]



Work:-
=======
Searched in Metalink for the background of both the patches
a) 9044638 >> Existing in Our oracle Home
b) 9295268 >> Patch to be applied as part of our latest action plan.




Analysis:-
===========
9044638 ==> Description APPS6: NEED A MERGE OF BUG 8859958 WITH MLR BUG 8920655 IN 10.1.2.3
Product Developer Forms


Description APPS6: NEED A MERGE OF 9044638, 8623626, 8974551
Product Developer Forms


This can be analysed that the latest patch is superset of the one which is there in our Oracle Home.
So applying this patch has no effect though we roll it back.

2 Options to apply:-
=================
1) We can manually rollback and get it applied or
2) Try applying again and Say "N", when it suggested to quit. This will automatically roll back existing one.

Result:-

Rolled back 9044638 patch and applied : 9295268 as (this Patch : 9044638 included )

Restoring copied files...


Updating inventory...

Back to applying patch 9295268...

Backing up 2nd copy of comps.xml ...

Applying patch 9295268...

Patching copy files...



Inventory is good and does not have any dangling patches.


Updating inventory...

Verifying patch...
Backing up comps.xml ...


OPatch succeeded.
$


Now the patch got applied and no major change in existing functionality.

Note: In our case the latest patch is super set and decision was easy to apply by rolling back existing one.
But there will be cases where in both are totally different. In such cases we need to do more research.

ex:- we need to see whats the importance of existing one, Is it still required. If it is there is another approach. Approach is to work with Oracle support and get a "MERGED Patch" included these patches.

Thanks
Kiran Ginni