Sunday, 13 March 2016

Ebs 12.2 issues

ISSUE fs_clone failing

error from log
/tti/applmgr/fs_ne/EBSapps/log/adop/134/fs_clone_20151017_010354/TTi_eu504vm0142/TXK_SYNC_create_Sat_Oct_17_01_05_20_2015/fsclone_apply/FSCloneApplyAppsTier_10170220.log
+++++++++++++++++++++++++
configProperty id = Server24
Count for NodeIterator nextNode = 3
ERROR: Managed Server's are not in sync between file system context and DB context
ERROR: Update Moveplan Fail

START: Inside exitClone....
Updating status INCOMPLETE for ApplywlsTechStack

START: Updating status INCOMPLETE for action ApplywlsTechStack

END: Updated status INCOMPLETE for action ApplywlsTechStack


Findings/observation
======================

SQL> select name,created from v$database;

NAME                        CREATED
--------------------------- ---------------
TTi                      23-SEP-15

SQL>


+ context files have been registered in the database

select path,status,serial_number,version from fnd_oam_context_files where name not in ('TEMPLATE','METADATA') and (status is null or status !='VALID');
PATH                                                                             STA SERIAL_NUMBER VERSION
-------------------------------------------------------------------------------- --- ------------- ----------------------------------------
/tti/inst/fs1/inst/apps/TTi_eu504vm0145/appl/admin/TTi_eu504vm0145.xml  S             228 120.401.12020000.45
/tti/inst/fs2/inst/apps/TTi_eu504vm0147/appl/admin/TTi_eu504vm0147.xml  S                 120.401.12020000.45
/tti/oracle/product/11.2.0.4/appsutil/TTi1_eu01dbadm01.xml                 S                 120.52.12020000.3
/tti/inst/fs1/inst/apps/TTi_eu504vm0142/appl/admin/TTi_eu504vm0142.xml  S                 120.401.12020000.45
/tti/inst/fs1/inst/apps/TTi_eu504vm0143/appl/admin/TTi_eu504vm0143.xml  S             228 120.401.12020000.45
/tti/inst/fs1/inst/apps/TTi_eu504vm0146/appl/admin/TTi_eu504vm0146.xml  S             228 120.401.12020000.45
/tti/oracle/product/112/appsutil/TTi2_eu01dbadm02.xml                      H                 120.52.12020000.3
/tti/inst/fs2/inst/apps/TTi_eu504vm0143/appl/admin/TTi_eu504vm0143.xml  S                 120.401.12020000.45
/tti/inst/fs1/inst/apps/TTi_eu504vm0144/appl/admin/TTi_eu504vm0144.xml  S             228 120.401.12020000.45
/tti/inst/fs2/inst/apps/TTi_eu504vm0146/appl/admin/TTi_eu504vm0146.xml  S                 120.401.12020000.45
/tti/inst/fs2/inst/apps/TTi_eu504vm0144/appl/admin/TTi_eu504vm0144.xml  S                 120.401.12020000.45
/tti/inst/fs1/inst/apps/TTi_eu504vm0147/appl/admin/TTi_eu504vm0147.xml  S             228 120.401.12020000.45
/tti/oracle/product/11.2.0.4/appsutil/TTi2_eu01dbadm02.xml                 S                 120.52.12020000.3
/tti/inst/fs2/inst/apps/TTi_eu504vm0145/appl/admin/TTi_eu504vm0145.xml  S                 120.401.12020000.45
/tti/oracle/product/112/appsutil/TTi1_eu01dbadm01.xml                      H                 120.52.12020000.3
/tti/inst/fs2/inst/apps/TTi_eu504vm0142/appl/admin/TTi_eu504vm0142.xml  S                 120.401.12020000.45

16 rows selected.


+ number/types of managed servers registered in the run  file systems

RUN FILE SYSTEM ENTRIES IN DATABASE
====================================
SELECT  extractValue(XMLType(TEXT),'//host[@oa_var="s_hostname"]'),
extractValue(XMLType(TEXT),'//oacore_server_ports'),
extractValue(XMLType(TEXT),'//forms_server_ports'),
extractValue(XMLType(TEXT),'//oafm_server_ports'),
extractValue(XMLType(TEXT),'//forms-c4ws_server_ports'),
extractValue(XMLType(TEXT),'//oaea_server_ports')
from fnd_oam_context_files
where name not in ('TEMPLATE','METADATA')
and (status is null or status !='H')
and EXTRACTVALUE(XMLType(TEXT),'//file_edition_type')='run'
and CTX_TYPE = 'A';

eu504vm0147
oacore_server6:7202,oacore_server63:7206,oacore_server62:7204,oacore_server64:7208
forms_server6:7402
oafm_server6:7602
forms-c4ws_server6:7802


eu504vm0143
oacore_server2:7202,oacore_server23:7206,oacore_server22:7204,oacore_server24:7208
forms_server2:7402
oafm_server2:7602
forms-c4ws_server2:7802


eu504vm0146
oacore_server5:7202,oacore_server53:7206,oacore_server52:7204,oacore_server54:7208
forms_server5:7402
oafm_server5:7602
forms-c4ws_server5:7802


eu504vm0144
oacore_server3:7202,oacore_server33:7206,oacore_server32:7204,oacore_server34:7208
forms_server3:7402
oafm_server3:7602
forms-c4ws_server3:7802


eu504vm0145
oacore_server4:7202,oacore_server43:7206,oacore_server42:7204,oacore_server44:7208
forms_server4:7402
oafm_server4:7602
forms-c4ws_server4:7802


eu504vm0142
oacore_server1:7202,oacore_server12:7204,oacore_server13:7206,oacore_server14:7208


forms_server1:7402
oafm_server1:7602
forms-c4ws_server1:7802



6 rows selected.

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

+ number/types of managed servers registered in the  patch file systems

PATCH FILE SYSTEM ENTRIES IN DATABASE
====================================

SELECT  extractValue(XMLType(TEXT),'//host[@oa_var="s_hostname"]'),
extractValue(XMLType(TEXT),'//oacore_server_ports'),
extractValue(XMLType(TEXT),'//forms_server_ports'),
extractValue(XMLType(TEXT),'//oafm_server_ports'),
extractValue(XMLType(TEXT),'//forms-c4ws_server_ports'),
extractValue(XMLType(TEXT),'//oaea_server_ports')
from fnd_oam_context_files
where name not in ('TEMPLATE','METADATA')
and (status is null or status !='H')
and EXTRACTVALUE(XMLType(TEXT),'//file_edition_type')='patch'
and CTX_TYPE = 'A';

eu504vm0145
oacore_server42:7205,oacore_server44:7209
forms_server4:7401
oafm_server4:7601
forms-c4ws_server4:7801


eu504vm0142
oacore_server1:7201,oacore_server12:7203,oacore_server13:7205,oacore_server14:7207
forms_server1:7401
oafm_server1:7601
forms-c4ws_server1:7801


eu504vm0143
oacore_server22:7205
forms_server2:7401
oafm_server2:7601
forms-c4ws_server2:7801


eu504vm0146
oacore_server54:7209,oacore_server53:7207
forms_server5:7401
oafm_server5:7601
forms-c4ws_server5:7801


eu504vm0144
oacore_server33:7207
forms_server3:7401
oafm_server3:7601
forms-c4ws_server3:7801


eu504vm0147
oacore_server64:7209

forms_server6:7401
oafm_server6:7601
forms-c4ws_server6:7801



6 rows selected.


++ run and patch filesystem managed servers registered in the database are not in sync ( mismatch)

ACTION PLAN
=============

from Doc ID 1582473.1

If the patch file system data (managed servers or context file) is missing from the database then run the following after sourcing the run file system environment.

This command is executed on the RUN file system to upload the PATCH context file:
$ADJVAPRG oracle.apps.ad.autoconfig.oam.CtxSynchronizer \
action=upload \
contextfile=<full path to patch context file> \
logfile=/tmp/patchctxupload.log


Review the log file to confirm the process ran without error.

Confirm that the fnd_oam_context_files table now holds the correct data.

Thanks,

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

ISSUE FS_CLONE FAILING

ADOPLOG
========
====================================
Inside _validateETCHosts()...
====================================


Started execution   : ADOPValidations.java

Validating entries in /etc/hosts
WARNING: /etc/hosts file does not contain correct entry for localhost.
Add the following entry to the /etc/hosts file:
127.0.0.1 localhost.localdomain localhost

Completed execution : ADOPValidations.java



cmd : java weblogic.WLST /pti/applmgr/fs1/EBSapps/appl/ad/12.0.0/patch/115/bin/txkValidateDomainInRC.py --adminuser=weblogic --verify=domainEditModeEnabled --adminurl=t3://eu504vm0202.tp.tpnet.intra:7001>/pti/inst/fs1/inst/apps/PTi_eu504vm0202/logs/appl/rgf/TXK/txkValidateDomainInRCOut.txt
Domain is not in edit mode.


[appti@eu504vm0202 <RUN> ]$ ls -lrt /pti/applmgr/fs2/FMW_Home/user_projects/domains/EBS_domain_PTi/edit.lok
-rw-r----- 1 appti aapti 33 Aug 22 04:50 /pti/applmgr/fs2/FMW_Home/user_projects/domains/EBS_domain_PTi/edit.lok
[appti@eu504vm0202 <RUN> ]$


[appti@eu504vm0202 <RUN> ]$ ls -lrt  /pti/applmgr/fs1/FMW_Home/user_projects/domains/EBS_domain_PTi/edit.lok
-rw-r----- 1 appti aapti 33 Aug 21 06:03 /pti/applmgr/fs1/FMW_Home/user_projects/domains/EBS_domain_PTi/edit.lok
[appti@eu504vm0202 <RUN> ]$


Action Plan
=============

1) On PATCH fs

rename /pti/applmgr/fs2/FMW_Home/user_projects/domains/EBS_domain_PTi/edit.lok edit.lok_old


2) Source the patch file system environment

3) Execute :

cd $ADMIN_SCRIPTS_HOME
./adadminsrvctl.sh stop forcepatchfs

Thanks,
.
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&



FINDINGS:
adop phase=fs_clone  fails

ValidateInventory:
        [ERROR]: At least one Oracle inventory check has failed.




ERROR: /dalq3i/applmgr/fs2/EBSapps/10.1.2 is not registered in the inventory
Corrective Action: Provide the location of a valid inventory file.
If you believe the inventory is valid, you may want to attach the /dalq3i/applmgr/fs2/EBSapps/10.1.2.



Checking  well formed-ness of file /dalq3i/applmgr/oraInventory/ContentsXML/inventory.xml

                   /dalq3i/applmgr/oraInventory/ContentsXML/inventory.xml
                 
SOLUTION:
=========
How to Create a Clean oraInventory in Release 12.2 (Doc ID 1967205.1)

cd $ORACLE_HOME/oui/bin                 
./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/dalq3i/applmgr/fs2/EBSapps/10.1.2" ORACLE_HOME_NAME="dalq3i_TOOLS__dalq3i_applmgr_fs2_EBSapps_10_1_2"      



&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
.5523TVL     TTi    cutover failed Unable to acquire lock on sessions table    1903316.1

cutover failed

/tti/applmgr/fs_ne/EBSapps/log/adop/129/cutover_20150815_101941/TTi_eu504vm0142/log/cutover.lo
g
>>>
...
AutoPatch error:
XBOL_TOP value does not match value from topfile.


Expected: /pti/applmgr/fs1/EBSapps/appl/xbol/12.0.0

Found   : /tti/applmgr/fs1/EBSapps/appl/xbol/12.0.0

AutoPatch error:

Error reconciling product top settings with environment in aimini().


You should check the file

/tti/applmgr/fs_ne/EBSapps/log/adop/129/cutover_20150815_101941/TTi_eu504vm0142/log/cutover.lo
g
...
<<<



[aptti@eu504vm0142 <RUN> ]$ set | grep XBOL

XBOL_TOP=/tti/applmgr/fs2/EBSapps/appl/xbol/12.0.0
[aptti@eu504vm0142 <RUN> ]$



[aptti@eu504vm0142 <RUN> ]$ grep xbol /tti/applmgr/fs2/EBSapps/appl/admin/topfile.txt

xbol    /tti/applmgr/fs2/EBSapps/appl
[aptti@eu504vm0142 <RUN> ]$




[aptti@eu504vm0142 <RUN> ]$ ls -ltr /tti/applmgr/fs2/EBSapps/appl/admin/topfile.txt*

-rw-r--r-- 1 aptti aatti 6751 Aug  5 11:36
/tti/applmgr/fs2/EBSapps/appl/admin/topfile.txt_bkp_05AUG2015

-rw-r--r-- 1 aptti aatti 6751 Aug  9 04:53
/tti/applmgr/fs2/EBSapps/appl/admin/topfile.txt_bkp_09AUG2015

-rw-r--r-- 1 aptti aatti 6751 Aug 13 15:01
/tti/applmgr/fs2/EBSapps/appl/admin/topfile.txt_bkp13aug15

-rw-r--r-- 1 aptti aatti 6751 Aug 14 02:37
/tti/applmgr/fs2/EBSapps/appl/admin/topfile.txt_bkp_14aug2015

-rw-r--r-- 1 aptti aatti 6751 Aug 14 02:38
/tti/applmgr/fs2/EBSapps/appl/admin/topfile.txt

[aptti@eu504vm0142 <RUN> ]$ diff
/tti/applmgr/fs2/EBSapps/appl/admin/topfile.txt_bkp_14aug2015
/tti/applmgr/fs2/EBSapps/appl/admin/topfile.txt
170c170

< xbol  /pti/applmgr/fs2/EBSapps/appl
---
> xbol  /tti/applmgr/fs2/EBSapps/appl

[aptti@eu504vm0142 <RUN> ]$



Similar issue in:

    Bug 18697209 : OMCS:ADOP PREPARE PHASE FAILS WHEN RECONCILING CUSTOM PRODUCT TOP


SQL> l

  1* select OA_VAR, NAME, DEFAULT_VALUE from FND_OAM_CONTEXT_CUSTOM
SQL> /


OA_VAR                         NAME                           DEFAULT_VALUE

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

c_xbol                         c_xbol                       
/pti/applmgr/fs2/EBSapps/appl/xbol/12.0.0

c_xx_itesoft                   c_xx_itesoft                 
/pti/applmgr/fs1/EBSapps/appl/xx_itesoft/12.0.0

c_xx                           c_xx                         
/data/applgeos12d9/geos12d9/fs1/EBSapps/appl/xx/12.0.0

c_cle                          c_cle                        
/data/applgeos12d9/geos12d9/fs1/EBSapps/appl/cle/12.0.0

c_xxmig                        c_xxmig                      
/pti/applmgr/fs2/EBSapps/appl/xxmig/12.0.0



> XBOL_TOP value is not reflected correctly (looks like post clonning issue)




=== Action Plan ===

1. abort ADOP

2. run autoconfig


3. re-try applying patch hrglobal.drv (last action plan with adop only)

[aptti@eu504vm0142 <RUN> ]$ adop phase=cutover
.
.
.
adop exiting with status = 0 (Success)
[aptti@eu504vm0142 <RUN> ]$
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

