Missing FNDSM and FNDIM Services After Cloning or CLEAR NONEXISTENT FND_NODES

AFTER CLEAR NONEXISTENT FND_NODES, FNDFS and FNDSM NOT COMMING UP

However, now the Concurrent Manager cannot be started. The following error is produced in the Internal Concurrent Manager log file :

Symptoms

Could not start Service Manager FNDSM_hostname.
The TNS alias could not be located, the listener process on hostname could not be contacted, or the listener failed to spawn the Service Manager process.

Process monitor session started : 28-MAY-2008 10:15:28

Could not contact Service Manager FNDSM_TEST_UAT_dev. The TNS alias could not be located, the listener process onTEST_UAT could not be contacted, or the listener failed to spawn the Service Manager process.

Could not contact Service Manager FNDSM_TEST_dev. The TNS alias could not be located, the listener process on TEST could not be contacted, or the listener failed to spawn the Service Manager process.

Could not contact Service Manager FNDSM_APPSTEST1_dev. The TNS alias could not be located, the listener process on APPSTEST1 could not be contacted, or the listener failed to spawn the Service Manager process.

Could not initialize the Service Manager FNDSM_CHEN_dev. Verify that APOLLO has been registered for concurrent processing.
Routine AFPEIM encountered an error while starting concurrent manager INVTMRPM with library /11i/applmgr/devappl/inv/11.5.0/bin/INCTM.



Check that your system has enough resources to start a concurrent manager process. Contact your system administra : 28-MAY-2008 17:34:44
Could not find service instance context for service instance number 1027
Could not find service instance context for service instance number 1035
Could not find service instance context for service instance number 1039
Could not find service instance context for service instance number 1036

Starting FNDCRM Concurrent Manager : 28-MAY-2008 17:34:44

Could not initialize the Service Manager FNDSM_CHEN_dev. Verify that APOLLO has been registered for concurrent processing.
Routine AFPEIM encountered an error while starting concurrent manager FNDCRM with library /11i/applmgr/devappl/fnd/11.5.0/bin/FNDCRM.

Check that your system has enough resources to start a concurrent manager process. Contact your system administrat : 28-MAY-2008 17:34:44

Starting INVMGR Concurrent Manager : 28-MAY-2008 17:34:44
Could not initialize the Service Manager FNDSM_CHEN_dev. Verify that CHEN has been registered for concurrent processing.
Routine AFPEIM encountered an error while starting concurrent manager INVMGR with library /11i/applmgr/devappl/inv/11.5.0/bin/INVLIBR.



Solution

Run the following select on the target node only to check trigger status :

SELECT trigger_name , status
FROM user_triggers
WHERE table_name = 'FND_NODES' ;

If status of the triggers show as DISABLED, then enable these following triggers as follows :

connect apps/

alter trigger UPNAME enable;
alter trigger FNDSM enable;

Take backup of FND_NODES table in Target :

create table FND_NODE_bk as select * from FND_NODES ;

1. Login into Oracle Application with System Administrator Responsibility.
2. Delete the rows from FND_NODES table in target using install -> node -> Define form.
3. Then re-Register TRAGET hostname.
4. This should register FNDIM_ and FNDSM_ concurrent managers in FND_CONCURRENT_QUEUE Table.

Then

Check the following Scripts it will give node name. If not give any out put please run that below sql scripts.

SQL> select concurrent_queue_name, node_name from fnd_concurrent_queues where
manager_type=6;

From the Application tier:

SQL> sqlplus apps/apps

1. Log in as applmgr
2. cd to $FND_TOP/patch/115/sql
3. Run the script: afdcm037.sql
4. This script make libraries for FNDSM and create Managers for Preexisting Nodes.


Now you check

ps -ef grep FNDSM
ps -ef grep FNDCRM


Note ID: Note:305986.1

Applying Developer patchset 18 and ATG RUP 6

ENVIRONMENT

OS: AIX Version 5.3
DB: 10g (10.2.0.1.0)
APPS: 11i (11.5.10.2)


1.0.0 Apply AD.I.6 Minipack

Apply patch 6502082 using adpatch

Instructions

1. Before Applying This 5985992 Patch

Perform the steps listed below:

1.2 From the location where this patch was unzipped, change directory to fnd/patch/115/bin .

1.3 Run the Validation script as follows:

------------------------------------------
NOTE:

Ensure that your current working directory is
[patch unzipped location]/fnd/patch/115/bin

------------------------------------------ on Unix:

./txkprepatchcheck.pl -script=ValidateRollup
-outfile=$APPLTMP/txkValidateRollup.html
-appspass=


1.4 Review the report generated by the validation script

2. How To Apply This Patch

This patch contains the following driver file to be applied with
AutoPatch: u5985992.drv (This is the unified driver).

2.1 After Applying this Patch Run Autoconfig

2.2 Update the RDBMS ORACLE_HOME file system with the AutoConfig files by
performing the following steps:

2.2.1 On the Application Tier (as the APPLMGR user):
2.2.1.1 Source the environment file.
2.2.1.2 Create the appsutil.zip file by executing:
$ADPERLPRG $AD_TOP/bin/admkappsutil.pl

