Wednesday, April 15, 2020

[ERROR]: The value of s_patch_service_name is not set correctly in atleast one of the context files.



[ERROR]: The value of s_patch_service_name is not set correctly in atleast one of the context files.





I got the issue below while running prepare phase. I was able to fix the issue with the solution below and thus i am sharing it here.

Cause :

Query the below parameter in db context file.

grep  s_patch_service entry $CONTEXT_FILE

(This is was not present in my context file, thus the error was tripping)

Soultion :


1. Ensure that the below parameters in the database context file are set to: $ORACLE_HOME/appsutil/jre

"s_jretop , s_jdktop

Parameter "ADJVAPRG" needs to be set to $ORACLE_HOME/appsutil/jre/bin/java</ADJVAPRG>

2. Execute admkappstil.pl on the apps node.

3. Copy the generated appsutil.zip to db node and unzip.

4. Execute autoconfig on the database tier.

5. Ensure s_patch_service entry exists in the db context file. 

6. Re-test adop prepare phase.

7. Migrate the solution as appropriate to other environments.

How to replace appsutil dir with admkappsutil.pl




1.set the path:
UNIX:
     . ./<APPL_TOP>/APPS<CONTEXT_NAME>.env

perl <AD_TOP>/bin/admkappsutil.pl
     This will create appsutil.zip in <INST_TOP>/admin/out


2. On the Database Tier (as the ORACLE user):


. Copy or FTP the appsutil.zip file to the <RDBMS ORACLE_HOME>
with root transfer it , otherwise there would be error.

-------------------------------------
WARNING: [CVM Error Report]
The following report lists errors encountered during CVM Phase
      <filename>  <return code where appropriate>
  /u02/orauat/12.1.0/appsutil/bin/txkSetUnicodeCharSet.pl  1

 No. of scripts failed in CVM phase: 1



AutoConfig is exiting with status 1

AutoConfig execution completed on Wed Apr 15 23:17:28 2020

Time taken for AutoConfig execution to complete : 0 mins  20 secs


login as appluat
cd AD_TOP/bin/
perl admkappsutil.pl 

as root user:
cd INST_TOP>/admin/out

make backup of old appsutil.zip and appsutil dir:

mv appsutil.zip appsutil.zip_bkp
mv appsutil appsutil_bkp


cp -Rv appsutil.zip /u02/orauat/12.1.0/
chown -R orauat:dba appsutil/
chmod -R 775 appsutil/

copy below items from old appsutil to new one:
cp jre ../appsutil

then run autoconfig from db tier:




To BottomTo Bottom

In this Document
Goal
Solution
References


APPLIES TO:

Oracle Applications Manager - Version 11.5.10.2 to 11.5.10.2 [Release 11.5.10]
Oracle E-Business Suite Technology Stack - Version 11.5.10.2 to 11.5.10.2 [Release 11.5.10]
Information in this document applies to any platform.

GOAL

Trying to perform post-installation step "Update the RDBMS ORACLE_HOME file system with the AutoConfig files" from the Readme of any AutoConfig/TXK Patch, e.g Patch:5985992.
The document says to:

On the Database Tier (as the ORACLE user):

Run AutoConfig by executing:
  <RDBMS_ORACLE_HOME>/appsutil/scripts/<CONTEXT_NAME>/
   adautocfg.sh (On Windows use adautocfg.cmd).


After unzipping the appsutil.zip file, the directory '<RDBMS_ORACLE_HOME>/appsutil/scripts/' does not exist.

How to run AutoConfig?

SOLUTION

If you are using an E-Business Suite release prior to 11.5.10 on a Unix platform and do not find
adautocfg.sh at the location specified(<RDBMS_ORACLE_HOME>/appsutil/scripts/<CONTEXT_NAME>/), then run adconfig.sh from <RDBMS ORACLE_HOME>/appsutil/bin.
Customers running on Windows should run adconfig.cmd to generate adautocfg.cmd.

where: $ORACLE_HOME is 9.2.0 or 10.2.0 home directory.

The directory ''<RDBMS_ORACLE_HOME>/appsutil/scripts/<CONTEXT_NAME>/", including adautocfg.sh script,  will be created after executing AutoConfig with adconfig.sh(Win: adconfig.cmd ) on the Database Tier.