.53G76XB    pti    "Fs_clone failing txkValidateDomainInRCOut.txt
Domain is not in edit mode"    1920804.1


&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

RFC .5DQ9WAL


ISSUE : cutover failing


from node mohpc015
=============================================
ValidateOHSConfigFilesForCrossRef ...
=============================================

        ERROR: File - /tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS2/bin/opmnctl contains cross reference in it.
        ERROR: File - /tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS2/bin/opmnctl contains cross reference in it.
        ERROR: File - /tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS2/bin/opmnctl contains cross reference in it.
        Corrective Action: Contact Oracle Support to identify the best course of action.

from node mohpc016
/tp1i/applmgr/fs_ne/EBSapps/log/adop/58/cutover_20151118_201829/Tp1I_mohpc016/ADOPValidations_detailed.log
        ERROR: File - /tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS3/bin/opmnctl contains cross reference in it.
        ERROR: File - /tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS3/bin/opmnctl contains cross reference in it.
        ERROR: File - /tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS3/bin/opmnctl contains cross reference in it
      
      


Solution:
-========

Corrected files /tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS2/bin/opmnctl and
             /tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS3/bin/opmnctl
           
Which were referencing wrong FS

cd /tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS2

[aptp1i@mohpc017 <RUN> ]$ diff opmnctl_abkp19nov opmnctl
1c1
< #!/tp1i/applmgr/fs2/FMW_Home/webtier/perl/bin/perl
---
> #!/tp1i/applmgr/fs1/FMW_Home/webtier/perl/bin/perl
25,26c25,26
< $OracleInstance = '/tp1i/applmgr/fs2/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS3';
< $OracleHome = '/tp1i/applmgr/fs2/FMW_Home/webtier';
---
> $OracleInstance = '/tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS3';
> $OracleHome = '/tp1i/applmgr/fs1/FMW_Home/webtier';
[aptp1i@mohpc017 <RUN> ]$


+ reran cutover


 + FS switch completed , but failed to start services


Summary report for current adop session -
    Node mohpc017: FAILED
       - Cutover status:    FS_CUTOVER_COMPLETED
       [UNEXPECTED] Error occurred running "sh /tp1i/inst/fs1/inst/apps/Tp1I_mohpc
                    017/admin/scripts/adadminsrvctl.sh  start -nopromptmsg -silent forcepa
                    tchfs"
       [UNEXPECTED] Error occurred starting Admin Server
       [UNEXPECTED] Cutover phase has failed.
    Node mohpc016: HALTED
       - Cutover status:    FS_CUTOVER_COMPLETED
       [UNEXPECTED] Detected a failed session on another node(s): mohpc015 and mohgn
                    pc017
       [UNEXPECTED] Execution halted.
    Node mohpc015: HALTED
       - Cutover status:    FS_CUTOVER_COMPLETED
       [UNEXPECTED] Detected a failed session on another node(s): mohpc017
       [UNEXPECTED] Execution halted.
    For more details, run the command: adop -status -detail


[STATEMENT] Please run adopscanlog utility, using the command

"adopscanlog -latest=yes"

to get the list of the log files along with snippet of the error message corresponding to each log file.


adop exiting with status = 2 (Fail)


+ started the services manually

+ restarting cutover

Thanks,
.

+ cutover completed Successfully

Summary report for current adop session -
    Node mohpc017: COMPLETED
       - Cutover status:    COMPLETED
    Node mohpc016: COMPLETED
       - Cutover status:    COMPLETED
    Node mohpc015: COMPLETED
       - Cutover status:    COMPLETED
    For more details, run the command: adop -status -detail

adop exiting with status = 0 (Success)
[aptp1i@mohpc017 <RUN> ]$

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
.5DQ9WAL    tp1i


fs_clone failed
------------------

-----------------------------
ERROR: The following required ports are in use:
-----------------------------
10000 : OHS Administration Proxy Port
6201 : ONS Remote Port
Corrective Action: Free the listed ports and retry the adop operation.



-----------------------------
ERROR: The following required ports are in use:
-----------------------------
10000 : OHS Administration Proxy Port
6201 : ONS Remote Port
Corrective Action: Free the listed ports and retry the adop operation.

Completed execution : ADOPValidations.java


[root@mohpc016 ~]# netstat -anp | grep 10000
tcp        0      0 0.0.0.0:10000               0.0.0.0:*                   LISTEN      26384/httpd.worker
[root@mohpc016 ~]# ps -ef | grep 26384
aptp1i 26384 27568  0 07:44 ?        00:00:02 /tp1i/applmgr/fs1/FMW_Home/webtier/ohs/bin/httpd.worker -DSSL


[root@mohpc016 ~]# netstat -anp | grep 6201
tcp        0      0 0.0.0.0:6201                0.0.0.0:*                   LISTEN      27568/opmn
[root@mohpc016 ~]# ps -ef | grep 27568
aptp1i 26384 27568  0 07:44 ?        00:00:02 /tp1i/applmgr/fs1/FMW_Home/webtier/ohs/bin/httpd.worker -DSSL



MT mohpc015
===============

[aptp1i@mohpc017 <RUN> ]$  grep -i  ohs_adminport /tp1i/inst/fs1/inst/apps/Tp1I_mohpc015/appl/admin/Tp1I_mohpc015.xml
         <ohs_adminport oa_var="s_ohs_adminport" oa_type="PORT" base="9999" step="1" range="-1" label="OHS Administration Proxy Port">9999</ohs_adminport>

[aptp1i@mohpc017 <RUN> ]$ grep -i  ohs_adminport  /tp1i/inst/fs2/inst/apps/Tp1I_mohpc015/appl/admin/Tp1I_mohpc015.xml
         <ohs_adminport oa_var="s_ohs_adminport" oa_type="PORT" base="9999" step="1" range="-1" label="OHS Administration Proxy Port">10000</ohs_adminport>
[aptp1i@mohpc017 <RUN> ]$


[aptp1i@mohpc017 <RUN> ]$ grep -i s_ons_remoteport /tp1i/inst/fs1/inst/apps/Tp1I_mohpc015/appl/admin/Tp1I_mohpc015.xml
      <ons_remoteport oa_var="s_ons_remoteport" oa_type="PORT" base="6200" step="1" range="-1" label="ONS Remote Port">6200</ons_remoteport>

[aptp1i@mohpc017 <RUN> ]$  grep -i s_ons_remoteport /tp1i/inst/fs2/inst/apps/Tp1I_mohpc015/appl/admin/Tp1I_mohpc015.xml
      <ons_remoteport oa_var="s_ons_remoteport" oa_type="PORT" base="6200" step="1" range="-1" label="ONS Remote Port">6201</ons_remoteport>


MT mohpc016
===============
[aptp1i@mohpc017 <RUN> ]$ grep -i  ohs_adminport /tp1i/inst/fs1/inst/apps/Tp1I_mohpc016/appl/admin/Tp1I_mohpc016.xml
         <ohs_adminport oa_var="s_ohs_adminport" oa_type="PORT" base="9999" step="1" range="-1" label="OHS Administration Proxy Port">9999</ohs_adminport>

[aptp1i@mohpc017 <RUN> ]$ grep -i  ohs_adminport /tp1i/inst/fs2/inst/apps/Tp1I_mohpc016/appl/admin/Tp1I_mohpc016.xml
         <ohs_adminport oa_var="s_ohs_adminport" oa_type="PORT" base="9999" step="1" range="-1" label="OHS Administration Proxy Port">10000</ohs_adminport>
[aptp1i@mohpc017 <RUN> ]$

[aptp1i@mohpc017 <RUN> ]$ grep -i s_ons_remoteport /tp1i/inst/fs1/inst/apps/Tp1I_mohpc016/appl/admin/Tp1I_mohpc016.xml
      <ons_remoteport oa_var="s_ons_remoteport" oa_type="PORT" base="6200" step="1" range="-1" label="ONS Remote Port">6200</ons_remoteport>

[aptp1i@mohpc017 <RUN> ]$ grep -i s_ons_remoteport /tp1i/inst/fs2/inst/apps/Tp1I_mohpc016/appl/admin/Tp1I_mohpc016.xml
      <ons_remoteport oa_var="s_ons_remoteport" oa_type="PORT" base="6200" step="1" range="-1" label="ONS Remote Port">6201</ons_remoteport>
[aptp1i@mohpc017 <RUN> ]$



Findings
=========

on mohpc017

[aptp1i@mohpc017 <RUN> ]$ adopmnctl.sh status -l

You are running adopmnctl.sh version 120.0.12020000.2

Checking status of OPMN managed processes...

Processes in Instance: EBS_web_Tp1I_OHS1
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
ias-component                    | process-type       |     pid | status   |        uid |  memused |    uptime | ports
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
EBS_web_Tp1I                   | OHS                |   54378 | Alive    |  321651577 |  4421204 |  24:25:51 | https:4443,https:9999,http:8000


adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /tp1i/inst/fs1/inst/apps/Tp1I_mohpc017/logs/appl/admin/log/adopmnctl.txt for more information ...


mohpc015
==============

[aptp1i@mohpc017 <RUN> ]$ adopmnctl.sh status -l

You are running adopmnctl.sh version 120.0.12020000.2

Checking status of OPMN managed processes...

Processes in Instance: EBS_web_Tp1I_OHS2
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
ias-component                    | process-type       |     pid | status   |        uid |  memused |    uptime | ports
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
EBS_web_Tp1I                   | OHS                |   46776 | Alive    | 1285967872 |  2122628 |  14:03:18 | https:4443,https:10000,http:8000


adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /tp1i/inst/fs1/inst/apps/Tp1I_mohpc015/logs/appl/admin/log/adopmnctl.txt for more information ..


mohpc016
============
[aptp1i@mohpc017 <RUN> ]$ adopmnctl.sh status -l

You are running adopmnctl.sh version 120.0.12020000.2

Checking status of OPMN managed processes...

Processes in Instance: EBS_web_Tp1I_OHS3
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
ias-component                    | process-type       |     pid | status   |        uid |  memused |    uptime | ports
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
EBS_web_Tp1I                   | OHS                |   26384 | Alive    | 1286021582 |  2122620 |  13:28:10 | https:4443,https:10000,http:8000


adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /tp1i/inst/fs1/inst/apps/Tp1I_mohpc016/logs/appl/admin/log/adopmnctl.txt for more information ...

+ OHS services on node mohpc015 and mohpc016 are started on patch FS ports 10000 and 6201



Action Done:
------------
Made below changes to /tp1i/applmgr/fs1/FMW_Home/user_projects/domains/EBS_domain_Tp1I/opmn/topology.xml

[aptp1i@mohpc017 <RUN> ]$ pwd
/tp1i/applmgr/fs1/FMW_Home/user_projects/domains/EBS_domain_Tp1I/opmn
[aptp1i@mohpc017 <RUN> ]$ diff topology.xml_abkp20nov topology.xml
3,4c3,4
<   <ias-instance id="EBS_web_Tp1I_OHS2" oracle-home="/tp1i/applmgr/fs1/FMW_Home/webtier" instance-home="/tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS2" host="mohpc015.orclsourcing.com" port="6201">
<     <ias-component id="EBS_web_Tp1I" type="OHS" mbean-class-name="oracle.ohs.OHSGlobalConfig" mbean-interface-name="oracle.ohs.OHSGlobalConfigMXBean" port="10000">
---
>   <ias-instance id="EBS_web_Tp1I_OHS2" oracle-home="/tp1i/applmgr/fs1/FMW_Home/webtier" instance-home="/tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS2" host="mohpc015.orclsourcing.com" port="6200">
>     <ias-component id="EBS_web_Tp1I" type="OHS" mbean-class-name="oracle.ohs.OHSGlobalConfig" mbean-interface-name="oracle.ohs.OHSGlobalConfigMXBean" port="9999">
17,18c17,18
<   <ias-instance id="EBS_web_Tp1I_OHS3" oracle-home="/tp1i/applmgr/fs1/FMW_Home/webtier" instance-home="/tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS3" host="mohpc016.orclsourcing.com" port="6201">
<     <ias-component id="EBS_web_Tp1I" type="OHS" mbean-class-name="oracle.ohs.OHSGlobalConfig" mbean-interface-name="oracle.ohs.OHSGlobalConfigMXBean" port="10000">
---
>   <ias-instance id="EBS_web_Tp1I_OHS3" oracle-home="/tp1i/applmgr/fs1/FMW_Home/webtier" instance-home="/tp1i/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_Tp1I_OHS3" host="mohpc016.orclsourcing.com" port="6200">
>     <ias-component id="EBS_web_Tp1I" type="OHS" mbean-class-name="oracle.ohs.OHSGlobalConfig" mbean-interface-name="oracle.ohs.OHSGlobalConfigMXBean" port="9999">
45c45
< </topology>
\ No newline at end of file
---
> </topology>
[aptp1i@mohpc017 <RUN> ]$


+ Request customer and bounce servers mohpc016 and mohpc015
+ make sure no services are running on ports 10000 and 6201
    netstat -anp | grep 10000  -> nothing shd return
    netstat -anp | grep 6201   -> nothing shd return
  
Thanks,
.

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
.5F6HGXJ


adop prepare failing

logs
======

-----------------------------
ERROR: The following required ports are in use:

-----------------------------
6803 : Managed Server Port 2
6803 : WLS OAEA Application Port

Corrective Action: Free the listed ports and retry the adop operation.


Completed execution : ADOPValidations.java


RUn FS

[aptiso2i@mohisos010 <RUN> ]$ netstat -an | grep 6803
tcp        0      0 141.143.130.5:6803          0.0.0.0:*                   LISTEN
tcp        0      0 141.143.130.5:6803          141.143.130.5:10530         ESTABLISHED
tcp        0      0 141.143.130.5:10530         141.143.130.5:6803          ESTABLISHED
[aptiso2i@mohisos010 <RUN> ]$ grep -i 6803 $CONTEXT_FILE
         <wls_oaeaport oa_var="s_wls_oaeaport" oa_type="PORT" base="6801" step="1" range="-1" label="WLS OAEA Application Port">6803</wls_oaeaport>
         <oaea_server_ports oa_var="s_oaea_server_ports">oaea_server1:6803</oaea_server_ports>
         <oaea_nodes oa_var="s_oaea_nodes">mohisos010.orclsourcing.com:6803</oaea_nodes>


[aptiso2i@mohisos010 <RUN> ]$  grep -i 6803 /tiso2i/applmgr/fs2/FMW_Home/user_projects/domains/EBS_domain_TISO2I/config/config.xml
    <listen-port>6803</listen-port>
[aptiso2i@mohisos010 <RUN> ]$



+ Patch FS

[aptiso2i@mohisos010 <RUN> ]$  grep -i 6803 /tiso2i/inst/fs1/inst/apps/TISO2I_mohisos010/appl/admin/TISO2I_mohisos010.xml
         <wls_oaeaport oa_var="s_wls_oaeaport" oa_type="PORT" base="6801" step="1" range="-1" label="WLS OAEA Application Port">6803</wls_oaeaport>
         <oaea_server_ports oa_var="s_oaea_server_ports">oaea_server1:6803</oaea_server_ports>
         <oaea_nodes oa_var="s_oaea_nodes">mohisos010.orclsourcing.com:6803</oaea_nodes>