This will create appsutil.zip in $APPL_TOP/admin/out .

2.2.2 On the Database Tier (as the ORACLE user):
2.2.2.1 Copy or FTP the appsutil.zip file to the
2.2.2.2 cd
2.2.2.3 unzip -o appsutil.zip
2.2.2.4 Run AutoConfig by executing:

2.3 Apply 11.5.10 INTEROP PATCH FOR 10GR2
Apply patch 4653225 using adpatch

Apply patch 4948577(patchset 18) For Oracle Developer

1.1 Apply Developer patchset 18

1. Apply patch 4948577 to 8.0.6 Home on app and admin tiers

Note:
Before moving ahead with patch application ensure following:

All processes, running out of the ORACLE_HOME being patched, are shutdown cleanly.
$PATH includes $ORACLE_HOME/bin and also it points to locations where following executables are present: make, ar, ld, and nm.
$ORACLE_HOME should point to 806 Oracle Home.
$ORACLE_HOME and $JDK_HOME environment variables are set.
Set JDK_HOME to the JDK directory (JDK 1.3.1 or above).
For example, if you have JDK version 1.3.1 installed under /usr/local/packages/jdk1.3.1 directory, then set JDK_HOME to /usr/local/packages/jdk1.3.1/jdk
Make sure to backup the current /etc/oraInst.loc file.
Point the inventory location to the correct path in the oraInst.loc with the directory having the required inventory information


Reference:

Unzip the patch in 8.0.6 $ORACLE_HOME. .
Run the install script contained in the patch:
cd $ORACLE_HOME/developer6i_patch18
./patch_install.sh 2>&1 tee patch_install_p18.log
Check patch_install_p18.log for errors.


2. Relink Procedure Builder

Reference:
cd $ORACLE_HOME/procbuilder60/lib;
make -f ins_procbuilder.mk install

3. Relink Forms
Reference:
cd $ORACLE_HOME/forms60/lib;
make -f ins_forms60w.mk install

4. Relink Graphics
Reference:
cd $ORACLE_HOME/graphics60/lib;
make -f ins_graphics60w.mk install


5. Relink Reports
Reference:
Reports has both link-time and run-time dependency with libjava.so, so you need to append $ORACLE_HOME/network/jre11/lib/sparc/native_threads in $LD_LIBRARY_PATH before linking Reports. The same $LD_LIBRARY_PATH should be used at run-time.
cd $ORACLE_HOME/reports60/lib;
make -f ins_reports60w.mk install

1.2 Install Additional patches for Developer6i patchset 18

1.2.1 Apply patch 5713544

Unzip the patch. Change the directory to where the patch was unzipped.
cd 5713544
If you don't have genshlib in $ORACLE_HOME/bin directory then copy this file over there.
cp genshlib $ORACLE_HOME/bin
sh patch.sh


1.2.2 Apply patch 4261542

Copy the patch file to 6i Oracle Home
cd $ORACLE_HOME
Unzip the patch
Backup the Forms class files, i.e.$ORACLE_HOME/forms60/java/oracle/forms/handler/AlertDialog.class
%cp -r $ORACLE_HOME/forms60/java/oracle/forms/handler/AlertDialog.class
$ORACLE_HOME/forms60/java/oracle/forms/handler/AlertDialog.class.PRE_BUG4261542
%cp -r $ORACLE_HOME/forms60/java/oracle/forms/engine/Main.class
$ORACLE_HOME/forms60/java/oracle/forms/engine/Main.class.PRE_BUG4261542

Copy this file into ORACLE_HOME/forms60/java/oracle/forms/engine
%cd $ORACLE_HOME/4261542/oracle/forms/engine
%cp Main.class $ORACLE_HOME/forms60/java/oracle/forms/engine/Main.class
%cd $ORACLE_HOME/4261542/oracle/forms/handler
%cp AlertDialog.class $ORACLE_HOME/forms60/java/oracle/forms/handler/AlertDialog.class


1.2.3 Apply patch 5216496

Copy the zip in $ORACLE_HOME and Unzip the zip file. This will unzip into 5216496 folder.
• If you don't have genshlib in $ORACLE_HOME/bin directory then copy this file over there.
cp genshlib $ORACLE_HOME/bin
• Copy your original libraries in case you ever need it:
cd $ORACLE_HOME/lib
cp libiff.a libiff.a.ORG
cp libiff.so.0 libiff.so.0.ORG
cp libiffw.a libiffw.a.ORG
cp libiffw.so.0 libiffw.so.0.ORG
• Archive .o into iwf and iwfw library
cd $ORACLE_HOME/5216496/opt
ar -rv $ORACLE_HOME/lib/libiff.a ifzprs.o
cd $ORACLE_HOME/5216496/optweb
ar -rv $ORACLE_HOME/lib/libiffw.a ifzprs.o
• Generate All *.so's
cd $ORACLE_HOME/lib
$ORACLE_HOME/bin/genshlib iffw 0
$ORACLE_HOME/bin/genshlib iff 0
• Generate forms executables
cd $ORACLE_HOME/forms60/lib
make -f cus_forms60w.mk install