1. Copy xml Context file from old 'appsutil' directory to newly created 'appsutil' directory(created by 'unzip -o appsutil.zip'.
2. Setup database environment from $ORACLE_HOME/SID_hostname.env file.
3. Execute AutoConfig as follows:

cd $ORACLE_HOME/appsutil/bin
execute adconfig.sh



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


   . Uncompress appsutil.zip under the <RDBMS ORACLE_HOME>

     cd <ORACLE_HOME>
     unzip -o appsutil.zip

   . Run AutoConfig on the <RDBMS ORACLE_HOME>



Tuesday, April 14, 2020

adop option cleanup hung forever:






Error:

ORA-04020: deadlock detected while trying to lock object SYS.DBMS_SYS_SQL SQL: begin sys.ad_grants.cleanup; end;


Solution:
Connect to SQL*PLUS as APPS
 SQL>select count(1)
  from dba_tab_privs
  where table_name='DBMS_SYS_SQL'
  and privilege='EXECUTE'
  and grantee='APPS'
If retun row.
Run the following command: "exec sys.ad_grants.cleanup;"

 SQL>select count(1)
  from dba_tab_privs
  where table_name='DBMS_SYS_SQL'
  and privilege='EXECUTE'
  and grantee='APPS'

verify 0 rows are returned

Doc id: Adop Cleanup Issue: "[ERROR] [CLEANUP] ORA-04020: deadlock detected " (Doc ID 2424333.1)


Query to find out trace file created for the particular request:






prompt
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_v1 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;

Find OPP Log File Using Concurrent Request ID:
Select
fcpp.concurrent_request_id req_id,
fcp.node_name,
fcp.logfile_name
FROM
fnd_conc_pp_actions fcpp,
fnd_concurrent_processes fcp
where
fcpp.processor_id = fcp.concurrent_process_id
AND
fcpp.action_type = 6
AND
fcpp.concurrent_request_id ='&1';

Deploy custom JAR file




 Deploy custom JAR file


There are two ways to deploy custom JAR file:

Deploying on Custom path:

Steps:
1. Place JAR file at  custom location "/u01/app/mahi/XX_TEST/"
2. Open “orion-application.xml” file present at path –
$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/
3. Edit “orion-application.xml” file to add JAR file path

i.e. –
<library path="/u01/app/mahi/XX_TEST/jxl.jar" />
4. Bounce Apache Server

Deploying with Standard libraries.

1. Place jxl.jar into

    $OA_HTML/WEB-INF/lib/
2. Bounce Apache Server


https://moreappsdba.blogspot.com/2019/04/concurrent-manager-in-details.html


fnd_conc_clone.setup_clean and cmclean.sql




 fnd_conc_clone.setup_clean and cmclean.sql


fnd_conc_clone.setup_clean:
fnd_conc_clone  ===> is package
setup_clean ====> it is procedure name
When we run fnd_conc_clone.setup_clean it deletes the information from the below tables.
fnd_conc_clone.setup_clean to cleanup fnd_nodes table in the target to clear source node information as part of cloning.
Delete from fnd_concurrent_queue_size
Delete from fnd_concurrent_queues_tl
Delete from fnd_concurrent_queuesDelete from fnd_nodes;

syntax to execute:
Connect as apps user:
SQL> exec fnd_conc_clone.setup_clean;
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
Post  run the autoconfig on DB tier and middle tier this will register the nodes in fnd_nodes tables.

cmclean.sql
Scenario when to run:
To cleanup running and pending requests we use cmclean.sql, If we stop concurrent managers using abort options then concurrent requests will be in running state ,Next when we start concurrent manager the processes will not start properly.

Clean out the concurrent manager tables by re-setting values to ZERO.

If cmclean.sql is run when the concurrent managers are up and running ,the script will not be able to clean and remove the rows from the concurrent manager process and request tables as the ICM and other managers will be holding locks on these tables.So its better to shutdown the concurrent manager cleanly and then run the cmclean.sql

CMCLEAN will update below tables:
1) FND_CONCURRENT_QUEUES
2) FND_CONCURRENT_PROCESSES
3) FND_CONCURRENT_REQUESTS
4) FND_CONFLICTS_DOMAIN
5) FND_CONCURRENT_CONFLICT_SETS
Doc Id: [ID 134007.1]

script to check object lock




 script to check object lock


SET ECHO        OFF
SET FEEDBACK    6
SET HEADING     ON
SET LINESIZE    256
SET PAGESIZE    50000
SET TERMOUT     ON
SET TIMING      OFF
SET TRIMOUT     ON
SET TRIMSPOOL   ON
SET VERIFY      OFF

CLEAR COLUMNS
CLEAR BREAKS
CLEAR COMPUTES

COLUMN instance_name                FORMAT a9           HEADING 'Instance'
COLUMN sid                          FORMAT 999999       HEADING 'SID'
COLUMN sid_serial                   FORMAT a15          HEADING 'SID / Serial#'
COLUMN session_status               FORMAT a9           HEADING 'Status'
COLUMN locking_oracle_user          FORMAT a20          HEADING 'Locking Oracle User'
COLUMN object_owner                 FORMAT a15          HEADING 'Object Owner'
COLUMN object_name                  FORMAT a25          HEADING 'Object Name'
COLUMN object_type                  FORMAT a15          HEADING 'Object Type'
COLUMN locked_mode                                      HEADING 'Locked Mode'

CLEAR BREAKS

PROMPT
PROMPT
PROMPT +------------------------------------------------------------------------+
PROMPT | LOCKED OBJECTS                                                         |
PROMPT +------------------------------------------------------------------------+

SELECT
    i.instance_name                       instance_name
  , l.session_id || ' / ' || s.serial#    sid_serial
  , s.status                              session_status
  , l.oracle_username                     locking_oracle_user
  , o.owner                               object_owner
  , o.object_name                         object_name
  , o.object_type                         object_type
  , DECODE (   l.locked_mode
             , 0, 'None'                        /* Mon Lock equivalent */
             , 1, 'NoLock'                      /* N */
             , 2, 'Row-Share (SS)'              /* L */
             , 3, 'Row-Exclusive (SX)'          /* R */
             , 4, 'Share-Table'                 /* S */
             , 5, 'Share-Row-Exclusive (SSX)'   /* C */
             , 6, 'Exclusive'                   /* X */
             ,    '[Nothing]'
           )                  locked_mode
FROM
    dba_objects       o
  , gv$session        s
  , gv$locked_object  l
  , gv$instance       i
WHERE
      i.inst_id     = l.inst_id
  AND s.inst_id     = l.inst_id
  AND s.sid         = l.session_id
  AND o.object_id   = l.object_id
ORDER BY
    i.instance_name
  , l.session_id;

[ERROR]: The value of s_patch_service_name is not set correctly in atleast one of the context files.

[ERROR]: The value of s_patch_service_name is not set correctly in atleast one of the context files. I got the issue below wh...