[aptiso2i@mohisos010 <RUN> ]$ grep -i 6803 /tiso2i/applmgr/fs1/FMW_Home/user_projects/domains/EBS_domain_TISO2I/config/config.xml
    <listen-port>6803</listen-port>
[aptiso2i@mohisos010 <RUN> ]$


+ Stopped process temporerly on port 6803
+ restart adop prepare

Thanks,
.

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
.5FE1J6L      TCZB1I


adop prepare failing


error
======


adalnctl.sh: check the logfile /tczb1i/inst/fs2/inst/apps/TCZB1I_mohczbk007/logs/appl/admin/log/adalnctl.txt for more information ...

          [EVENT]     [END   2015/12/08 00:39:58] Start Apps Listner
        [EVENT]     [START 2015/12/08 00:39:58] Run the ADZDPATCH concurrent program
          [EVENT]     [START 2015/12/08 00:40:02] Checking status of the ADZDPATCH concurrent program
            [EVENT]     Status of ADZDPATCH:
            [EVENT]     This request is waiting to be processed by the Conflict Resolution
Manager.  This request cannot yet begin execution because other requests
may conflict with it. The Conflict Resolution Manager will determine when
this request may begin execution. User SYSADMIN submitted this request on
08-DEC-2015 00:40:01.  No action required. This is a normal condition.
          [EVENT]     [END   2015/12/08 00:40:04] Checking status of the ADZDPATCH concurrent program
          [UNEXPECTED]Error while trying to find the status oF ICM
          [UNEXPECTED]Error while runConcurrentProgram sub-routine is called.
          [ERROR]     Prepare phase completed with errors or warnings. Please check logfiles.
          Log file: /tczb1i/applmgr/fs_ne/EBSapps/log/adop/16/adop_mohczbk007_20151208_003931.log


Action Plan
============

+ Bringdown CM services
+ Run the adadmin to  relink the FND product executables.
+ restart the ICM and retest the issue
  ie : run adop phase=prepare

Thanks,
.


Prepare failed again

error from
/tczb1i/applmgr/fs_ne/EBSapps/log/adop/16/prepare_20151208_021005/TCZB1I_mohczbk007/fndsvcrg.log


Cannot complete applications logon. You may have entered an invalid applications password, or there may have been a database connect error.
Internal Concurrent Manager status could not be determined.



SQL> select FND_WEB_SEC.VALIDATE_LOGIN('GUEST','ORACLE') from dual;

FND_WEB_SEC.VALIDATE_LOGIN('GUEST','ORACLE')
--------------------------------------------------------------------------------
Y


SQL> select FND_WEB_SEC.VALIDATE_LOGIN('APPS','D1xMF9pc') from dual;

FND_WEB_SEC.VALIDATE_LOGIN('APPS','W9AOG1LB')
--------------------------------------------------------------------------------
N



+ changed the APPS password
+ changed the SYSADMIN password
+  rerun adop phase=prepare

completed successfully

Thanks,
.

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

decrypt weblogic password

1. Create a script decrypt_password.py in $DOMAIN_HOME/security directory and paste the following code into it:

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

from weblogic.security.internal import *
from weblogic.security.internal.encryption import *
encryptionService = SerializedSystemIni.getEncryptionService(".")
clearOrEncryptService = ClearOrEncryptedService(encryptionService)

# Take encrypt password from user
pwd = raw_input("Paste encrypted password ({AES}fk9EK...): ")

# Delete unnecessary escape characters
preppwd = pwd.replace("\\", "")

# Display password
print "Decrypted string is: " + clearOrEncryptService.decrypt(preppwd)


========================================================================
.11619910049

2. Set domain environment variables

source $DOMAIN_HOME/bin/setDomainEnv.sh
3. Get encrypted password, in this example from boot.properties file of AdminServer

4. Navigate to $DOMAIN_HOME/security directory and run the following command to start decryption:

cd $DOMAIN_HOME/security

java weblogic.WLST decrypt_password.py


Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Please enter encrypted password (Eg. {AES}fk9EK...): {AES}jkIkkdh693dsyLt+DrKUfNcXryuHKLJD76*SXnPqnl5oo\=
Decrypted string is: welcome01


example:



Bfv2rtQs


[apdmsa1c@mohmsan004 <RUN> ]$ pwd
/dmsa1c/applmgr/fs1/FMW_Home/user_projects/domains/EBS_domain_dmsa1c
[apdmsa1c@mohmsan004 <RUN> ]$ cd security/
[apdmsa1c@mohmsan004 <RUN> ]$ vi decrypt_password.py
[apdmsa1c@mohmsan004 <RUN> ]$ java weblogic.WLST decrypt_password.py

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Paste encrypted password ({AES}fk9EK...): {AES}nRwZgIecHhpFdol/YtnExJNbySzalAI+Zm+Hg3maeR8=
Decrypted string is: Bfv2rtQs
[apdmsa1c@mohmsan004 <RUN> ]$



FOR APPS
========
[apdmsa1c@mohmsan004 <RUN> ]$ . ./setDomainEnv.sh
[apdmsa1c@mohmsan004 <RUN> ]$ pwd
/dmsa1c/applmgr/fs1/FMW_Home/user_projects/domains/EBS_domain_dmsa1c
[apdmsa1c@mohmsan004 <RUN> ]$ cd security/
[apdmsa1c@mohmsan004 <RUN> ]$ vi decrypt_password.py
[apdmsa1c@mohmsan004 <RUN> ]$ java weblogic.WLST decrypt_password.py

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Paste encrypted password ({AES}fk9EK...): {AES}nRwZgIecHhpFdol/YtnExJNbySzalAI+Zm+Hg3maeR8=
Decrypted string is: Bfv2rtQs
[apdmsa1c@mohmsan004 <RUN> ]$

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
 ISSUE                                                                                         SOLUTION
**************************                                        ************
cutover failed Unable to acquire lock on sessions table       1903316.1

"Fsclone failing txkValidateDomainInRCOut.txt                      1920804.1
Domain is not in edit mode"

adop apply failed on adadmin task                                            1672449.1

FSclone [ERROR]: At least one Oracle inventory                  1967205.1
check has failed

fs_clone failed with  ERROR: Managed Server's are            1582473.1
 not in sync between  ile system context and DB context

fs_clone Script Executed in 7200051 milliseconds,               1599424.1
returning status -1 (sol: export TIMEDPROCESS_TIMEOUT=-1)

prepare failing on UNEXPECTED]Error occured unlocking  2007225.1
AD_ADOP_SESSION_PATCHES table

ohs not starting  satying in stop status.

Sol: moved states directory /sid/applmgr/fs1/FMW_Home/webtier/instances/EBS_web_SID_OHS2/config/OPMN/opmn/states03316.1











Saturday, 12 March 2016

Application Login issues

ISSUE -> Private url redirecting to DMZ url


+ Able to reproduce the issue

Login to https://oracler12test2.orclsourcing.com


tried below navigation, it is  redirecting to DMZ url


Workflow Administrator Web Applications -> Administrator Workflow ->Status Monitor

error:

System Administrator is not a valid responsibility for the current user. Please contact your
System Administrator

OBSERVATION/FINDINGS
=====================

BELOW PROFILE ARE SET TO DMZ url at site level and are null at server level


Application Framework Agent  https://oracler12test2-dmz.orclsourcing.com:443
Applications JSP Agent       https://oracler12test2-dmz.orclsourcing.com:443
Applications Web Agent  https://oracler12test2-dmz.orclsourcing.com:443/pls/TIOI2I
Apps Servlet Agent      https://oracler12test2-dmz.orclsourcing.com:443/OA_HTML

Solution:
=========

Changed below profile

Application Framework Agent

From https://oracler12test2-dmz.orclsourcing.com:443
To   https://oracler12test2.orclsourcing.com:443

Applications JSP Agent      

From https://oracler12test2-dmz.orclsourcing.com:443
To   https://oracler12test2.orclsourcing.com:443

Applications Web Agent 
From https://oracler12test2-dmz.orclsourcing.com:443/pls/TIOI2I
To   https://oracler12test2.orclsourcing.com:443/pls/TIOI2I

Apps Servlet Agent     

From https://oracler12test2-dmz.orclsourcing.com:443/OA_HTML
To   https://oracler12test2.orclsourcing.com:443/OA_HTML


+ Corrected below profiles at server(mohioil009) level

Application Framework Agent  https://oracler12test2-dmz.orclsourcing.com:443
Applications JSP Agent       https://oracler12test2-dmz.orclsourcing.com:443
Applications Web Agent  https://oracler12test2-dmz.orclsourcing.com:443/pls/TIOI2I
Apps Servlet Agent      https://oracler12test2-dmz.orclsourcing.com:443/OA_HTML

+ Now Issue fixed ( not redirecting to DMZ url)
========================================================
ISSUE:  jtflogin.jsp page failing

http://aohsitgr06.orclsourcing.com:10015/OA_HTML/jtflogin.jsp -- not working


SOLUTION:
==> Issue was with missing classfiles under $COMMON_TOP/${CONTEXT_NAME}/_pages.

==> Restored backup and issued fixed.

========================================================
 Issue: AppsLocalLogin.jsp not working.. blank page diaplays

oacore applicationlog
----------------------------

javax.servlet.ServletException: java.lang.RuntimeException: Guest user/pwd does not exist or
match: GUEST/ORACLE

SQL> select FND_WEB_SEC.VALIDATE_LOGIN('GUEST','ORACLE') from dual;


FND_WEB_SEC.VALIDATE_LOGIN('GUEST','ORACLE')

--------------------------------------------------------------------------------
N

Solution:
---------
EBS R12 Login Page Is Not Coming Up - java.lang.RuntimeException: Guest user/pwd does not exist or
match: GUEST/ORACLE (Doc ID 1673030.1)

========================================================
ISSUE DMZ url redirecting
DMZ url Fix:

$FND_SECURE/PWWFNI.dbc on DMZ had wrong server id.

corrected dbc file and that fix the DMZ url redirection issue.
SOLUTION:
cd $FND_SECURE

bash-3.00$ diff PNNFNI.dbc PNNFNI.dbc_Oct31_Orig
4c4

< APPL_SERVER_ID=65DD894AE9ADC6E5E040558CF632429E23820455064877020381049937104107
---

> APPL_SERVER_ID=6595AEA65D9BFE3FE040558CF6325E0C33748155693022171005269635221930
bash-3.00$
========================================================
 ISSUE :when clicking on https://ssinsite1.vbgov.com  it is not redirecting to https://ssinsite1.vbgov.com//OA_HTML/AppsLogin

solution change in /pcov1i/inst/apps/PCOV1I_mohcovb010/portal/index.html

bash-3.2$ diff index.html_bkp2dec12 index.html
22c22
< <META http-equiv=REFRESH content="1; URL=https://ssinsite1.vbgov.com">
---
> <META http-equiv=REFRESH content="1; URL=https://ssinsite1.vbgov.com/OA_HTML/AppsLogin">
26c26
< The E-Business Home Page is located at <a href="https://ssinsite1.vbgov.com">https://ssinsite1.vbgov.com</a><br>
---
> The E-Business Home Page is located at <a href="https://ssinsite1.vbgov.com/OA_HTML/AppsLogin">https://ssinsite1.vbgov.com/OA_HTML/AppsLogin</a><br>
28c28
< <A HREF="https://ssinsite1.vbgov.com">here</A>.
---
> <A HREF="https://ssinsite1.vbgov.com/OA_HTML/AppsLogin">here</A>.
bash-3.2$
========================================================
Issue : AppsLocalLogin.jsp Not working after MT bounce

Solution:
changed LONG_RUNNING_JVM to false in oc4j.properties


rotoorap01:apdsenzi>pwd
/dsenzi/inst/apps/DSENZI_rotoorap01/ora/10.1.3/j2ee/oacore/config


rotoorap01:apdsenzi>diff oc4j.properties oc4j.properties.bkp28oct
46c46

< LONG_RUNNING_JVM=false
---
> LONG_RUNNING_JVM=true
rotoorap01:apdsenzi>

Bounced MT
AppsLocalLogin.jsp  working Now
========================================================
LOGIN :
Issue Url https://csvtprd.usco.com/OA_HTML/AppsLogin --> not working

error
You have encountered an unexpected error. Please contact the System Administrator for assistance."

oracle.apps.fnd.cache.CacheException;


SOlution
---------
As per note ID 418130.1

Run Concurrent manger job "Synchronize Workflow Local Tables" as sysadmin.

As you may be unable to login to applications to run the program you may also try this approach to run the request manually:

SQL> begin apps.wf_local_synch.BULKSYNCHRONIZATION(P_ORIG_SYSTEM=>'ALL', 
P_PARALLEL_PROCESSES=>2, 
P_LOGGING=>'LOGGING', P_RAISEERRORS=>TRUE, 
P_TEMPTABLESPACE=>'APPS_TS_TX_DATA'); END;
/  2    3    4    5 

PL/SQL procedure successfully completed.

SQL>


+ bounced Databse

+ started Mt services

Url https://csvtprd.usco.com/OA_HTML/AppsLogin --> working now
========================================================

Issue : url home page not working after disable of SSL ( appslocallogin.jsp working)

Solution
========
$ diff $INST_TOP/ora/10.1.3/Apache/Apache/conf/httpd.conf
$INST_TOP/ora/10.1.3/Apache/Apache/conf/httpd.conf_bkpnew

1163,1164c1163,1164

< #LoadModule certheaders_module libexec/mod_certheaders.so

< #include "/sexc2i/inst/apps/SEXC2I_aohsexcc34/ora/10.1.3/Apache/Apache/conf/ssl_terminator.conf"

---
> LoadModule certheaders_module libexec/mod_certheaders.so

> include "/sexc2i/inst/apps/SEXC2I_aohsexcc34/ora/10.1.3/Apache/Apache/conf/ssl_terminator.conf"
==============================================================

Issue : url home page not working after disable of SSL ( appslocallogin.jsp working)

Solution
========
$ diff $INST_TOP/ora/10.1.3/Apache/Apache/conf/httpd.conf
$INST_TOP/ora/10.1.3/Apache/Apache/conf/httpd.conf_bkpnew

1163,1164c1163,1164

< #LoadModule certheaders_module libexec/mod_certheaders.so

< #include "/sexc2i/inst/apps/SEXC2I_aohsexcc34/ora/10.1.3/Apache/Apache/conf/ssl_terminator.conf"

---
> LoadModule certheaders_module libexec/mod_certheaders.so

> include "/sexc2i/inst/apps/SEXC2I_aohsexcc34/ora/10.1.3/Apache/Apache/conf/ssl_terminator.conf"

$

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

login issue
Issue: url https://dhcm.cov.com not working ,  Error with HTTP-500 ( Internal server error )


oacore log
===========

       at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
        at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
        at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
        at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
        at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)

Observation
=============
SQL> select name,created from v$database;

NAME      CREATED
--------- ---------------
DNOILI    15-MAR-12