1.2.4 Apply patch 5753922
Unzip Patch file into 6i Oracle Home
cd 5753922
sh patch.sh

1.2.5 Apply patch 6195758

Unzip the patch into 6i Oracle Home.
cd $ORACLE_HOME
unzip p6195758_600_GENERIC.zip

Unzip the java class files and regenerate your JAR files

Backup the Forms class files,

%cp -r $ORACLE_HOME/forms60/java/oracle/forms/handler/UICommon.class
$ORACLE_HOME/forms60/java/oracle/forms/handler/UICommon.class.PRE_BUG6195758

%cp -r $ORACLE_HOME/forms60/java/oracle/forms/handler/ComponentItem.class
$ORACLE_HOME/forms60/java/oracle/forms/handler/ComponentItem.class.PRE_BUG6195758

Inside folder 6195758 in step-2 has class files in oracle\forms\handler directory. Copy this file into ORACLE_HOME/forms60/java/oracle/forms/handler

cd $ORACLE_HOME/6195758/oracle/forms/handler
cp UICommon.class $ORACLE_HOME/forms60/java/oracle/forms/handler/UICommon.class
%cp ComponentItem.class $ORACLE_HOME/forms60/java/oracle/forms/handler/ComponentItem.class

1.2.6 Apply Patch 5938515

Unzip Patch file in 6i Oracle Home
cd 5938515
sh patch.sh

1.3 Apply Forms Interoperability Patch

Apply patch 4888294 using adpatch

1.3.1 APPLICATIONS INTEROPERABILITY PATCH

Apply patch 3830807 using adpatch

1.3.2 UNABLE TO RELINK LIBIFJAPI60.SO IN RHAS3.0

Apply patch 4586086 using adpatch


1.4 Generate JAR Files

Generate JAR files using adadmin

1.5 Apply Security Fixes to Developer 6i
1.5.1 Apply patch 5687261 to forms server


Unzip patch in 6i oracle home
cd 5687261
sh patch.sh 2>&1 tee patch.log
Please inspect patch.log for any errors

1.5.2 Apply patch 5686997
Unzip the patch in 6i Oracle Home
cd 5686997
sh patch.sh 2>&1 tee patch.log
Please inspect patch.log for any errors.

1.5.3 Apply patch 5078711

• Make sure that all processes running from the ORACLE_HOME being patched are shutdown before installing this patch.
• Ensure that ORACLE_HOME is set.
• Set JDK_HOME to the JDK directory (JDK 1.3.1 or later).
• Ensure $ORACLE_HOME/bin is included in your PATH environment variable, and also ensure that the following executables must be present in the $PATH: make, ar, ld, nm
• Set your current directory to the directory where the patch is located and then run the installcpu.sh script by entering the following UNIX command:
sh installcpu.sh
Inspect the following install log file for any errors:
installcpu.sh log file $ORACLE_HOME/cpu/5078711/install.log

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



Apply ATG_PF RUP6

Apply Technology Stack Patch

CPUApr2008 6831988 EBS11i:Technology Stack (TXK) Components For Critical Patch Update April 2008

1.6 Apply Pre-Req Patches

1.6.1 Apply AD.I.6 Minipack
Apply patch 6502082 using adpatch
1.6.2 Post AD.I.6 patch Tasks

1.6.2.1 Grant privileges and create PL/SQL profiler objects
Run the adgrants.sql script as a user that can connect as SYSDBA to grant privileges to selected SYS objects and create PL/SQL profiler objects.

• Create $ORACLE_HOME/appsutil/admin on the database server.
• Copy adgrants.sql from $APPL_TOP/admin to $ORACLE_HOME/appsutil/admin.
• Set the environment to point to ORACLE_HOME on the database server.
• Run following commands
$ sqlplus /nolog
SQL> connect / as sysdba
SQL> @$ORACLE_HOME/appsutil/admin/adgrants.sql
1.6.2.2 Run Adconfig
Run adconfig to instantiate the templates used by AD Utilities
1.6.2.3 Perform Adadmin Tasks
• Regenerate JAR files using adadmin.
• Update current view snapshot

1.7 Apply ATG_PF RUP6

1.7.1 Apply pre-req patches
Apply following pre-req patches

1.7.1.1 Apply patch 5989593

Apply patch using adpatch
Create $ORACLE_HOME/appsutil/admin on the database server.
Copy adgrants.sql (UNIX) from the patchtop(5989593)/admin directory to
$ORACLE_HOME/appsutil/admin.
Set the environment to point to ORACLE_HOME on the database server.
Use SQL*Plus to run the script:

$ sqlplus /nolog
SQL> connect / as sysdba
SQL> @$ORACLE_HOME/appsutil/admin/adgrants.sql

1.7.1.2 Apply patch 4291053

Apply patch using adpatch
Run adadmin and
Compile APPS Schema
Compile Flexfield data in AOL Tables

1.7.1.3 Apply patch 3218526 – BNE.D

Apply patch using adpatch
Run adadmin and
Compile APPS Schema
Compile Flexfield data in AOL Tables