SQL> sho parameter sec_case_sensitive_logon

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sec_case_sensitive_logon             boolean     TRUE

cause:
sec_case_sensitive_logon need to to FALSE


SOLUTION (Doc ID 1335176.1)
=========

changed sec_case_sensitive_logon to FALSE in PARAMETER FILE

+ Bounced Database & MT

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sec_case_sensitive_logon             boolean     FALSE
SQL>

Login Issue resolved

Able to login to the url https://dhcm.cov.com
==============================================================

ISSUE:Login URLs Not working after the action plan

SYMPTOMS: getting below error when login to the application url

Request URI:/OA_HTML/OA.jsp  Exception:java.lang.ClassFormatError: 
oracle/apps/fnd/security/HTMLProcessor (Truncated class file)


SOLUTION: replaced the HTMLProcessor.class file from backup(snapshot)

$ pwd

/plsfri/applmgr/common/java/oracle/apps/fnd/security


rwxr-xr-x    1 applsfri aaplsfri     6281 Aug  3  2008 HTMLProcessor.class

-rwxr-xr-x    1 applsfri aaplsfri     6372 Jun 26 12:31 HTMLProcessor.class_Old

Issue solved.
==============================================================
DMZ url redirect issue

The Follwoing Profile options are not(null) set at server level for Public MT  aohsmich39 and aohsmich40


changed the below profile options  at server level for Public MT  aohsmich39 and aohsmich40

Application Framework Agent   https://tstmbcapps.mkercorp.com:443
Applications JSP Agent        https://tstmbcapps.mkercorp.com:443
Apps Servlet Agent            https://tstmbcapps.mkercorp.com:443/OA_HTML
Applications Web Agent        https://tstmbcapps.mkercorp.com:443/pls/TMIC1I


DMZ URl https://tstmbcapps.mkercorp.com --> working fine now

Thanks,
==============================================================
DMZ url  https://csctest.poalsea.com.mx-> not working


Observation/Findings

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

+ ServerName is incorect in Httpd.conf file
 
  on node 12

   bash-3.00$ grep ServerName  httpd.conf

   # ServerName allows you to set a host name which is sent back to clients for

   ServerName appsalseatest.orclsourcing.com

  on node 12
 

     bash-3.00$ grep ServerName  httpd.conf

     # ServerName allows you to set a host name which is sent back to clients for

    ServerName appsalseatest.orclsourcing.com
  
SOLUTION:
---------

Corrected ServerName in  httpd.conf on both the DMZ nodes aohsalse11 and aohsalse12



bash-3.00$ hostname
aohsalse11

bash-3.00$ diff httpd.conf httpd.conf_abkp5apr
413,414c413

< #ServerName appsalseatest.orclsourcing.com
< ServerName csctest.grupoalsea.com.mx
---

> ServerName appsalseatest.orclsourcing.com
bash-3.00$

bash-3.00$ hostname
aohsalse12


bash-3.00$ diff httpd.conf httpd.conf_abkp5apr
413,414c413,414

< #ServerName appsalseatest.orclsourcing.com
< ServerName csctest.grupoalsea.com.mx
---

> ServerName appsalseatest.orclsourcing.com
>

DMZ url  https://csctest.poalsea.com.mx-> working
Thanks,
==============================================================

ISSUE:

When accessing url https://oracletnob6i.obleenyinc.com
getting below error:

"You have encountered an unexpected error.   Please contact the System Administrator for assistance. 
 Click  here  for exception details. "


error log
=========
[Tue Jul 28 00:19:19 2015] [error] [client 141.147.35.221] [ecid: 1438060759:129.155.128.8:19831:0:11,0] mod_oc4j: Failed to find a failover oc4j process for session request for destination: application://oacore (no island or jgroup).
[Tue Jul 28 00:19:20 2015] [error] [client 141.147.35.221] [ecid: 1438060760:129.155.128.8:19831:0:12,0] mod_oc4j: Failed to find a failover oc4j process for session request for destination: application://oacore (no island or jgroup).
[Tue Jul 28 00:20:24 2015] [error] [client 141.147.67.10] [ecid: 1438060824:129.155.128.8:19830:0:10,0] File does not exist: /tnob6i/inst/apps/TNOB6I_aohsnobl12/portal/favicon.ico
[Tue Jul 28 00:20:24 2015] [error] [client 141.147.67.10] [ecid: 1438060824:129.155.128.8:19830:0:11,0] File does not exist: /tnob6i/inst/apps/TNOB6I_aohsnobl12/portal/favicon.ico
[Tue Jul 28 00:20:31 2015] [error] [client 141.147.53.182] [ecid: 1438060831:129.155.128.8:19832:0:10,0] mod_oc4j: Failed to find a failover oc4j process for session request for destination: application://oacore (no island or jgroup).
[Tue Jul 28 00:20:31 2015] [error] [client 141.147.53.182] [ecid: 1438060831:129.155.128.8:19832:0:11,0] mod_oc4j: Failed to find a failover oc4j process for session request for destination: application://oacore (no island or jgroup).
[Tue Jul 28 00:20:31 2015] [error] [client 141.147.53.182] [ecid: 1438060831:129.155.128.8:19832:0:12,0] mod_oc4j: Failed to find a failover oc4j process for session request for destination: application://oacore (no island or jgroup).



Error Page

Exception Details. 
 oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_ILLEGAL_CONNTEST_MODE. Tokens: TEST_MODE_VAL = 1 ;
    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1247)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:2215)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:557)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:439)
    at _OA._jspService(_OA.java:205)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:734)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
    at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:308)
    at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:68)
    at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:214)
    at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:219)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:407)
    at _RF._jspService(_RF.java:217)

Findings
==========

 cd /tnob6i/inst/.zfs/snapshot/.531YYPJ-exp30Jul15_aohsnobl11_TNOB6I_PROJ_20150723_0030/apps/TNOB6I_aohsnobl12/ora/10.1.3/j2ee/oacore/config
-bash-3.2$ diff oc4j.properties /tnob6i/inst/apps/TNOB6I_aohsnobl12/ora/10.1.3/j2ee/oacore/config/oc4j.properties
90c90,92
< #
---
> #Added below parameter as per Bug 17157260
>
> oa.connection.testmode=1
-bash-3.2$

Solution:
========
+ Restored oc4j.properties from snapshot

+ Issue Fixed

+ now able to access url https://oracletnob6i.obleenyinc.com/ without any issue

Thanks,
==============================================================
issue:

when navingting to Application Administrator responsibility
below error occurs


Function not available to this responsibility.

Change responsibilities or contact System Administrator


FINDNIGS:
=========

+ XBOL_TOP entry missing in formservlet.ini file


bash-3.00$ diff formservlet.ini /ptrivi/product/iAS/Apache/Jserv/etc/formservlet.ini
1c1

< $Header: txkGenFormServletIni.pl 115.17 2006/08/18 06:09:49 sbandla noship $
---

> $Header: txkGenFormServletIni.pl 115.20 2010/05/26 09:55:54 jmajumde noship $
55c55,56

< FND_SECURE=/ptrivi/applmgr/11510/fnd/11.5.0/secure/PTRIVI_aohstriv05
---

> FND_SECURE=/ptrivi/applmgr/11510/fnd/11.5.0/secure/PTRIVI_aohstriv05

> FORMS60_RECORD_GROUP_MAX=1000000
57c58
< APPLMSG=mesg
---
> APPLMSG=mesg
67a69

> FORMS60_SCROLL_ALL_BUT_ONE=TRUE
225a228
> IZU_TOP=/ptrivi/applmgr/11510/izu/11.5.0
278d280

< XBOL_TOP=/ptrivi/applmgr/CUSTOM/xbol/11.5.0



SOLUTION:
========

bash-3.00$ diff formservlet.ini formservlet.ini_abkp27may14
281d280

< XBOL_TOP=/ptrivi/applmgr/CUSTOM/xbol/11.5.0
bash-3.00$


Able to navigate to Application Administrator and other functions

+ ISSUE FIXED
==============================================================
ISSUE: WHILE LOGGING TO APPLICATION URL

 BELOW ERROR OCCURS:

 Internal Server Error

 The server encountered an internal error or misconfiguration and was unable to complete your
 request.

 Please contact the server administrator, apdcyp3i@orclsourcing.com and inform them of the
 time the error occurred, and anything you might have done that may have caused the error.

 More information about this error may be available in the server error log.

 SOLUTION:
 =========
 + RAN Aoljtest  https://cydev3.press.com/OA_HTML/jsp/fnd/aoljtest.jsp

 + Generated jar files from adadmin
 + compiled jsps
 + bounced apache server

issue fixed
==============================================================

ISSUE: application url not working


error

Request-URI Too Large
The requested URL's length exceeds the capacity limit for this server.
request failed: URI too long

Action Plan
-------------

+ Bring down MT services
+ run autoconfig
+ start the services
+ retest the issue

Thanks,
==============================================================

Issue:

"Application Diagnostics" responsibility does not visible on home page ( for sysadmin user)

background
-----------

'application Diagnostics' resp does not assigned as direct responsibility , but assigned as indirect responsibility.

When trying to add 'application Diagnostics' resp to sysadmin , erroring out saying  that responsibility is already exists

solution/workaround:
--------------------

from "user administrator"  Resp  check the role "application Diagnostics" it was not assigned.

Assigned role "application Diagnostics" to sysadmin user

+ logout and reloggedin

"Application Diagnostics" responsibility visible on home page ( for sysadmin user)

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

Application Diagnostics ' for these three users GOPAL.BIAL,RAVER.KAPR,ROBINSON.MAY
 are Inherited From   'Purchasing Super User ' responsibility

Inherited roles can only be revoked through the originating roles


 1. User Management responsibility
 2. Then go to Roles/Responsibilities tab and query the role/responsibility (Purchasing Super User ).
 3.Click on 'View in Hierarchy'.
 4. Remove the 'Application Diagnostics' responsibility.

 Please note that this will also remove the indirect role for all the users who have the role/ responsibility assigned to them.

 If you do not want it to be removed for all users then please create a new role without the inheritance and assign this role to the user who needs it.

 Thanks,

==============================================================
ISSUE: private url redirects to pulic after providing username pwd

cause: NODE TRUST LEVEL profile was set to external at site level.

profile_optdetails.sql

PROFILE_OPTION_ID SHORT_NAME                     NAME              LEVEL_SET CONTEXT           VALUE  LAST_UPDATE_DATE
----------------- ------------------------------ --------------------------- ----------------- ------ ------------------
             7511 NODE_TRUST_LEVEL               Node Trust Level  Server    mohPSNL010      3      26-JAN-13
             7511 NODE_TRUST_LEVEL               Node Trust Level  Server    mohPSNL040      3      17-JAN-15
             7511 NODE_TRUST_LEVEL               Node Trust Level  Site                        3      17-JAN-15

3 rows selected.

 solution:

 SQL> select PROFILE_OPTION_VALUE from fnd_profile_option_values where level_id=10001 and PROFILE_OPTION_ID=7511;

 PROFILE_OPTION_VALUE
 --------------------------------------------------
 3

 1 row selected.

 Elapsed: 00:00:00.02
 SQL> update fnd_profile_option_values set PROFILE_OPTION_VALUE=2 where level_id=10001 and PROFILE_OPTION_ID=7511;

 1 row updated.

 Elapsed: 00:00:00.01
 SQL> commit;

 Commit complete.

 Elapsed: 00:00:00.01
 SQL> select PROFILE_OPTION_VALUE from fnd_profile_option_values where level_id=10001 and PROFILE_OPTION_ID=7511;

 PROFILE_OPTION_VALUE
 --------------------------------------------------
 2

 1 row selected.
==============================================================
issue:

application url not workinng after updating fnd_user table

SQL> update fnd_user set end_date = '24-Apr-2012' where ( end_date is null or end_date >
sysdate) AND USER_NAME NOT IN ('KALANIG','JOVANOVL','WILSONJA','WUR');

2759 rows updated.

 SOlution

=========
Removed end date from GUEST and SYSADMIN users

SQL> update fnd_user set end_date=NULL where USER_NAME='GUEST';

1 row updated.

SQL> update fnd_user set end_date=NULL where USER_NAME='SYSADMIN';

1 row updated.

SQL> commit;

 Iuusue fixed , url working fine..

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



DBA Scripts used regularly

Session Details
==========

 set verify  off
 set head off
 set feedback on
 set long 5000
 select distinct
 '========================================================='||chr(10)||
 'Sid , Serial#     : '||S.Sid   ||' , '||S.Serial#  ||Chr(10)||
 'Server/Shadow     : '||P.Spid    ||Chr(10)||
 'Client/Foreground : '||S.Process   ||Chr(10)||
 'Terminal / Machine: '||S.terminal||' / '||S.Machine   ||Chr(10)||
 'Username........: '||S.Username   ||Chr(10)||
 'Osuser..........: '||S.Osuser   ||Chr(10)||
 'Program.........: '||S.Program    ||Chr(10)||
 'Module..........: '||S.Module    ||Chr(10)||
 'Status..........: '||S.Status  ||Chr(10)||
 'Action..........: '||S.Action   ||Chr(10)||
 'Wait_time.......: '||W.Wait_time   ||Chr(10)||
 'State ..........: '||W.State   ||Chr(10)||
 'Wait Event .....: '||W.Event   ||Chr(10)||
 'Seconds_in_wait.: '||W.Seconds_in_wait   ||Chr(10)||
 'Pga_alloc....: '|| To_char(P.Pga_alloc_mem/1024/1024,'9,999.99') ||' Mb'  ||Chr(10)||
 'Pga_used.....: '|| To_char(P.Pga_used_mem/1024/1024 ,'9,999.99') ||' Mb' ||Chr(10)||
 'Pga_free.....: '|| To_char(P.Pga_freeable_mem/1024/1024,'9,999.99') ||' Mb'  ||Chr(10)||
 'Pga_max......: '|| To_char(P.Pga_max_mem/1024/1024,'9,999.99') ||' Mb'  ||Chr(10)||
 'Lock / Latch.: '|| Nvl(S.Lockwait, 'None')||'/ '||Nvl(P.Latchwait, 'None')   ||Chr(10)||
 'Blocking Sessi=on: '||s.blocking_session||Chr(10)||
 'Blocking Session Status: '|| s.blocking_session_status||Chr(10)||
 'Latch Spin...: '|| Nvl(P.Latchspin, 'None')   ||Chr(10)||
 'Logon Time...: '|| To_char(S.Logon_time, 'Dy Dd-Mon-Yy Hh24:Mi:Ss')   ||Chr(10)||
 'Last Call....: '|| To_char(Sysdate-(S.Last_call_et/60/60/24), 'Dy Dd-Mon-Yy Hh24:Mi:Ss') || '  -> ' || To_char(S.Last_call_et/60, '99999.0') || ' Mins' || To_char(S.Last_call_et/60/60, '99999.0') || ' Hours' ||To_char(S.Last_call_et/60/60/24, '99.0') || ' Days'  ||Chr(10)||
 'Sql Address. : '||S.Sql_address   ||Chr(10)||
 'Sql Hash.... : '||S.Sql_hash_value   ||Chr(10)||
 'Prev Sql Hash: '||S.Prev_hash_value   ||Chr(10)||
 'Trans Status : '|| Nvl(T.Status,'None') || Chr(10)||
 'Trans Active : '|| Nvl(S.Taddr, 'None')||Chr(10)||
 'Undo Generation: '||Nvl(T.Used_ublk,0) || ' Blocks'||Chr(10)||
 'Changed Blocks : '||I.Block_changes||' Blocks'||Chr(10)||
 '............    Current  Sql Statment   .................: '||Chr(10)||
 '========================================================='||Chr(10)|| Nvl(Q.Sql_text,'No Current Sql Statment')    ||Chr(10)||
 '========================================================='||Chr(10)||
 '................  Prev Sql Statment  ..................: '||Chr(10)||
 '========================================================='||Chr(10)|| Nvl(Q2.Sql_text,'No Sql Statment')    ||Chr(10)||
 '========================================================='
 from gv$session s, gv$process p , gv$sqlarea q , gv$sqlarea q2 ,gv$session_wait w ,
 gv$transaction t, gv$sess_io i
 where p.addr=s.paddr
 and s.sid=i.sid
 and s.sid=nvl('&sid',s.sid)
 and s.sid=w.sid
 and p.spid=nvl('&spid',p.spid)
 and q.HASH_VALUE(+)=s.sql_hash_value
 and q2.hash_value(+)=s.prev_hash_value
 and s.taddr=t.addr(+)
 and nvl(s.process,-1) = nvl('&ClientPid',nvl(s.process,-1));


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