Perform following post patch steps

Once you have successfully applied minipack 11i.BNE.D, you must complete these additional product-specific tasks. This section describes these tasks.

 The Web server must be restarted after the successful application of the Patch Set.
 Review the list of profile options in the Implementation and User Documentation specified in the Additional Product Information section.
 Review the seeded form functions, menu, and responsibility in the Implementation and User Documentation specified in the Additional Product Information section. Give Oracle Application Users access to Web ADI form functions. Simply assigning the seeded Desktop Integration Responsibility to a user can do this. See the Oracle Applications System Administrator's Guide for more information on giving users access to form functions on the Personal Home Page.
 If your site is using the General Ledger - Journals Integrator:
o Make sure the GL: Set of Books Name profile option is set for all user profiles.
o Assure that at least one of the following form functions is associated with the menu that contains the form function they use to access Web ADI: Enter Budget Journals, Enter Journals, Enter Encumbrances, Import Journals, and Create Document.
 After BNE.D has been applied, then apply the latest ATG RUP patchset - currently that is ATG RUP6. All of the Web ADI fixes that have been made on top of BNE.D have been rolled up in the the latest ATG RUP patchset. In order to get these latest updates, you should apply the latest ATG RUP patch 6. Reference Patch 5903765 11i.ATG_PF.H. RUP6 and Note 444524.1 for more information
 Sites using Internal Controls Manager need to apply Patch 4483674 after applying BNE.D Minipack.
 Sites using Financial Intelligence need to apply Patch 3857216 after applying BNE.D Minipack.
 Sites using HRMS need to apply Patch 4199321 after applying BNE.D Minipack. Please consult the HRMS Metalink page for any additional patches which may also need to be applied.

1.7.1.4 Apply patch 3761838 – FRM.G
1.7.1.5 Apply patch 4206794 – FRM.H


Apply patch 4206794 using adpatch
Perform following adadmin task after successful application of patch
• Generate message files
• Compile APPS schema(s)
• Compile flexfield data
• Recreate grants and synonyms for APPS schema(s)
• Gather schema statistics

1.7.2 Run the technology stack validation utility

• Source the environment logged in as applmgr
• Ensure that APPLRGF environment is set, if not then set it to the value of APPLTMP
• From the location where this patch(ATG_PF>RUP6) was unzipped, change directory to fnd/patch/115/bin.
• Run the tech stack validation utility as follows:
• ./txkprepatchcheck.pl -script=ValidateRollup
-outfile=$APPLTMP/txkValidateRollup.html
-appspass=
• Check the report filegenerated by this utility for any actions required to perform

1.7.3 Apply ATG_PF.RUP6 patch using adpatch.
Apply patch 5903765 using adpatch
1.7.4 Post ATG_PF.RUP6 steps
Apply following patches using adpatch
3865683


Complete Adadmin Tasks
Complete following adadmin tasks
• Generate message files
• Compile apps schema
• Compile flexfields
• Compile menus
• Run “Gather Schema Statistics” concurrent program

Steps to Clean Nonexistent Nodes or IP Addresses from FND_NODES

After completing the ADCLONE process, or implementing Autoconfig,
the FND system tables have incorrect values

SQL> select node_name, node_mode, support_cp,
support_web, support_admin, support_forms
from FND_NODES;


NODE_NAME N S S S S
------------------ - - - - -
TESTSERVER O N Y N Y
APPSTEST01 O N Y N Y
APPSDEVP01 O N Y N Y
DEVP O Y Y Y Y
AUTHENTICATION O N N N N
GOLD_UAT O
GOLDTS O Y Y Y Y

7 rows selected.


NOTE:

Do not directly Delete from FND_NODES table because the
'support_' columns will be affected and will not
incorporate the correct information througout in OAM


Run The following Script.

SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
COMMIT;


After Commit check the following Scripts. Now you got output no rows.
Then you run Autuconfig both Tiers

SQL> select node_name, node_mode, support_cp,
support_web, support_admin, support_forms
from FND_NODES;


no rows selected


Run AutoConfig on all tiers, firstly on the DB tier and then the APPS tiers,
to repopulate the required system tables.

SQL> select node_name, node_mode, support_cp,
support_web, support_admin, support_forms
from FND_NODES;



NODE_NAME N S S S S
-------------------- - - - - -
AUTHENTICATION O N N N N
GPLDTS O Y Y Y Y


Note:260887.1

Invalid Objects after Database Upgraded to 10.2.0.1

ERROR at line 1:
ORA-04063: package body "SYSTEM.AD_INVOKER" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"SYSTEM.AD_INVOKER"
ORA-06512: at line 2