script to find concurrent req details------
==========================

set head on
   set verify off
   set echo off
   set pages 1500
   set linesize 132
   break on row skip 1

   prompt Checking for Concurrent program details run by this process id
   prompt **************************************************************
   prompt
   prompt
select /*+ CHOOSE*/
    'Node Name..............................: ' || q.node_name || chr(10) ||
    'Req id.................................: ' || Request_Id || chr(10) ||
    'Requestor..............................: ' || User_Name || chr(10) ||
    'Manager................................: ' || Q.User_Concurrent_Queue_Name || chr(10) ||
    'Status code............................: ' || decode(status_code,'A', 'Waiting','B',
    'Resuming','D', 'Cancelled','E', 'Error', 'G', 'Warning', 'H',
    'On Hold', 'R', 'Normal','S', 'Suspended', 'T', 'Terminating','W', 'Paused', 'X','Terminated', status_code) || chr(10) ||
           'Phase code.............................: ' || decode(phase_code, 'C', 'Completed',
           'I', 'Inactive', 'P', 'Pending', 'R', 'Running', phase_code) || chr(10) ||
           'Priority...............................: ' || Fcr.priority || chr(10) ||
           'Program................................: ' || Fcp.User_Concurrent_Program_Name || chr(10) ||
           'Time so far ...........................: ' ||trunc((sysdate-Fcr.actual_start_date)*24*60,2)||' min'|| chr(10) ||
           'Avg execution time in 30 days.........: ' || trunc(AVG_TIME,2) ||' min' || chr(10) ||
           'Max execution time in 30 days..........: ' || trunc(MAX_TIME,2) ||' min' || chr(10) ||
           'Fastest execution Time in 30 days......: ' ||trunc( MIN_TIME,2) || ' min' || chr(10) ||
           'Number of executions in last 30 days...: ' ||occurance || chr(10) ||
           'ClientPID..............................: ' || Fcr.OS_PROCESS_ID || chr(10) ||
           'ServerPID..............................: ' || Fcr.ORACLE_PROCESS_ID || chr(10) ||
           'Arguments passed to the program .......: ' ||Fcr.argument_text
from apps.Fnd_Concurrent_Requests Fcr,
apps.Fnd_Concurrent_Programs_vl Fcp,
     apps.Fnd_Oracle_Userid O,
     apps.Fnd_Concurrent_Processes P,
     apps.Fnd_Concurrent_Queues_vl Q,
     apps.Fnd_User,(select
     concurrent_program_id
     ,count(concurrent_program_id) occurance
     ,min(actual_completion_date-actual_start_date)*24*60 MIN_TIME
     ,max(actual_completion_date-actual_start_date)*24*60 MAX_TIME
     , avg(actual_completion_date-actual_start_date)*24*60 AVG_TIME
     from apps.fnd_concurrent_requests
   where status_code='C' and phase_code='C'and trunc(actual_start_date)>trunc(sysdate-30)
         group by concurrent_program_id
         having max(actual_completion_date-actual_start_date)*24*60 >5) CREQ
         where Controlling_Manager = Concurrent_Process_ID
         And ( P.Concurrent_Queue_ID = Q.Concurrent_Queue_ID AND
         P.Queue_Application_ID = Q.Application_ID )
         And O.Oracle_Id = Fcr.Oracle_Id and Fcr.ORACLE_PROCESS_ID in ('&Server_PID')
         And ( Fcr.Program_Application_Id = Fcp.Application_Id
         And Fcr.Concurrent_Program_Id = Fcp.Concurrent_Program_Id )
         And Requested_By = User_Id
         And Phase_Code = 'R' and status_code in ('R','T')
         --adding joins with new
         and Fcr.Concurrent_Program_Id=CREQ.Concurrent_Program_Id(+)
Order By Q.User_Concurrent_Queue_Name,q.node_name, Actual_Start_Date, Request_Id;

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

==== Running concurrent request details

col user_name format a20 word_wrapped
col ProgName format a25 word_wrapped
col requestId format 99999999
col StartDate format a20 word_Wrapped
col OS_PROCESS_ID format a6
col ETime format 99999999 word_Wrapped
col sid format 99999 word_Wrapped
set lines 200

select
sess.sid,sess.serial#,
oracle_process_id OS_PROCESS_ID,
fusr.description user_name ,
fcp.user_concurrent_program_name progName,
to_char(actual_Start_date,'DD-MON-YYYY HH24:MI:SS') StartDate,
request_id RequestId,
decode(fcr.phase_code,
'C','Complete',
'I','Inactive',
'P','Pending',
'R','Running',
'Unknown') phase_code ,
decode(fcr.status_code,
'C','Normal',
'D','Cancelled',
'E','Error',
'F','Scheduled',
'G','Warning',
'I','Normal',
'M','No Manager',
'Q','Standby',
'R','Normal',
'S','Suspended',
'T','Terminating',
'U','Disabled',
'W','Paused',
'Z','Waiting'
) status_code ,
(sysdate - actual_start_date)*24*60*60 ETime
from
fnd_concurrent_requests fcr,
fnd_concurrent_programs_tl fcp,
fnd_user fusr,
v$session sess
where
fcp.concurrent_program_id = fcr.concurrent_program_id
and fcr.program_application_id = fcp.application_id
and fcr.phase_code = 'R'
and fcr.status_code = 'R'
and fcr.requested_by = fusr.user_id
and fcr.oracle_session_id = sess.audsid (+)
order by 5 DESC
/
==========================================================
Running normal requests details
===============================
col phase for a10
col "Interval" for a12
col sid for 999999
col serial# for 999999
col process for a18
col spid for a10
col "Prog Name" for a45
set lines 300 pages 1000
select
 fr.request_id
,fr.phase
,fr.actual_start_date
,substr(numtodsinterval(nvl(fr.actual_completion_date,sysdate)-fr.actual_start_date,'DAY'),12,8) "Interval"
,se.sid
,se.serial#
,pr.spid
,se.process
,fr.user_concurrent_program_name "Prog Name"
from   APPS.fnd_amp_requests_v fr,
gv$session se,
gv$process pr
where  1=1
and    fr.phase_code ='R'
and    fr.oracle_session_id = se.audsid (+)
and    se.inst_id    =pr.inst_id(+)
and    se.paddr         = pr.addr(+)
/


++++++

PARENT AND CHILD Request details
==================================

set lines 300
col user_concurrent_program_name for a45 print
col concurrent_program_name for a20
col status for a10
col sid for a25 head "Sid|Serial#"
select   parent_request_id
    ,request_id
    ,(select sid||','||serial# from v$session where audsid=fav.ORACLE_SESSION_ID) sid
    ,user_concurrent_program_name
    ,status
    ,substr(numtodsinterval(nvl(actual_completion_date,sysdate)-actual_start_date,'DAY'),12,8) "Interval"
from   fnd_amp_requests_v fav
where  phase_code='R'
start  with parent_request_id = -1
connect by prior request_id = parent_request_id
/
========================================================================

Conc Request details with req-id
========================

 SELECT a.request_id, d.sid, d.serial# , c.SPID
    FROM apps.fnd_concurrent_requests a,
    apps.fnd_concurrent_processes b,
    v$process c,
    v$session d
    WHERE a.controlling_manager = b.concurrent_process_id
    AND c.pid = b.oracle_process_id
    AND b.session_id=d.audsid
    AND a.request_id = &Request_ID
    AND a.phase_code = 'R';

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

concurrent requests details with manager details
************************************

set lines 300
col os form A7 head AppProc
col spid form a6 head SPID
col program form A50 trunc
set pages 38
col time form 9999999.99 head Elapsed
col "Req Id" form 99999999
col "Parent" form a10
col "Prg Id" form 9999999
col serial# form 99999999 head Serial#
col qname head "Manager" format a10 trunc
col sid format 9999 head SID
col user_name form A10 head User trunc
set recsep off
select
       q.concurrent_queue_name qname
      ,f.user_name
      ,a.request_id "Req Id"
      ,decode(a.parent_request_id,-1,NULL,a.parent_request_id) "Parent"
      ,a.concurrent_program_id "Prg Id"
      ,a.phase_code,a.status_code
     ,b.os_process_id "OS"
     ,vs.sid
     ,vs.serial# "Serial#"
    ,vp.spid
      ,a.oracle_process_id "spid"
      ,(nvl(a.actual_completion_date,sysdate)-a.actual_start_date)*1440 "Time"
      ,c.concurrent_program_name||' - '||
       c2.user_concurrent_program_name||' '||a.description "Program"
from APPLSYS.fnd_Concurrent_requests a
    ,APPLSYS.fnd_concurrent_processes b
    ,applsys.fnd_concurrent_queues q
    ,APPLSYS.fnd_concurrent_programs_tl c2
    ,APPLSYS.fnd_concurrent_programs c
    ,APPLSYS.fnd_user f
   ,v$session vs
   ,v$process vp
where
      a.controlling_manager = b.concurrent_process_id
  and a.concurrent_program_id = c.concurrent_program_id
  and a.program_application_id = c.application_id
  and c2.concurrent_program_id = c.concurrent_program_id
  and c2.application_id = c.application_id
  and a.phase_code in ('I','P','R','T')
  and a.requested_by = f.user_id
  and b.queue_application_id = q.application_id
  and b.concurrent_queue_id = q.concurrent_queue_id
  and c2.language = 'US'
and vs.process (+) = b.os_process_id
 and vs.paddr = vp.addr (+)
order by 1,3
/
 ========================================================================
Concurrent program history
**************************

set pause off
set pagesize 2000
set linesize 120
set wrap off
column user_concurrent_program_name format a45 noprint
column argument_text format a45 print
column user_name format a15
column start_time format a15
column end_time format a15
column comp_time format 9999.99
select request_id,
       user_concurrent_program_name,
       to_char(actual_start_date,'DD/MON HH24:MI:SS') START_TIME,
       to_char(ACTUAL_COMPLETION_DATE,'DD/MON HH24:MI:SS') END_TIME,
       (actual_completion_date-actual_start_date)*24*60 comp_time, argument_text,user_name, status_code, phase_code
from apps.fnd_concurrent_requests, apps.fnd_concurrent_programs_tl,apps.fnd_user
where fnd_concurrent_requests.concurrent_program_id = fnd_concurrent_programs_tl.concurrent_program_id
and user_concurrent_program_name like '%TSSA%Auto%Service%Contract%Update%Child%'
and fnd_concurrent_programs_tl.language='US'
and requested_by=user_id
order by actual_start_date desc,ACTUAL_COMPLETION_DATE desc;
 ========================================================================
concurrent request with request No
-> give below command to get (SID / SPID / Client PID / Module ) - Just give "concurrent request no"

**************
column traceid format a8
column tracename format a80
column user_concurrent_program_name format a40
column execname format a15
column enable_trace format a12
set lines 80
set pages 22
set head off

SELECT 'Request id: '||request_id ,
'Trace id: '||oracle_Process_id,
'Trace Flag: '||req.enable_trace,
'Trace Name:
'||dest.value||'/'||lower(dbnm.value)||'_ora_'||oracle_process_id||'.trc',
'Prog. Name: '||prog.user_concurrent_program_name,
'File Name: '||execname.execution_file_name|| execname.subroutine_name ,
'Status : '||decode(phase_code,'R','Running')
||'-'||decode(status_code,'R','Normal'),
'SID Serial: '||ses.sid||','|| ses.serial#,
'Module : '||ses.module
from fnd_concurrent_requests req, v$session ses, v$process proc,
v$parameter dest, v$parameter dbnm, fnd_concurrent_programs_vl prog,
fnd_executables execname
where req.request_id = &request
and req.oracle_process_id=proc.spid(+)
and proc.addr = ses.paddr(+)
and dest.name='user_dump_dest'
and dbnm.name='db_name'
and req.concurrent_program_id = prog.concurrent_program_id
and req.program_application_id = prog.application_id
and prog.application_id = execname.application_id
and prog.executable_id=execname.executable_id;

========================================================================
Concurrent manager details
*************************
set echo off
set linesize 130
set serveroutput on size 50000
set feed off
set veri off
DECLARE
running_count NUMBER := 0;
pending_count NUMBER := 0;
crm_pend_count NUMBER := 0;
--get the list of all conc managers and max worker and running workers
CURSOR conc_que IS
SELECT concurrent_queue_id,
concurrent_queue_name,
user_concurrent_queue_name,
max_processes,
running_processes
FROM apps.fnd_concurrent_queues_vl
WHERE enabled_flag='Y' and
concurrent_queue_name not like 'XDP%' and
concurrent_queue_name not like 'IEU%' and
concurrent_queue_name not in ('ARTAXMGR','PASMGR') ;
BEGIN
DBMS_OUTPUT.PUT_LINE('====================================================================================================');
DBMS_OUTPUT.PUT_LINE('QueueID'||' '||'Queue          '||
'Concurrent Queue Name               '||' '||'MAX '||' '||'RUN '||' '||
'Running '||' '||'Pending   '||' '||'In CRM');
DBMS_OUTPUT.PUT_LINE('====================================================================================================');
FOR i IN conc_que
LOOP
--for each manager get the number of pending and running requests in each queue
SELECT /*+ RULE */ nvl(sum(decode(phase_code, 'R', 1, 0)), 0),
nvl(sum(decode(phase_code, 'P', 1, 0)), 0)
INTO running_count, pending_count
FROM fnd_concurrent_worker_requests
WHERE
requested_start_date <= sysdate
and concurrent_queue_id = i.concurrent_queue_id
AND hold_flag != 'Y';
--for each manager get the list of requests pending due to conflicts in each manager
SELECT /*+ RULE */ count(1)
INTO crm_pend_count
FROM apps.fnd_concurrent_worker_requests a
WHERE concurrent_queue_id = 4
AND hold_flag != 'Y'
AND requested_start_date <= sysdate
AND exists (
SELECT 'x'
FROM apps.fnd_concurrent_worker_requests b
WHERE a.request_id=b.request_id
and concurrent_queue_id = i.concurrent_queue_id
AND hold_flag != 'Y'
AND requested_start_date <= sysdate);
--print the output by joining the outputs of manager counts, 
DBMS_OUTPUT.PUT_LINE(
rpad(i.concurrent_queue_id,8,'_')||
rpad(i.concurrent_queue_name,15, ' ')||
rpad(i.user_concurrent_queue_name,40,' ')||
rpad(i.max_processes,6,' ')||
rpad(i.running_processes,6,' ')||
rpad(running_count,10,' ')||
rpad(pending_count,10,' ')||
rpad(crm_pend_count,10,' '));
--DBMS_OUTPUT.PUT_LINE('----------------------------------------------------------------------------------------------------');
END LOOP;
DBMS_OUTPUT.PUT_LINE('====================================================================================================');
END;
/
 ========================================================================
PHASE CODE Meaning:
==================
    C    Completed
    I    Inactive
    P    Pending
    R    Running

STATUS CODE Meaning: 
===================
    A    Waiting  
    B    Resuming  
    C    Normal  
    D    Cancelled 
    E    Error  
    F    Scheduled  
    G    Warning  
    H    On Hold  
    I    Normal  
    M    No Manager  
    Q    Standby  
    R    Normal  
    S    Suspended  
    T    Terminating  
    U    Disabled  
    W    Paused  
    X    Terminated  
    Z    Waiting  
put conc req on HOLD
CREATE TABLE apps.tmp_program_on_hold AS
SELECT
request_id
FROM
apps.fnd_concurrent_requests
WHERE
phase_code = 'P' and
nvl(hold_flag,'N') = 'Y';

update apps.fnd_concurrent_requests
set hold_flag = 'Y'
WHERE
phase_code = 'P' and
request_id not in (SELECT request_id FROM apps.tmp_program_on_hold) ;
commit;
exit

====
update fnd_concurrent_requests
set status_code='X', phase_code='C'
where status_code='T';

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

Inactive sessions
**************

SQL> select count(status) Count, status from v$session group by status;

     COUNT STATUS
---------- --------
        94 ACTIVE
       538 INACTIVE

select  substr(v$session.username,1,10) "DBUSER"
       ,substr(v$session.osuser,1,15)  "OSUSER"
       ,substr(v$session.sid,1,4)      "SID#"
       ,substr(v$session.serial#,1,6)  "SER#"
       ,substr(v$session.process,1,5)  "CLNT_PROCESS"
       ,substr(v$session.module,1,10) "Module"
       ,v$session.status   "STATUS"
       from  v$session,v$process
       where v$session.serial# > 1
and v$session.paddr = v$process.addr
and v$session.status ='INACTIVE' and v$session.username ='APPS';


1 : inactive jdbc session details
--------------

select sid,serial#,status,program,last_call_et from v$session where program like '%JDBC%' and last_call_et > 8 * 3600  and status = 'INACTIVE';


2- Kill the DB Session ( create script to kill sessions)
  
   spool inactive.sh
   select 'alter system kill session '''||a.sid|| ',' ||a.serial#|| ''';'  from v$session a,
    v$process b where a.paddr =b.addr and a.last_call_et > 21600 and status='INACTIVE' ;
    spool off
or

alter system kill session '4976,31'; ->( ' SID,SERIAL#')

========================================================================
 To find the SQL_TEXT being run by a particular session ===
 ***************

    select s.username, s.sid, t.sql_text "Last SQL"
    from gv$session s, gv$sqlarea t
    where s.sql_address =t.address and
    s.sql_hash_value =t.hash_value and
    s.sid = '&sid';
========================================================================
WORKFLOW STATUS
******************

set linesize 120
set pagesize  50
column COMPONENT_NAME format a45
column STARTUP_MODE format a15
column COMPONENT_STATUS format a15
select fsc.COMPONENT_NAME,fsc.STARTUP_MODE,fsc.COMPONENT_STATUS
from APPS.FND_CONCURRENT_QUEUES_VL fcq, fnd_svc_components fsc
where fsc.concurrent_queue_id = fcq.concurrent_queue_id(+)
order by COMPONENT_STATUS , STARTUP_MODE , COMPONENT_NAME;
========================================================================
check middle tiers session
**************************

col umachine format a20 trunc head UserSrvr
col totact format 999999 head ACTIVE
col totinact format 999999 head INACTIVE
col totsess format 999999 head TOTAL
col earliest_logon format a12 head Earliest
col latest_logon format a12 head Latest
break on report
compute sum of totact on report
compute sum of totinact on report
compute sum of totsess on report
select replace(s.machine,'GEIPS-AMER\',null) umachine,
sum(decode(s.status,'ACTIVE',1,0)) totact,
sum(decode(s.status,'INACTIVE',1,0)) totinact,
 count(*) totsess,
min(to_char(s.logon_time,'mm/dd hh24:mi')) earliest_logon,
max(to_char(s.logon_time,'mm/dd hh24:mi')) latest_logon
from v$session s
where s.type = 'USER'
group by s.machine
order by 4,1
/
========================================================================

Blocking session
***************
1:
 column sess format A20
    SELECT substr(DECODE(request,0,'Holder: ','Waiter: ')||sid,1,12) sess,
           id1, id2, lmode, request, type, inst_id
     FROM GV$LOCK
    WHERE (id1, id2, type) IN
       (SELECT id1, id2, type FROM GV$LOCK WHERE request>0)
         ORDER BY id1, request;

2:
select * from gv$lock where (ID1,ID2,TYPE) in (select ID1,ID2,TYPE from gv$lock where
    request>0);

3:
 select distinct holding_session from dba_waiters where holding_session not in (select
    waiting_session from dba_waiters);

objects Locks 
****************
col "O/SUser" FOR a10
col OraUser FOR a20
col Blocking FOR a12
col ObjLocked FOR a15
col sid FOR 99999999
col pid FOR a8
SELECT s.osuser "O/SUser", s.username "OraUser", s.sid "SID",
s.serial# "Serial", s.process "PID", s.status "Status",l.name "ObjLocked",
l.mode_held "Lock Held" FROM V$SESSION s,DBA_DML_LOCKS l,V$PROCESS p
WHERE l.session_id = s.sid AND p.addr = s.paddr;

Just another way to find the locks

SELECT VLO.OS_USER_NAME "OS USERNAME", VLO.ORACLE_USERNAME "DB USER",
VP.SPID "SPID", AO.OWNER "OWNER", AO.OBJECT_NAME "OBJECT LOCKED",AO.OBJECT_TYPE,
DECODE (VLO.LOCKED_MODE,
1, 'NO LOCK',
2, 'ROW SHARE',
3, 'ROW EXCLUSIVE',
4, 'SHARE',
5, 'SHARE ROW EXCL',
6, 'EXCLUSIVE',
NULL
) "MODE OF LOCK",
VS.STATUS "CURRENT STATUS"
FROM V$LOCKED_OBJECT VLO, ALL_OBJECTS AO, V$SESSION VS, V$PROCESS VP
WHERE VLO.OBJECT_ID = AO.OBJECT_ID
AND VS.STATUS <> 'KILLED'
AND VLO.SESSION_ID = VS.SID
AND VS.PADDR = VP.ADDR;


LIBRARY CACHE LOCK
*******************
select /*+ ordered */ w1.sid waiting_session, h1.sid holding_session,
w.kgllktype lock_or_pin,
w.kgllkhdl address,
decode(h.kgllkmod, 0, 'None', 1, 'Null', 2, 'Share', 3, 'Exclusive',
'Unknown') mode_held,
decode(w.kgllkreq, 0, 'None', 1, 'Null', 2, 'Share', 3, 'Exclusive',
'Unknown') mode_requested
from dba_kgllock w, dba_kgllock h, v$session w1, v$session h1 where
(
(
(h.kgllkmod != 0)
and (h.kgllkmod != 1)
and ((h.kgllkreq = 0) or (h.kgllkreq = 1)) )
and
(
(
(w.kgllkmod = 0)
or (w.kgllkmod= 1)
)
and (
(
w.kgllkreq != 0)
and (w.kgllkreq != 1)
)
)
)
and w.kgllktype = h.kgllktype
and w.kgllkhdl = h.kgllkhdl
and w.kgllkuse = w1.saddr
and h.kgllkuse = h1.saddr;

====================================================================
Objects Analyzed
-----------------
select count(*),trunc(last_analyzed) from dba_tables group by trunc(last_analyzed) order by 1;

select count(*),trunc(last_analyzed) from dba_tables where owner in ('SYS','SYSTEM')  group by trunc(last_analyzed) order by 1;

select table_name , last_analyzed from dba_tables where owner like 'GMI';

delete statics
-------------
 analyze table earnings_transaction delete statistics;
====================================================================

Rename datafiles
****************

Moving Datafiles while the Instance is Mounted

SQL> shutdown immediate
SQL> !mv /u05/app/oradata/ORA920/indx01.dbf /u06/app/oradata/ORA920/indx01.dbf
SQL> startup mount
SQL> alter database rename file '/u05/app/oradata/ORA920/indx01.dbf' to '/u06/app/oradata/ORA920/indx01.dbf';

Moving Datafiles while the Instance is Open

% sqlplus "/ as sysdba"
SQL> alter tablespace INDX offline;
SQL> !mv /u05/app/oradata/ORA920/indx01.dbf /u06/app/oradata/ORA920/indx01.dbf
SQL> alter tablespace INDX
  2  rename datafile '/u05/app/oradata/ORA920/indx01.dbf' to '/u06/app/oradata/ORA920/indx01.dbf';
SQL> alter tablespace INDX online;
====================================================================

Backup status on datafiles
***************************
select STATUS,count(FILE#) from v$backup group by status;

select distinct 'alter tablespace '||tablespace_name||' end backup ;'
from dba_data_files
where file_id in
(select FILE# from v$backup where status='ACTIVE');

====================================================================
calculation of huge pages
**************************

let SGA= X

Y= SGA
  -------
   2048*1024

Huge page = y + 3% of y
====================================================================

Datafiles details
************

SQL> select sum(bytes)/1024/1024 from dba_data_files;

 select TABLESPACE_NAME, file_name, (maxbytes-bytes)/(1024*1024), autoextensible, bytes, maxbytes
        from dba_data_files
       where TABLESPACE_NAME = 'APPS_TS_TX_DATA';
       --and (maxbytes-bytes)/(1024*1024) < 100;
====================================================================
Delete Files Older Than x Days on Linux
*******************************

find . -name * -mtime +30 -exec rm -f {} \;

find . -mtime +30 -exec ls -l {} \;|wc -l

find . -name "*.tmp" -mtime +30 -exec ls -l {} \; | wc -l

ex

find . -name "*.trc"  -mtime +30 -exec rm -rf {} \;
====================================================================
enable Diagnostics
------------------
1) system Administrator Responsibility > Profile > System
2) Choose the Profile Option "Hide Diagnostics Menu Entry "
3) Set it to 'No' at Site level
4) Log out of Oracle Applications .
5) Log in again
6) Go to the desired responsibility
7) Navigate to any screen
8) In the 'Help' option , the user will be able to see  'Diagnostics'

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

tkprof
======

tkprof <trace file name> <output file name> explain=apps/apps_pwd sort='(prsela,exeela,fchela)'

EXPLAIN PLAN FOR  << Select stmt..>>  SELECT * FROM TABLE(dbms_xplan.display);

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

Process running on file
=======================
lsof | grep <filename>

process runnin on port
----------------------
netstat -anp | grep -i 12513

root@ohsrcoh10 ~]# netstat -anp | grep -i <Port> ( run   as root will give pid)
root@ohsrcoh10 ~]# ps -aef | grep -i 8343

lsof -i :80

lsof -i TCP|grep <clientpid>


 ====================================================================
 Action Plan to Re-Org Tablespace
***************************
1> Create new tablespace with the size of the tablespace being re-org'ed
2> Shutdown all middle tier processes
3> Migrate all objects from OLD tablespace to NEW tablespace created in step#1
4> Make sure all objects have been migrated to NEW tablespace
5> Recreate or coalesce OLD tablespace
6> Migrate all objects from NEW tablespace back to OLD tablespace
7> Restart Database
8> Restart all Middle Tier processes
9> Perform healthcheck


1.    Create a new tablespace

    SQL:> create tablespace <tablespace_name> datafile <datafile_name> size xxx MB;
2.    Grant resouce access to the new tablespace

    SQL:> alter user <user name> quota unlimited on <new tablespace>;

3.    Move the tables in question to the new tablespace by doing the following:

    SQL:> alter table table_name move TABLESPACE <new_tablespace>;

4.    Move the tables back to the original tablespace

    SQL:> alter table <table_name> move tablespace <original tablespace>;

5.    Re-build indexes (need to provide the index list)
    SQL:> alter INDEX xx rebuild;

6.    Drop the new tablespace

    SQL:> drop tablespace <new tablepace> including contents and datafiles;

7.    Rebudild all the indexes pertaining to these tables.
===============================================================

Fragmented tables
***************
select table_name,num_rows,last_analyzed,chain_cnt
    from all_tables
    where chain_cnt > 0
    order by chain_cnt desc;

chk for chain_cnt>0 tables

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

To find all environment url
*********************

select substr(t.PROFILE_OPTION_ID,0,6) ID,
      substr(z.USER_PROFILE_OPTION_NAME,0,40) User_Profile,
      substr(v.PROFILE_OPTION_VALUE,0,60) Value,
      substr(t.PROFILE_OPTION_NAME,0,30) value
from applsys.fnd_profile_options t,
    applsys.fnd_profile_option_values v,
    applsys.fnd_profile_options_tl z
where (v.PROFILE_OPTION_ID = t.PROFILE_OPTION_ID )
 and (t.PROFILE_OPTION_NAME = z.PROFILE_OPTION_NAME)
 and (v.PROFILE_OPTION_VALUE like '%http:%');
===========================================================
concurrent manager for a particular conc program
------------------------------------------------
select b.user_concurrent_program_name , c.USER_CONCURRENT_QUEUE_NAME 
from
FND_CONCURRENT_QUEUE_CONTENT a ,
fnd_concurrent_programs_vl b,
fnd_concurrent_queues_vl c
where
a.CONCURRENT_QUEUE_ID=c.CONCURRENT_QUEUE_ID and
b.CONCURRENT_PROGRAM_ID=a.type_id
and a.include_flag='I'
and b.USER_CONCURRENT_PROGRAM_NAME like '%Active Responsibilities%'
==============================================================
Enable Trace for Front end user
***************************

Set at user level eg (PREKA or SYSADMIN)

FND: Debug Log Enabled Yes
FND: Debug Log Level   satement
FND: Debug Log Module  %

==============================================================
shmax/shmin parameters
----------------------
cat /proc/sys/kernel/shmax
cat /proc/sys/kernel/shmin

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