sqlplus -s APPS/***** @/11i/progs/applmgr/devappl/ad/11.5.0/admin/sql/adinvset.pls &systempwd 8 0 FALSE FALSE


The Oracle DB's stored procedures have not been invalidated and recompiled for Oracle 10g.


Solutions
==========


1. Change directory to $Portal_DB_HOME/rdbms/admin
2. Login to sqlplus as sys as sysdba.
3. SQL>shutdown
4. SQL>startup upgrade
5 SQL>@utlirp.sql
6. SQL>shutdown
7. SQL>startup
8. SQL>@utlrp.sql
9. Check for invalid objects.

Use the following queries to track recompilation progress

1. Query showing jobs created by UTL_RECOMP

SELECT job_name FROM dba_scheduler_jobs
WHERE job_name like 'UTL_RECOMP_SLAVE_%';

2. Query showing UTL_RECOMP jobs that are running

SELECT job_name FROM dba_scheduler_running_jobs
WHERE job_name like 'UTL_RECOMP_SLAVE_%';


1. Query returning the number of invalid objects remaining. This
number should decrease with time.


SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);

2. Query returning the number of objects compiled so far. This number
should increase with time.


SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;

select count(*) from dba_objects where status='INVALID';

Important Apps Scripts

/* cmtoday.sql
see info on jobs run today
can specify an individual job name to limit the list
*/

clear columns
set pages 23
set lines 125
col os form A6
col program head "Program Name" form A70 trunc
col shrtnm head "Shortname" format a9
col time head Elapsed form 9999.99
col request_id head "Req Id" form 9999999
col cprogid head "Prg Id" form 999999
col "Started On" format a10
col "Finished On" format a11
col "Submitted By" format a30 trunc
col argument_text head "Arguments" format a50 trunc
col statustxt head Status format a10 trunc
col phasetxt head Phase format a10 trunc
set recsep wrap
set verify off
accept trgtprog char default all prompt 'What is the concurrent program short name : '
accept offsetdays num default 0 prompt 'How many days back (0 for today, 1 for yesterday etc) : '
select a.request_id
,c.concurrent_program_name shrtnm
,c.concurrent_program_id cprogid
,ctl.user_concurrent_program_name "program"
,l2.meaning phasetxt
,l1.meaning statustxt
,to_char(a.actual_start_date,'hh:mi:ssAM') "Started On"
,to_char(a.actual_completion_date,'hh:mi:ssAM') "Finished On"
,(nvl(actual_completion_date,sysdate)-actual_start_date)*1440 "Time"
,a.argument_text
,u.user_name || ' - ' || u.description "Submitted By"
from APPLSYS.fnd_Concurrent_requests a
,applsys.fnd_user u
,applsys.fnd_lookup_values l1
,applsys.fnd_lookup_values l2
,APPLSYS.fnd_concurrent_programs c
,APPLSYS.fnd_concurrent_programs_tl ctl
where u.user_id = a.requested_by
and (upper(c.concurrent_program_name) = upper('&trgtprog') or upper('&trgtprog') = 'ALL')
and trunc(a.actual_start_date) = trunc(sysdate) - &offsetdays
and l1.lookup_type = 'CP_STATUS_CODE'
and l1.lookup_code = a.status_code
and l1.language = 'US'
and l1.enabled_flag = 'Y'
and nvl(l1.start_date_active,sysdate) <= sysdate
and (l1.end_date_active > sysdate or l1.end_date_active is null)
and l2.lookup_type = 'CP_PHASE_CODE'
and l2.lookup_code = a.phase_code
and l2.language = 'US'
and l2.enabled_flag = 'Y'
and nvl(l2.start_date_active,sysdate) <= sysdate
and (l2.end_date_active > sysdate or l2.end_date_active is null)
and a.concurrent_program_id = c.concurrent_program_id
and ctl.concurrent_program_id = c.concurrent_program_id
and ctl.language = 'US'
and a.program_application_id = c.application_id
and ctl.application_id = c.application_id
order by actual_start_date;

/

/* cmlong.sql
monitor script to list the ccmgr jobs running longer than 10 minutes
and exceeding the average historical runtime for this particular
job
*/

col program form A35 trunc head "Program Full Name"
col intprog format a20 trunc head "Internal Name"
col time form 9999.99
col "Req Id" form 9999999
col qname head "Concurrent Manager Queue" format a25 trunc
rem select q.concurrent_queue_name qname
select q.concurrent_queue_name || ' - ' || target_node qname
,a.request_id "Req Id"
,a.phase_code,a.status_code
,(nvl(actual_completion_date,sysdate)-actual_start_date)*1440 "Time"
,c.concurrent_program_name ||
' (' || to_char(c.concurrent_program_id) || ')' intprog,
ctl.user_concurrent_program_name "program"
from APPLSYS.fnd_Concurrent_requests a,APPLSYS.fnd_concurrent_processes b
,applsys.fnd_concurrent_queues q
,APPLSYS.fnd_concurrent_programs c
,APPLSYS.fnd_concurrent_programs_tl ctl
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 a.phase_code in ('I','P','R','T')
and b.queue_application_id = q.application_id
and b.concurrent_queue_id = q.concurrent_queue_id
and ctl.concurrent_program_id = c.concurrent_program_id
and ctl.language = 'US'
and (nvl(actual_completion_date,sysdate)-actual_start_date)*1440 > 10
and (nvl(actual_completion_date,sysdate)-actual_start_date)*1440 >
( select avg(nvl(a2.actual_completion_date-a2.actual_start_date,0))*1440
from APPLSYS.fnd_Concurrent_requests a2,
APPLSYS.fnd_concurrent_programs c2
where c2.concurrent_program_id = c.concurrent_program_id
and a2.concurrent_program_id = c2.concurrent_program_id
and a2.program_application_id = c2.application_id
and a2.phase_code || '' = 'C'
)
order by 5 desc;
/