redolog info
============
set feedback off
set linesize 120
set pagesize 35
set trim on
set trims on
set lines 120
col group# format 999
col thread# format 999
col member format a70 wrap
col status format a10
col archived format a10

select l.group#, l.thread#,
f.member,
l.archived,
l.status,
(bytes/1024/1024) fsize
from
v$log l, v$logfile f
where f.group# = l.group#
order by 1,2
/
==============================================================
  find out which sql's are generating more redo ##
******************

SELECT to_char(begin_interval_time,'YYYY_MM_DD HH24') WHEN,
dbms_lob.substr(sql_text,4000,1) SQL,
dhss.instance_number INST_ID,
dhss.sql_id,
executions_delta exec_delta,
rows_processed_delta rows_proc_delta
FROM dba_hist_sqlstat dhss,
dba_hist_snapshot dhs,
dba_hist_sqltext dhst
WHERE upper(dhst.sql_text) LIKE '%USR_RACUNI_MV%'
AND ltrim(upper(dhst.sql_text)) NOT LIKE 'SELECT%'
AND dhss.snap_id=dhs.snap_id
AND dhss.instance_number=dhs.instance_number
AND dhss.sql_id=dhst.sql_id
AND begin_interval_time BETWEEN to_date('11-01-28 13:00','YY-MM-DD HH24:MI')
AND to_date('11-01-28 14:00','YY-MM-DD HH24:MI')
;
==============================================================
## Following query will help you to find nummbers of archive generated per day .##

SELECT TO_CHAR(FIRST_TIME,'DD-MON-YYYY HH24'),
COUNT(*)
FROM V$LOGHIST
WHERE TO_CHAR(FIRST_TIME,'DD-MON-YY HH24') > '13-JUL-2008'
GROUP BY TO_CHAR(FIRST_TIME,'DD-MON-YYYY HH24')
ORDER BY TO_CHAR(FIRST_TIME,'DD-MON-YYYY HH24') ASC
OPP

==============================================================
1. Start the queues by logging into SQLPLUS as applsys:

DBMS_AQADM.START_QUEUE(queue_name =>  'FND_CP_GSM_OPP_AQ');
DBMS_AQADM.START_QUEUE(queue_name =>  'AQ$_FND_CP_GSM_OPP_AQTBL_E', enqueue =>FALSE, dequeue
=>  TRUE);

==============================================================
memory parameters
sho parameter sga_max_size            
sho parameter pga_aggregate_target    
sho parameter olap_page_pool_size     
sho parameter sga_target              
sho parameter db_cache_size           
sho parameter shared_pool_size        
sho parameter shared_pool_reserved_size
sho parameter java_pool_size          
sho parameter large_pool_size         
sho parameter streams_pool_size

==============================================================
TEMP tablespace usage with datafiles
=====================================
set pages 1000
set lines 152
col tablespace_name for a20
col file_name for a40

set head off
select ' -- TEMP DETAILS -- ' from dual;
set head on
col file_name for a60
COLUMN DUMMY NOPRINT;
COMPUTE SUM OF MBYTES ON DUMMY;
COMPUTE SUM OF MAXMBYTES ON DUMMY;
BREAK ON DUMMY;
select null DUMMY,tablespace_name,file_name,autoextensible,bytes/1048576 Mbytes, maxbytes/1048576 maxMbytes,status
from dba_Temp_files
where tablespace_name like '%&TBSP%'
order by tablespace_name
/

Temp table space
=================

usage of temp tablespace
-------------------------
set lines 152
col FreeSpaceGB format 999.999
col UsedSpaceGB format 999.999
col TotalSpaceGB format 999.999
col host_name format a30
col tablespace_name format a30
select tablespace_name,
(free_blocks*8)/1024/1024 FreeSpaceGB,
(used_blocks*8)/1024/1024 UsedSpaceGB,
(total_blocks*8)/1024/1024 TotalSpaceGB,
i.instance_name,i.host_name
from gv$sort_segment ss,gv$instance i where ss.tablespace_name in (select tablespace_name from
dba_tablespaces where contents='TEMPORARY') and
i.inst_id=ss.inst_id;

===============================================================
zipping a file
--------------

Zip xxx.log.zip xxx.log; > xxx.log

Ex:

zip bne.log.zip bne.log; > bne.log  ( zipped bne.log and created new 0byte bne.log file)

find files of size xx
--------------------

find /auto_cmd_ctr -size +100000000c -xdev -exec du -sh {} \;
===============================================================

Index status
=============
SQL> SELECT index_name,INDEX_TYPE,TABLE_NAME,TABLE_TYPE,OWNER,status FROM all_indexes WHERE index_name like '%CSC_PROF_CHECK%';

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

Compile JSP's
-------------
11i
perl -x $JTF_TOP/admin/scripts/ojspCompile.pl --compile --quiet


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

for single jsp

ojspCompile.pl --compile -s 'AppsLocalLogin.jsp' --flush

===============================================================
vi command to replace
%s/ohspsnl08/ohspsnl09/g

==============================================================
For reoprt generation
======================
rwcon60 userid=scott/tiger@bs817 batch=yes source=$i  stype=rdffile
dtype=repfile overwrite=yes compile_all=yes

rwcon60 userid=apps/AgwqrSKL source=XAHGR_TRUCKING_SCHEDULES.rdf stype=rdffile dtype=rdffile
dest=XAHGR_TRUCKING_SCHEDULES.rdf overwrite=yes batch=yes compile_all=yes 


Convert from .rdf to rex
========================
rwconverter batch=yes apps/C0xKA2kh stype=rdffile source=ADDRESS_PROOF.rdf  dtype=REXFILE dest=ADDRESS_PROOF.rex

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

Rebuild inventory
===============
./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/tsivai/oracle/product/111" ORACLE_HOME_NAME="Db11g_Home"

+  $ORACLE_HOME/OPatch/opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc

for conflict report
------------------
$ORACLE_HOME/OPatch/opatch apply -report -invPtrLoc $ORACLE_HOME/oraInst.loc

========================================================
Manually issue the adrelink command to relink one executable.

i.e - adrelink.sh force=y ranlib=y "FND FNDFS"
adrelink.sh force=y "ad adadmin"

To relink all AD executables:
'adrelink.sh force=y "ad all"'

****
opatch nrollback -ph 10031947 -id 8447875,9679852

===============================================================
Validate user/password
*********************

select FND_WEB_SEC.VALIDATE_LOGIN('GUEST','ORACLE') from dual;
select fnd_message.get from dual;

Ex:
SQL> select FND_WEB_SEC.VALIDATE_LOGIN('SYSADMIN','ubRD54x2')  from dual;

FND_WEB_SEC.VALIDATE_LOGIN('SYSADMIN','UBRD54X2')
--------------------------------------------------------------------------------
N
SQL> select fnd_message.get from dual;

GET
--------------------------------------------------------------------------------
PASSWORD_INVALID
===============================================================
Product information
--------------------

 1  select a.APPLICATION_ID,a.APPLICATION_SHORT_NAME,a.application_name, decode(b.status,'I','Installed','S','Shared','N/A') STATUS,
  2  PATCH_LEVEL  from APPS.fnd_application_vl a, APPS.fnd_product_installations b
  3* where a.application_id = b.application_id  order by 2,1
 ===============================================================

Query hidden parameters
========================
SELECT a.ksppinm “Parameter”,
       b.ksppstvl “Session Value”,
       c.ksppstvl “Instance Value”
FROM   x$ksppi a,
       x$ksppcv b,
       x$ksppsv c
WHERE  a.indx = b.indx
AND    a.indx = c.indx
AND    a.ksppinm LIKE ‘/_%’ escape ‘/’
/  

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

Partition name on a table
********************
SELECT TABLE_OWNER,TABLE_NAME,PARTITION_NAME FROM ALL_TAB_PARTITIONS WHERE TABLE_NAME='WF_LOCAL_USER_ROLES';

 ===============================================================
Cron job  format (cronjob) (crontab)
 ************************************
 Field Description Allowed Value
 MIN Minute field 0 to 59      
 HOUR Hour field 0 to 23
 DOM Day of Month 1-31          or * indicates every day of the month
 MON Month field 1-12
 DOW Day Of Week 0-6            or  1,3 means ( mon,wed)  or 1-3  means mon,tue,wed)

 @reboot = run at boot and reboot only
 @yearly = run at midnight Jan 1 (0 0 1 1 *)
 @annually = run at midnight Jan 1(0 0 1 1 *)
 @monthly = run at midnight on the first day of every month (0 0 1 * *)
 @weekly = run at midnight every Sunday (0 0 * * 0)
 @daily = run at midnight every day (0 0 * * *)
 @midnight = run at midnight (0 0 * * *)
 @hourly = run on the first second of every hour (0 * * * *)

# Minute   Hour   Day of Month       Month          Day of Week        Command   
# (0-59)  (0-23)     (1-31)    (1-12 or Jan-Dec)  (0-6 or Sun-Sat)               
    0        2          12             *               0,6           /usr/bin/find

===============================================================
Find Front end active users
============================
select user_name,to_char(last_logon_date,'DD-MON-YYYY HH24:MI:SS')
from apps.fnd_user
where to_char(last_logon_date,'DD-MON-YYYY')=to_char(sysdate,'DD-MON-YYYY');

============================================================
to change listner logfile
Action Plan
============

$> lsnrctl

LSNRCTL> set current_listener PFNA2I
LSNRCTL> SET LOG_FILE new.log
LSNRCTL> SAVE_CONFIG listener_name
LSNRCTL> exit

2)$mv /pfna2i/oracle/product/102/network/admin/pfna2i.log
/pfna2i/oracle/product/102/network/admin/pfna2i_bkp.log


LSNRCTL> SET LOG_FILE /pfna2i/oracle/product/102/network/admin/pfna2i.log
LSNRCTL> SAVE_CONFIG PFNA2I
LSNRCTL> exit

=============================================================
To copy responsibility for a user ex sysadmin
************************


To download

FNDLOAD apps/Tr1ology 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct abc.ldt FND_USER USER_NAME='xxxx'

to upload these responsibilities to other user(yyyy) open the above ldt(abc.ldt)  and replace the the username xxxx by yyyy
=============================================================

Responsibilities for a user
*******************

COL USER_NAME FOR A17
COL RESPONSIBILITY_NAME FOR A30
COL END_DATE FOR A20

select a.USER_NAME,  b.RESPONSIBILITY_ID, c.RESPONSIBILITY_NAME, b.END_DATE
from apps.FND_USER a, apps.FND_USER_RESP_GROUPS b, apps.FND_RESPONSIBILITY_VL c
where a.USER_ID=b.USER_ID and b.RESPONSIBILITY_ID=c.RESPONSIBILITY_ID
and user_name = UPPER('&user_name');

===================================================================
submit concurrent program backend
**********************************

Syntax: CONCSUB <ORACLE ID> <Responsibility Application Short Name> <Responsibility Name> <User Name> [WAIT=<Wait Flag] CONCURRENT  <Concurrent Program Application Short Name> <Concurrent Program Name> [START=<Requested Start Date>] [REPEAT_DAYS=<Repeat Interval>] [REPEAT_END=<Request Resubmission End Date>] <Concurrent Program Arguments ...>

Example: CONCSUB SCOTT/TIGER SYSADMIN 'System Administrator' SYSADMIN WAIT=Y CONCURRENT FND FNDMNRMT START='"01-JAN-2000 23:00:00"' REPEAT_DAYS=1 REPEAT_END='"01-JAN-2001 23:59:00"' Y 0 0

Example
========
+ ran below concurrent programs from backend

 Sync responsibility role data into the WF table.

 Workflow Directory Services User/Role Validation

CONCSUB APPS/*** SYSADMIN 'System Administrator' SYSADMIN WAIT=Y CONCURRENT FND AFFURGO2 START='"24-FEB-2012 01:00:00"' REPEAT_DAYS=1 REPEAT_END='"24-FEB-2012 23:59:00"' Y 0 0

CONCSUB APPS/*** SYSADMIN 'System Administrator' SYSADMIN WAIT=Y CONCURRENT FND FNDWFDSURV START='"24-FEB-2012 01:00:00"' REPEAT_DAYS=1 REPEAT_END='"24-FEB-2012 23:59:00"' Y 0 0

***


Submit concurrent request from backend
======================================


for ex :  Workflow Directory Services User/Role Validation


SET SERVEROUTPUT ON;
EXEC DBMS_OUTPUT.ENABLE(1000000);
DECLARE
   x_conc_id                     NUMBER;
   l_user_id                     NUMBER;
   l_appl_id                     NUMBER;
   l_resp_id                     NUMBER;
   l_phase_code                  VARCHAR2(10);
BEGIN
   SELECT user_id, responsibility_id, responsibility_application_id
     INTO l_user_id, l_resp_id, l_appl_id
     FROM fnd_user_resp_groups
    WHERE user_id = (SELECT user_id
                       FROM fnd_user
                      WHERE user_name = 'SYSADMIN')
      AND responsibility_id =
                         (SELECT responsibility_id
                            FROM fnd_responsibility_vl
                           WHERE responsibility_name = 'System Administrator');

   fnd_global.apps_initialize (l_user_id, l_resp_id, l_appl_id);
  
   /* Submit active user */
  
   x_conc_id :=
      fnd_request.submit_request (application                   => 'FND'
                                , program                       => 'FNDWFDSURV'
                                , description                   => NULL
                                , start_time                    => SYSDATE
                                , sub_request                   => FALSE
                                , argument1   => 10000
                                , argument2   => 'Y'
                                , argument3   => 'Y'
                                , argument4   => 'Y'
                                 );

   COMMIT;

   select phase_code
   into   l_phase_code
   from   fnd_amp_requests_v
   where  request_id = x_conc_id;
  
    WHILE (l_phase_code = 'R' or l_phase_code = 'P' )
      LOOP
     
      dbms_output.put_line('Request is running ..............');
     
      select phase_code
      into   l_phase_code
      from   fnd_amp_requests_v
      where  request_id = x_conc_id;
     
       dbms_lock.sleep(5.00);
     
      END LOOP;
     
   dbms_output.put_line('Request completed successfully ..............');
  
   EXCEPTION
      WHEN OTHERS
      THEN
         DBMS_OUTPUT.put_line (   'Concurrent requests not submitted successfully : '
                               || SQLERRM
                              );
   END;
/

How To Run The Workflow Directory Services Concurrent Program From The SQLplus Prompt (Doc ID 1213304.1)

===================================================================
identify PSU (patchset) version
===============================
col ACTION for a12
col VERSION for a10
col ID for 99999999
col COMMENTS for a25
col BUNDLE_SERIES for a8 heading 'BUNDLE|SERIES'

select ACTION,VERSION,ID,COMMENTS,BUNDLE_SERIES
   from  registry$history
where BUNDLE_SERIES like '%PSU%';

==================================================================
Clear FND_NODES
***************
SQL>  EXEC FND_CONC_CLONE.SETUP_CLEAN;
      commit;

Node details
============
 Set pagesize 100