Daily Total Count Concurrent

select sysdate -1, count(*)
from apps.fnd_concurrent_requests
where to_char(actual_completion_date,'YYYYMMDD') = (select to_char(sysdate -1,'YYYYMMDD') from dual);

/

currently Running Concurrent Rrequests:

SELECT SUBSTR(LTRIM(req.request_id),1,15) concreq,
SUBSTR(proc.os_process_id,1,15) clproc,
SUBSTR(LTRIM(proc.oracle_process_id),1,15) opid,
SUBSTR(look.meaning,1,10) reqph,
SUBSTR(look1.meaning,1,10) reqst,
SUBSTR(vsess.username,1,10) dbuser,
SUBSTR(vproc.spid,1,10) svrproc,
vsess.sid sid,
vsess.serial# serial#
FROM fnd_concurrent_requests req,
fnd_concurrent_processes proc,
fnd_lookups look,
fnd_lookups look1,
v$process vproc,
v$session vsess
WHERE req.controlling_manager = proc.concurrent_process_id(+)
AND req.status_code = look.lookup_code
AND look.lookup_type = 'CP_STATUS_CODE'
AND req.phase_code = look1.lookup_code
AND look1.lookup_type = 'CP_PHASE_CODE'
AND look1.meaning = 'Running'
AND proc.oracle_process_id = vproc.pid(+)
AND vproc.addr = vsess.paddr(+);

/

prompt To Find Sessions Generating Lots of Redo
prompt

SELECT s.sid, s.serial#, s.username, s.program, i.block_changes
FROM v$session s, v$sess_io i
WHERE s.sid = i.sid
AND i.block_changes > 50
ORDER BY 5 desc, 1, 2, 3, 4
/

/* formusers.sql
show the applications sessions currently using a specified form
can optionally limit it by active only
if you need to limit by a user, use appsid.sql
*/

set lines 132
set verify off
set feedback off
col user_name head "Apps Signon" format a12 trunc
col description head "Real Name" format a25 trunc
col user_form_name head "Form Name" format a30 trunc
col time head "Elapsed" format a7
col startedat head "Logon At" format a19
col spid head DBProc format a6
col sidctr head "#Sess" format 99999
col actstat head "Status" format a1
col currform format a30 trunc head CurrentForm
col lastcallet format a11
col sid format 99999
break on startedat on time on user_name on description on sidctr on actstat on spid
accept trgtuser char default ALL prompt 'What is the Apps short username you are interested in : '
accept trgtform char default ALL prompt 'What is the Apps form you are interested in : '
accept trgtstat char default N prompt 'Limit to active users only [y/n] : '
select /*+ rule */
to_char(s.logon_time,'mm/dd hh24:mi:ss') startedat,
a.time,
floor(s.last_call_et/3600)||':'||
floor(mod(s.last_call_et,3600)/60)||':'||
mod(mod(s.last_call_et,3600),60) "LastCallET",
u.user_name,
u.description ,
count(s.sid) sidctr,
s.sid,
decode(sum(decode(s.status,'ACTIVE',1,0)),0,'I','A') actstat,
p.spid,
a.form_id || ' - ' || a.user_form_name currform
from applsys.fnd_logins l,
applsys.fnd_user u,
apps.fnd_signon_audit_view a,
v$process p,
v$session s
where s.paddr = p.addr
and p.pid = l.pid
and l.end_time is null
and l.spid = s.process
and l.start_time is not null
-- and l.start_time = u.last_logon_date
-- and l.session_number = u.session_number
and l.user_id = u.user_id
and u.user_id = a.user_id
and p.pid = a.pid
and ((upper(a.user_form_name) like upper('%&trgtform%')) or (upper('&trgtform') = 'ALL'))
and ((s.status = 'ACTIVE' and upper('&trgtstat') = 'Y') or (upper('&trgtstat') != 'Y'))
and ((upper(u.user_name) like upper('%&trgtuser%')) or (upper('&trgtuser') = 'ALL'))
and l.start_time = (select max(l2.start_time)
from applsys.fnd_logins l2
where l2.pid = l.pid)
group by to_char(s.logon_time,'mm/dd hh24:mi:ss'),
s.sid,u.user_name, u.description,a.time,a.form_id || ' - ' || a.user_form_name,p.spid,
floor(s.last_call_et/3600)||':'||
floor(mod(s.last_call_et,3600)/60)||':'||
mod(mod(s.last_call_et,3600),60)
order by 8 desc,5,to_char(s.logon_time,'mm/dd hh24:mi:ss'),a.time;
/

Input Request ID and get Output

set long 10000000
select sql_text, sid, SERIAL# from v$session a,v$sqltext b,applsys.fnd_concurrent_requests f
where a.sql_hash_value=b.hash_value
and f.ORACLE_SESSION_ID=a.AUDSID
and f.request_id = '2722865'
/

Input SID and Get output

column osuid format a8
column dbacct format a20
select s.sid, s.process pid, p.spid orapid, s.osuser osuid, s.username dbacct,
s.serial#, s.program, s.machine
from v$session s, v$process p where s.sid = &&1
and p.addr(+) = s.paddr
/


/* showappuser.sql
show the applications user based on the apps logon username
*/


set lines 132
col user_name head "Apps Signon" format a12 trunc
col description head "Real Name" format a25 trunc
col user_form_name head "Form Name" format a35 trunc
col time head "Elapsed Time" format a10
col zoom_level head "Zoom Level"
col startedat head "Logon At" format a19
col spid head DBProc format a6
col svrstat head S format a1 trunc
col elapsedtime head "Elapsed Time" format a12
col program format a30 trunc
break on user_name,description,spid,sid,svrstat nodup
accept trgtusr char prompt 'What is the Apps Logon User ID : '
prompt Here are the sessions for user id &trgtusr....
select to_char(l.start_time,'mm/dd/yy hh:mi:ssAM') startedat,
a.time,
u.user_name, u.description, l.SERIAL#,
p.spid, s.sid,s.status svrstat,
s.program
,a.user_form_name
from applsys.fnd_logins l,
applsys.fnd_user u,
apps.fnd_signon_audit_view a,
v$process p,
v$session s
where u.user_name = upper('&trgtusr')
and s.paddr = p.addr
and p.pid = l.pid
and l.end_time is null
and l.spid = s.process
and l.start_time is not null
and l.start_time = u.last_logon_date
and l.session_number = u.session_number
and l.user_id = u.user_id
and u.user_id = a.user_id
and p.pid = a.pid
and l.start_time = (select max(l2.start_time)
from applsys.fnd_logins l2
where l2.pid = l.pid)
order by to_char(l.start_time,'mm/dd/yy hh:mi:ssAM');
-- group by u.user_name,u.description,s.sid,s.status,p.spid,s.program
-- group by u.user_name,u.description,s.sid,s.status,p.spid,a.time,a.user_form_name
-- order by to_char(max(l.start_time),'mm/dd/yy hh:mi:ssAM'),a.time;

break on elapsedtime nodup
prompt Here are the Apps forms currently in use by &trgtusr.....
select a.user_form_name, max(a.time) elapsedtime
from apps.fnd_signon_audit_view a,
v$process p,
applsys.fnd_logins l,
v$session s,
applsys.fnd_user u
where a.pid = p.pid
and p.addr = s.paddr
and a.user_id = u.user_id
and u.user_name = upper('&trgtusr')
and l.user_id = u.user_id
and l.start_time = (select max(l2.start_time)
from applsys.fnd_logins l2
where l2.pid = l.pid)
group by a.user_form_name;

/

/* showappsid.sql
show the applications user based on the sid
*/


rem to_char(max(l.start_time),'mm/dd/yy hh:mi:ssAM') startedat,
set lines 132
set verify off
col user_name head "Apps Signon" format a12 trunc
col description head "Real Name" format a25 trunc
rem col user_form_name head "Form Name" format a30 trunc
col forminfo head "Form Name" format a40 trunc
col time head "Elapsed Time" format a10
col zoom_level head "Zoom Level"
col startedat head "Logon At" format a19
col lastcallet format a11
accept trgtsid number prompt 'What is the SID : '
select /*+ rule */
to_char(s.logon_time,'mm/dd/yy hh:mi:ssAM') startedat,
a.time,
floor(s.last_call_et/3600)||':'||
floor(mod(s.last_call_et,3600)/60)||':'||
mod(mod(s.last_call_et,3600),60) "LastCallET",
u.user_name, u.description ,
s.module || ' - ' || a.user_form_name forminfo
from applsys.fnd_logins l,
applsys.fnd_user u,
apps.fnd_signon_audit_view a,
v$process p,
v$session s
where s.sid = &trgtsid
and s.paddr = p.addr
and p.pid = l.pid
and l.end_time is null
and l.spid = s.process
and l.start_time is not null
-- and l.start_time = u.last_logon_date
-- and l.session_number = u.session_number
and l.user_id = u.user_id
and u.user_id = a.user_id
and p.pid = a.pid
and l.start_time = (select max(l2.start_time)
from applsys.fnd_logins l2
where l2.pid = l.pid)
group by to_char(s.logon_time,'mm/dd/yy hh:mi:ssAM'),
floor(s.last_call_et/3600)||':'||
floor(mod(s.last_call_et,3600)/60)||':'||
mod(mod(s.last_call_et,3600),60),
u.user_name, u.description,a.time,s.module || ' - ' || a.user_form_name
order by to_char(s.logon_time,'mm/dd/yy hh:mi:ssAM'),a.time;
/

show current per trans