set linesize 250
Col Node_name for a15
col Node_name2 for a15
col CONCURRENT_QUEUE_NAME for a40
Col VIRTUAL_IP for a18
col application_short_name format a11 heading 'Application|Short Name'
select
     NODE_NAME,
     decode(STATUS,'Y','ACTIVE','INACTIVE') Status,
     decode(SUPPORT_CP,'Y', 'ConcMgr','No') ConcMgr,
     decode(SUPPORT_FORMS,'Y','Forms', 'No') Forms,
     decode(SUPPORT_WEB,'Y','Web', 'No') WebServer,
     decode(SUPPORT_ADMIN, 'Y','Admin', 'No') Admin,
     decode(SUPPORT_DB, 'Y','Rdbms', 'No') Database,
     VIRTUAL_IP
   from APPS.fnd_nodes
   where node_name != 'AUTHENTICATION'
 order by 1,2
/

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

Conc Manager details
****************
select CONCURRENT_QUEUE_NAME,NODE_NAME, NODE_NAME2, application_short_name
   from apps.fnd_concurrent_queues_vl t1,
         apps.fnd_application t2
where ENABLED_FLAG='Y'
      and t1.application_id = t2.application_id
 order by 1,2
/

Application user sessions
*********************
(Doc ID 295206.1)

select  b.SID, b.SERIAL#,B.STATUS,d.USER_NAME from apps.fnd_logins a,
v$session b, v$process c, apps.fnd_user d
where b.paddr = c.addr
and a.pid=c.pid
and a.spid  = b.process
and d.user_id = a.user_id
and d.user_name = 'AMARTIN';
 =================================================================
Tablespace Usage with datafiles
************************
set echo off
set lines 152
set pages 1000
col tablespace_name for a20
col file_name for a60
COLUMN DUMMY NOPRINT;
COMPUTE SUM OF MBYTES ON DUMMY;
COMPUTE SUM OF MAXMBYTES ON DUMMY;
BREAK ON DUMMY;
select null DUMMY, tablespace_name,file_name,file_id,autoextensible,bytes/1048576 Mbytes, maxbytes/1048576 maxMbytes
from dba_data_files
where tablespace_name like '%&TBSP%'
order by tablespace_name,file_name
/
==============================================================

SMTP testing from nodelevel

$ telnet ohschmr01 25
Trying 140.85.183.107...
Connected to ohschmr01.
Escape character is '^]'.
220-ohschmr01.oracleoutsourcing.com ESMTP ready at Wed, 10 Oct 2012 02:09:02 -0500
220 Oracle Corporation - Unauthorized usage or access is prohibited
?   
500 5.5.1 Command unrecognized: "?"
HELP
214-2.0.0 This is sendmail version 8.13.1
214-2.0.0 Topics:
214-2.0.0       HELO    EHLO    MAIL    RCPT    DATA
214-2.0.0       RSET    NOOP    QUIT    HELP    VRFY
214-2.0.0       EXPN    VERB    ETRN    DSN     AUTH
214-2.0.0       STARTTLS
214-2.0.0 For more info use "HELP <topic>".
214-2.0.0 To report bugs in the implementation send email to
214-2.0.0       sendmail-bugs@sendmail.org.
214-2.0.0 For local information send email to Postmaster at your site.
214 2.0.0 End of HELP info
HELO ohschmr01
250 ohschmr01.oracleoutsourcing.com Hello ohschmr01.oracleoutsourcing.com [140.85.183.107], pleased to meet you
MAIL
501 5.5.2 Syntax error in parameters scanning ""
Mail From
501 5.5.2 Syntax error in parameters scanning "From"
Mail From :  wftchmri@atoracle.com
250 2.1.0 wftchmri@atoracle.com... Sender ok
RCPT to:abc.x.bbc@ORCL.com
250 2.1.5 abc.x.bbc@ORCL.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
Hi hello h r u
.
250 2.0.0 q9A792Jr003660 Message accepted for delivery
quit
221 2.0.0 ohschmr01.oracleoutsourcing.com closing connection
Connection closed by foreign host.

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


change sysadmin user password

FNDCPASS apps/V5bLD5lc 0 Y system/W4bMC3ob USER SYSADMIN A24d2412


==============================================================
Remove the 3rd line:
****************

sed '3d' fileName.txt

Remove the interval between lines 7 and 9:

sed '7,9d' filename.txt

===================================================================
datainstaller

$AFJVAPRG oracle.apps.per.DataInstall apps  #APPSPWD#  thin #CUST_DB_SERVER#:#INSTANCE_DB_PORT#:#UPPER_SID# (Note:140511.1)

===================================================================
PID details

/proc/<pid>/fd
Eg: /proc/28935/fd
===========================================================

rman backup status


 This script will report on all backups – full, incremental and archivelog backups -

 col STATUS format a9
 col hrs format 999.99
 select
 SESSION_KEY, INPUT_TYPE, STATUS,
 to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
 to_char(END_TIME,'mm/dd/yy hh24:mi')   end_time,
 elapsed_seconds/3600                   hrs
 from V$RMAN_BACKUP_JOB_DETAILS
 order by session_key;

 This script will report all on full and incremental backups, not archivelog backups -

 col STATUS format a9
 col hrs format 999.99
 select
 SESSION_KEY, INPUT_TYPE, STATUS,
 to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
 to_char(END_TIME,'mm/dd/yy hh24:mi')   end_time,
 elapsed_seconds/3600                   hrs
 from V$RMAN_BACKUP_JOB_DETAILS
 where input_type='DB INCR'
 order by session_key;
=================================================================


++++ Logo +++

Note 174219.1 - How To Change The Logo In The Oracle Application Menu
Note 849752.1 - R12 Login Page: How to Personalize the Logo ?
Note 741459.1 - Tips For Personalizing The E-Business Suite r12 Login Page (MainLoginPG)
Note 602995.1 - How To Change The Standard Oracle Logo in R12 Forms
Note 551795.1 - How to change the default branding on the homepage which shown as "E-Business Suite" ?
Note 421636.1 - How to replace the default Oracle Logo with a Customized Logo?

==============================================================
change AUTHENTICATION  to SECURE OR OFF
To login to forms directly

java oracle.apps.fnd.security.AdminAppServer apps/<apps_pwd> AUTHENTICATION OFF DBC=$FND_SECURE/<TWO_TASK>.dbc
==============================================================
Compile flexfield manually

fdfcmp <oracleid>/<password> 0 Y D <ApplShortName> <DescFlexName> ?

fdfcmp apps/H4aLG5cb 0 Y D 'CHV' '$SRS$.CHVPRSCH'

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

adop phase=<prepare, apply> abandon=no restart=yes workers=4 wait_on_failed_job=yes  -> restarts from where it stopped  and wait if fails
 adop phase=<prepare, apply> abandon=yes restart=yes workers=4 wait_on_failed_job=yes  -> restarts from scratch  and wait if fails
 adop phase=<prepare, apply> abandon=yes restart=yes workers=4 autoskip=yes  -> restarts from scratch  and skips the errors and record in autoskip.log

=================================================================
decrypt weblogic password

1. Create a script decrypt_password.py in $DOMAIN_HOME/security directory and paste the following code into it:

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

from weblogic.security.internal import *
from weblogic.security.internal.encryption import *
encryptionService = SerializedSystemIni.getEncryptionService(".")
clearOrEncryptService = ClearOrEncryptedService(encryptionService)

# Take encrypt password from user
pwd = raw_input("Paste encrypted password ({AES}fk9EK...): ")

# Delete unnecessary escape characters
preppwd = pwd.replace("\\", "")

# Display password
print "Decrypted string is: " + clearOrEncryptService.decrypt(preppwd)


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

2. Set domain environment variables

source $DOMAIN_HOME/bin/setDomainEnv.sh
3. Get encrypted password, in this example from boot.properties file of AdminServer

4. Navigate to $DOMAIN_HOME/security directory and run the following command to start decryption:

cd $DOMAIN_HOME/security

java weblogic.WLST decrypt_password.py


Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Please enter encrypted password (Eg. {AES}fk9EK...): {AES}jkIkkdh693dsyLt+DrKUfNcXryuHKLJD76*SXnPqnl5oo\=
Decrypted string is: welcome01
 

example:


[apdmsa1c@vmohsmsan004 <RUN> ]$ pwd
/dmsa1c/applmgr/fs1/FMW_Home/user_projects/domains/EBS_domain_dmsa1c
[apdmsa1c@vmohsmsan004 <RUN> ]$ cd security/
[apdmsa1c@vmohsmsan004 <RUN> ]$ vi decrypt_password.py
[apdmsa1c@vmohsmsan004 <RUN> ]$ java weblogic.WLST decrypt_password.py

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Paste encrypted password ({AES}fk9EK...): {AES}nRwZgIecHhpFdol/YtnExJNbySzalAI+Zm+Hg3maeR8=
Decrypted string is: Bfv2rtQs
[apdmsa1c@vmohsmsan004 <RUN> ]$


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

ad_adop_sessions
                       'N' - 'NOT STARTED',
                       'R' - 'RUNNING',
                       'F' - 'FAILED',
                       'C' - 'COMPLETED',
                       'P' - 'ACTIVE',
                       'Y' - 'COMPLETED',
                       'X' - 'NOT APPLICABLE',
                       '0' - 'FORCE_SHUTDOWN_BEGIN',
                       '1' - 'FORCE_SHUTDOWN_COMPLETED_DB_CUTOVER_BEGIN',
                       '3' - 'DB_CUTOVER_COMPLETED_FLIP_SNAPSHOTS_BEGIN',
                       'D' - 'FLIP_SNAPSHOTS_COMPLETED_FS_CUTOVER_BEGIN',
                       '4' - 'FS_CUTOVER_COMPLETED_ADMIN_STARTUP_BEGIN',
                       '5' - 'ADMIN_STARTUP_COMPLETED_FORCE_STARTUP_BEGIN',
                       '6' - 'FORCE_STARTUP_COMPLETED'
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++

fnd_oam_context_files entries for patch fs
===========================================

SELECT  extractValue(XMLType(TEXT),'//host[@oa_var="s_hostname"]'),
extractValue(XMLType(TEXT),'//oacore_server_ports'),
extractValue(XMLType(TEXT),'//forms_server_ports'),
extractValue(XMLType(TEXT),'//oafm_server_ports'),
extractValue(XMLType(TEXT),'//forms-c4ws_server_ports'),
extractValue(XMLType(TEXT),'//oaea_server_ports')
from fnd_oam_context_files
where name not in ('TEMPLATE','METADATA')
and (status is null or status !='H')
and EXTRACTVALUE(XMLType(TEXT),'//file_edition_type')='patch'
and CTX_TYPE = 'A';

fnd_oam_context_files entries for run  fs
===========================================
SELECT  extractValue(XMLType(TEXT),'//host[@oa_var="s_hostname"]'),
extractValue(XMLType(TEXT),'//oacore_server_ports'),
extractValue(XMLType(TEXT),'//forms_server_ports'),
extractValue(XMLType(TEXT),'//oafm_server_ports'),
extractValue(XMLType(TEXT),'//forms-c4ws_server_ports'),
extractValue(XMLType(TEXT),'//oaea_server_ports')
from fnd_oam_context_files
where name not in ('TEMPLATE','METADATA')
and (status is null or status !='H')
and EXTRACTVALUE(XMLType(TEXT),'//file_edition_type')='run'
and CTX_TYPE = 'A';

===================================================================
 load context entries to database (12.2)
This command is executed on the RUN file system to upload the PATCH context file:
$ADJVAPRG oracle.apps.ad.autoconfig.oam.CtxSynchronizer \
action=upload contextfile=<full path to patch context file> \
logfile=/tmp/patchctxupload.log

===================================================================
MWA
****

start mwa server

cd  SCRIPT_TOP or $MWA_TOP/bin

mwactl.sh start 30002 &
mwactl.sh start_dispatcher &

===============================================================
Product details
================
select decode(nvl(a.APPLICATION_short_name,'Not Found'),
          'SQLAP','AP','SQLGL','GL','OFA','FA',
          'Not Found','id '||to_char(fpi.application_id),
          a.APPLICATION_short_name) apps,
          decode(nvl(o.ORACLE_username,'Not Found'),
                 'Not Found','id '||to_char(fpi.oracle_id),
                 o.ORACLE_username) ORACLE_username,
          decode(fpi.db_status,'I','Installed','L','Custom','N','Not Installed',
          'S','Shared',fpi.db_status) "DB Status",
          fpi.install_group_num,
          fpi.sizing_factor,
          fpi.tablespace, fpi.index_tablespace
  from apps.fnd_oracle_userid o, apps.fnd_application a, apps.fnd_product_installations fpi
  where fpi.application_id = a.application_id(+)
    and fpi.oracle_id = o.oracle_id(+)
  order by 1,2
  /
 
Product  Schema                    DB Status     Inst Grp  Size% Main TS              Index TS                         
-------- ------------------------- ------------- -------- ------ -------------------- --------------------             
ABM      ABM                       Installed            0    100 ABMD                 ABMX   

================================================================
##################################################
Used/Free % Tablespace
#################################################

undefine tbsp
set lines 152
set echo off

col tablespace_name for a20
select     utbs.tablespace_name,
    round(utbs.mb) "Allocated Used/Unused MB",
    round(Ftbs.mb) "Allocated_Free MB",
    round((100/utbs.mb)*Ftbs.mb) "%Allocated_Free MB",   
    decode(sign(round(utbs.Maxmb-utbs.mb)),-1,0,round(utbs.Maxmb-utbs.mb)) "Space_AutoExtensible MB",
    Ftbs.MaxBytes "MaxChunk MB"
from
(select ddf.tablespace_name,sum(ddf.bytes)/1048576 MB,sum(ddf.maxbytes)/1048576 MaxMB
from dba_data_files ddf
group by ddf.tablespace_name) Utbs,
(select dfs.tablespace_name,sum(dfs.bytes)/1048576 MB,max(dfs.bytes)/1048576 MaxBytes
from dba_free_space dfs
group by dfs.tablespace_name) Ftbs
where utbs.tablespace_name=ftbs.tablespace_name
and utbs.tablespace_name like '%&&TBSP%'
order by round(Ftbs.mb)
/

set echo off
set lines 152
set pages 1000
col tablespace_name for a20
col file_name for a60
COLUMN DUMMY NOPRINT;
COMPUTE SUM OF MBYTES ON DUMMY;
COMPUTE SUM OF MAXMBYTES ON DUMMY;
BREAK ON DUMMY;
select null DUMMY, tablespace_name,file_name,file_id,autoextensible,bytes/1048576 Mbytes, maxbytes/1048576 maxMbytes
from dba_data_files
where tablespace_name like '%&TBSP%'
order by tablespace_name,file_name
/

--------------------------------------------------------
Tablespace & Datafile Size Information
--------------------------------------------------------
set lines 152
col tablespace_name for a20
col file_name for a50

select tablespace_name,file_name,autoextensible,bytes/1048576 Mbytes, maxbytes/1048576 maxMbytes
from dba_data_files
where tablespace_name like '%&TBSP%'
order by tablespace_name
/

select file_id,sum(bytes)/1048576 Free_Mbytes
from dba_free_space
where tablespace_name like '%&TBSP%'
group by file_id
order by Free_mbytes desc
/