SELECT s.logon_time, t.start_time, oc.sql_text, s.username "User Name",
s.osuser "OS User", s.status "Status", lockwait "Lock Wait",
s.program "Program", s.logon_time "Connect Time", p.program "P Program",
si.physical_reads "Physical Reads", si.block_gets "Block Gets",
si.consistent_gets "Consistent Gets", si.block_changes "Block Changes",
si.consistent_changes "Consistent Changes", s.process "Process",
p.spid, p.pid, s.serial#, si.sid
FROM sys.v_$sess_io si, sys.v_$session s, sys.v_$process p ,
v$open_cursor oc, v$transaction t
WHERE s.username is not null
AND si.sid(+)=s.sid
AND s.sid = oc.sid
AND p.addr(+)=s.paddr
AND s.saddr(+)= t.ses_addr
ORDER BY s.status, si.consistent_gets+si.block_gets desc
/

prompt Temporary Tablespace Usage in terms of alloacted,used,free space
prompt
column tablespace_name format a10 heading "temporary|tablespace"
column allocated_mb format 99999.99 heading "allocated|in mb"
column used_mb format 99999.99 heading "used|in mb"
column free_mb format 99999.99 heading "free|in mb"
select *
from (select a.tablespace_name
, sum(a.bytes/1024/1024) allocated_mb
from dba_temp_files a
where a.tablespace_name = upper('&&temp_tsname') group by a.tablespace_name ) x,
(select sum(b.bytes_used/1024/1024) used_mb
, sum(b.bytes_free/1024/1024) free_mb
from v$temp_space_header b
where b.tablespace_name=upper('&&temp_tsname') group by b.tablespace_name) y
/


set Head off
column USER_NAME format a10
column RESPONSIBILITY_NAME format a20
spool /oracle/scripts/sysadminresponse.log
SELECT A.USER_NAME , B.RESPONSIBILITY_NAME FROM FND_USER A,FND_RESPONSIBILITY_VL B
WHERE B.RESPONSIBILITY_NAME='System Administrator';
spool off
exit;
/

Oracle Applications Tablespace Model - OATM

Oracle Applications Tablespace Model - OATM

The Oracle Applications Tablespace Model was another long awaited feature that got introduced in 11.5.10.Prior to 11.5.10 by default each of the oracle applications product would have two dedicated tablespace holding the data element and the other for storing the index eg GLD (For General Ledger base tables) and GLX (For indexes relation to the General Ledger product).This easily resulted in some 300 odd tablespaces to manage apart from the system, temp and the rollback tablespaces.

In the new Oracle Applications Tablespace Model (OATM) all these product related tablespaces have been consolidated in two main tablespaces one for holding the base tables and the other for holding the related indexes. Apart from these two tablespace you have an additional ten tablespaces including system tablespace undo tablespace and the temporary tablespace. Thereby reducing the total number of tablespace in the OATM to twelve.

Apart from the obvious ease of management and administration with a reduced number of tablespace being involved the OATM also provides benefits like efficient space utilization. This is achieved by supporting locally managed tablespaces as opposed to the dictionary managed tablespace in the previous model.

OATM also supports uniform extent allocation and auto allocate extent management. In uniform extent management all the extents have the same size and result in less fragmentation. Auto allocate extent management allows the system to determine the extent sizes automatically.

OATM also provides additional benefits when implementing Real Application Clusters (RAC) in Oracle Applications.

Under the OATM the following twelve tablespaces are created as a default.
APPS_TS_TX_DATA - This tablespace hold the translational tables of all Oracle Applications products. For example the GL_JE_HEADERS will be a part of APPS_TX_DATA.
APPS_TS_TX_IDX - All the indexes on the product tables are kept under this tablespace.
APPS_TS_SEED - The seeded data that is setup and reference data tables and indexes form this tablespace. For example your FND_DATABASES table would reside in the APPS_TS_SEED tablespace.
APPS_TS_INTERFACE - All the interface tables are kept in this tablespace for example the GL_INTERFACE table.
APPS_TS_SUMMARY - All objects that record summary information are grouped under this tablespace.
APPS_TS_NOLOGGING - This tablespace contains the materialized views that are not used for summary purposes and other temporary
object that do not require redo log entries.
APPS_TS_QUEUES - With the support for advanced queuing in Oracle Applications, the advanced queue tables and related objects form a part of this tablespace.
APPS_TS_MEDIA - This tablespace holds multimedia objects like graphics sound recordings and spital data.
APPS_TS_ARCHIVE - Tables that are obsolete in the current release of Oracle Applications 11i are stored here. These tables are preserved to maintain backward compatibility of custom programs or migration scripts.
UNDO - The undo tablespace is used as automatic undo management is enabled by default in 11.5.10.This acts as a replacement to red log files.
TEMP - The Temp tablespace is the default temporary tablespace for Oracle Applications.
SYSTEM - This is the SYSTEM tablespace used by the Oracle Database.

For all new installation of 11.5.10 OATM is available as a default install. For prior applications system you can migrate your existing tables spaces to the oracle applications tablespace model.

For this purpose you have the Tablespace Migration Utility(TMU) which is available as a patch (3381489).

The TMU is a Perl based interactive utility that helps in migrating the oracle applications schemas to implement the OATM.

For additional information refer to the Oracle Applications Tablespace Migration Utility User Documentation.