ORACLE Apps DBA Scripts

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 11

ndex

1) How to find out responsibility attached for particular user


2) To check the maintainance mode through sql plus
3) To clear FND_NODEs
4) To check profile exists or not
5) for finding look up application
6)To check the timeline of the request :
7) DEV60cgi/f60cgi login
8) To find out trace file for particular request id from backend
SELECT request_id, TO_CHAR( request_date, 'DD-MON-YYYY HH24:MI:SS' )
request_date, TO_CHAR( requested_start_date,'DD-MON-YYYY HH24:MI:SS' )
requested_start_date, TO_CHAR( actual_start_date, 'DD-MON-YYYY HH24:MI:SS' )
actual_start_date, TO_CHAR( actual_completion_date, 'DD-MON-YYYY HH24:MI:SS' )
actual_completion_date, TO_CHAR( sysdate, 'DD-MON-YYYY HH24:MI:SS' )
current_date, ROUND( ( NVL( actual_completion_date, sysdate ) - actual_start_dat
e ) * 24, 2 ) duration
FROM fnd_concurrent_requests
WHERE request_id = TO_NUMBER('&p_request_id');
################################################################################
####################################
###### Lookup info with APplication name
######
################################################################################
####################################
select a.LOOKUP_TYPE,a.VIEW_APPLICATION_ID,b.application_name, b.application_sho
rt_name
from FND_LOOKUP_TYPES_TL a, fnd_application_vl b
where a.VIEW_APPLICATION_ID = b.APPLICATION_ID
and LOOKUP_TYPE like upper('%&lookup%')

################################################################################
####################################
###### How to find out responsibility attache
d for particular user ######
################################################################################
####################################
SELECT fu.USER_NAME,fu.DESCRIPTION,frt.RESPONSIBILITY_NAME, furg.end_date
FROM
fnd_user_resp_groups furg,
FND_RESPONSIBILITY fr,
fnd_responsibility_tl frt,
fnd_user fu
WHERE fu.user_name = 'IV624'
AND fu.user_id = furg.user_id
AND furg.responsibility_id = fr.RESPONSIBILITY_ID
AND frt.responsibility_id = fr.RESPONSIBILITY_ID
ORDER BY 1;
SELECT distinct u.user_id, u.user_name user_name,
r.responsibility_name responsiblity,
a.application_name application
FROM fnd_user u,
fnd_user_resp_groups g,
fnd_application_tl a,
fnd_responsibility_tl r
WHERE g.user_id(+) = u.user_id
AND g.responsibility_application_id = a.application_id
AND a.application_id = r.application_id
AND g.responsibility_id = r.responsibility_id
and u.user_name like upper('%&user%')
order by 1;
################################################################################
####################################
###### To check the maintainance mode through sql plus
######
################################################################################
####################################

select FND_PROFILE.VALUE('APPS_MAINTENANCE_MODE')from dual


################################################################################
####################################
###### To Clear nodes from FND_NODES
######
################################################################################
####################################
XEC FND_CONC_CLONE.SETUP_CLEAN;

select REQUEST_ID,
CASE WHEN (PHASE_CODE) = 'C' THEN 'Completed'
WHEN (PHASE_CODE) = 'I' THEN 'Inactive'
WHEN (PHASE_CODE) = 'P' THEN 'Pending'
WHEN (PHASE_CODE) = 'R' THEN 'Running'
ELSE 'NODATA'
END AS PHASE,
CASE WHEN (STATUS_CODE) = 'A' THEN 'Waiting'
WHEN (STATUS_CODE) = 'B' THEN 'Resuming'
WHEN (STATUS_CODE) = 'C' THEN 'Normal'
WHEN (STATUS_CODE) = 'D' THEN 'Cancelled'
WHEN (STATUS_CODE) = 'E' THEN 'Error'
WHEN (STATUS_CODE) = 'F' THEN 'Scheduled'
WHEN (STATUS_CODE) = 'G' THEN 'Warning'
WHEN (STATUS_CODE) = 'H' THEN 'Hold'
WHEN (STATUS_CODE) = 'I' THEN 'Normal'
WHEN (STATUS_CODE) = 'M' THEN 'No Manager'
WHEN (STATUS_CODE) = 'Q' THEN 'Standby'
WHEN (STATUS_CODE) = 'R' THEN 'Normal'
WHEN (STATUS_CODE) = 'S' THEN 'Suspended'
WHEN (STATUS_CODE) = 'T' THEN 'Terminating'
WHEN (STATUS_CODE) = 'U' THEN 'Disabled'
WHEN (STATUS_CODE) = 'W' THEN 'Paused'
WHEN (STATUS_CODE) = 'X' THEN 'Terminated'
WHEN (STATUS_CODE) = 'Z' THEN 'Waiting'
ELSE 'NODATA'
END AS STATUS
from fnd_concurrent_requests where REQUEST_ID=&REQ_ID;
/fs03/MRGOLD/patches/WMS_PATCH/6957082

To Find out the Workflow Mailer component status from DATABASE using sqlplus
select COMPONENT_NAME , STARTUP_MODE, COMPONENT_STATUS
from fnd_svc_components where concurrent_queue_id in (select concurrent_queue_id
from fnd_concurrent_queues where concurrent_queue_name like 'WF%')
order by COMPONENT_TYPE, COMPONENT_ID

/* Query to find out if any patch except localisation patch is applied or not, i
f applied, that what all drivers it contain and time of it s application*/
SELECT A.APPLIED_PATCH_ID,
A.PATCH_NAME,
A.PATCH_TYPE,
B.PATCH_DRIVER_ID,
B.DRIVER_FILE_NAME,
B.ORIG_PATCH_NAME,
B.CREATION_DATE,
B.PLATFORM,
B.SOURCE_CODE,
B.CREATION_DATE,
B.FILE_SIZE,
B.MERGED_DRIVER_FLAG,
B.MERGE_DATE
FROM AD_APPLIED_PATCHES A,
AD_PATCH_DRIVERS B
WHERE A.APPLIED_PATCH_ID = B.APPLIED_PATCH_ID
AND A.PATCH_NAME = '&patch';

/* To know that if the patch is applied successfully, applied on both node or no


t, start time of patch application and end time of patch application, patch top
location , session id patch run id */
select D.PATCH_NAME, B.APPLICATIONS_SYSTEM_NAME, B.INSTANCE_NAME, B.NAME, C.DRIV
ER_FILE_NAME, A.PATCH_DRIVER_ID, A.PATCH_RUN_ID, A.SESSION_ID, A.PATCH_TOP, A.ST
ART_DATE, A.END_DATE, A.SUCCESS_FLAG, A.FAILURE_COMMENTS from AD_PATCH_RUNS A, A
D_APPL_TOPS B, AD_PATCH_DRVIERS C, AD_APPLIED_PATCHES D where A.APPL_TOP_ID = B.
APPL_TOP_ID AND A.PATCH_DRIVER_ID = C.PATCH_DRIVER_ID and C.APPLIED_PATCH_ID = D
.APPLIED_PATCH_ID and A.PATCH_DRIVER_ID in (select PATCH_DRIVER_ID from AD_PATCH
_DRIVERS where APPLIED_PATCH_ID in (select APPLIED_PATCH_ID from AD_APPLIED_PATC
HES where PATCH_NAME = <patch number> )) ORDER BY 3;
/* To find the latest application version */
select ARU_RELEASE_NAME|| .'||MINOR_VERSION|| .'||TAPE_VERSION version, START_DATE_A
CTIVE updated,ROW_SOURCE_COMMENTS how it is done , BASE_RELEASE_FLAG Base version FRO
M AD_RELEASES where END_DATE_ACTIVE IS NULL
/* to find the base application version */
select ARU_RELEASE_NAME|| .'||MINOR_VERSION|| .'||TAPE_VERSION version, START_DATE_A
CTIVE when updated, ROW_SOURCE_COMMENTS how it is done from AD_RELEASES where BASE
_RELEASE_FLAG = Y
/* To find all available application version */
select ARU_RELEASE_NAME|| .'||MINOR_VERSION|| .'||TAPE_VERSION version, START_DATE_A
CTIVE when updated, END_DATE_ACTIVE when lasted , CASE WHEN BASE_RELEASE_FLAG = Y The
n BASE VERSION ELSE Upgrade END BASE/UPGRADE , ROW_SOURCE_COMMENTS how it is done fr
_RELEASES
/* To get file version of any application file which is changed through patch ap
plication */
select A.FILE_ID, A.APP_SHORT_NAME, A.SUBDIR, A.FILENAME, max(B.VERSION) from AD
_FILES A, AD_FILE_VERSIONS B where A.FILE_ID = B.FILE_ID and B.FILE_ID = 86291 g
roup by A.FILE_ID, A.APP_SHORT_NAME, A.SUBDIR, A.FILENAM
/* To get information related to how many time driver file is applied for bugs *
/
select * from AD_PATCH_RUN_BUGS where BUG_ID in (select BUG_ID from AD_BUGS wher
e BUG_NUMBER = <BUG NUMBER>
/* To find latest patchset level for module installed */
select APP_SHORT_NAME, max(PATCH_LEVEL) from AD_PATCH_DRIVER_MINIPKS GROUP BY AP
P_SHORT_NAME
/* To find what is being done by the patch */
select A.BUG_NUMBER Patch Number , B. PATCh_RUN_BUG_ID Run Id ,D.APP_SHORT_NAME appl_t
op, D.SUBDIR, D.FILENAME, max(F.VERSION) latest, E.ACTION_CODE action from AD_BU
GS A, AD_PATCH_RUN_BUGS B, AD_PATCH_RUN_BUG_ACTIONS C, AD_FILES D, AD_PATCH_COMM
ON_ACTIONS E, AD_FILE_VERSIONS F where A.BUG_ID = B.BUG_ID and B.PATCH_RUN_BUG_I
D = C.PATCH_RUN_BUG_ID and C.FILE_ID = D.FILE_ID and E.COMMON_ACTION_ID = C.COMM
ON_ACTION_ID and D.FILE_ID = F.FILE_ID and A.BUG_NUMBER = <patch number> and B.PAT
CH_RUN_BUG_ID = < > and C.EXECUTED_FLAG = Y GROUP BY A.BUG_NUMBER, B.PATCH_RUN_BUG
_ID, D. APP_SHORT_NAME, D>SUBDIR, D.FILENAME, E.ACTION_CODE
/* To find Merged patch Information from database in Oracle Applications */
select bug_number from ad_bugs where bug_id in ( select bug_id from ad_comprisin
g_patches where patch_driver_id =(select patch_driver_id from ad_patch_drivers w
here applied_patch_id =&n) );
/* Second Query to know, what all has been done during application of PATCH */
Select J.PATCh_NAME, H.APPLICATIONS_SYSTEM_NAME Instance_Name, H.NAME, I.DRIVER_
FILE_NAME, D.APP_SHORT_NAME appl_top, D.SUBDIR, D.FILENAME, max(F.VERSION) lates
t, E.ACTION_CODE action from AD_BUGS A, AD_PATCH_RUN_BUGS B, AD_PATCH_RUN_BUG_AC
TIONS C, AD_FILES D, AD_PATCH_COMMON_ACTIONS E, AD_FILE_VERSIONS F, AD_PATCH_RUN
S G, AD_APPL_TOPS H, AD_PATCH_DRIVERS I, AD_APPLIED_PATCHES J where A.BUG_ID = B
.BUG_ID and B.PATCH_RUN_BUG_ID = C.PATCH_RUN_BUG_ID and C.FILE_ID = D.FILE_ID an
d E.COMMON_ACION_ID = C.COMMON_ACTION_ID and D.FILE_ID = F.FILE_ID and G.APPL_TO
P_ID = H.APPL_TOP_ID and G.PATCH_DRIVER_ID = I.PATCH_DRIVER_ID and I.APPLIED_PAT
CH_ID = J.APPLIED_PATCH_ID and B.PATCH_RUN_ID = G.PATCH_RUN_ID and C.EXECUTED_FL
AG = Y and G.PATCH_DRIVER_ID in (select PATCH_DRIVER_ID from AD_PATCH_DRIVERS wher
e APPLIED_PATCH_ID in (select APPLIED_PATCH_ID from AD_APPLIED_PATCHES where PAT
CH_NAME = <Patch Number> )) GROUP BY J.PATCH_NAME, H.APPLICATINS_SYSTEM_NAME, H.NAM
E, I.DRIVER_FILE_BNAME, D.APP_SHORT_NAME, D.SUBDIR, D.FILENAME, E.ACTION_CODE
/* Script to find out Patch level of mini Pack */
Select product_version,patch_level from FND_PROUDCT_INSTALLATIONS where patch_le
vel like %&shortname% ;
Replace short name by name of Oracle Apps Minipack for which you want to find ou
t Patch level . ex.
AD for Applications DBA
GL for General Ledger
PO Purchase Order

################################################################################
####################################
###### 4) To check profile exists or not
######
################################################################################
####################################
select PROFILE_OPTION_NAME,PROFILE_OPTION_ID,USER_PROFILE_OPTION_NAME from FND_
PROFILE_OPTIONS_VL where
UPPER(PROFILE_OPTION_NAME) like upper('%&profile_name%')
--or upper(USER_PROFILE_OPTION_NAME) like upper('%&&profile_name')

################################################################################
####################################
###### 5) for finding look up application
######
################################################################################
####################################
select APPLICATION_SHORT_NAME,LOOKUP_TYPE from FND_LOOKUP_TYPES,fnd_application
where LOOKUP_TYPE like '&LOOKUP_NAME'
and FND_LOOKUP_TYPES.APPLICATION_ID = fnd_application.APPLICATION_ID

################################################################################
####################################
##################Find out functions attached to Respective responsibilities.
##################
################################################################################
####################################

declare
v varchar2(100);
begin
for c1 in (select responsibility_id,RESPONSIBILITY_NAME from fnd_responsibility_
vl where CREATION_DATE > '01-JUN-2010' and RESPONSIBILITY_NAME like 'DEP%')
loop
dbms_output.put_line(c1.RESPONSIBILITY_NAME);
for c2 in (
SELECT prompt
FROM (SELECT menu_id, sub_menu_id, function_id,
LPAD (' ', (LEVEL - 1) * 2) || prompt prompt,
entry_sequence
FROM fnd_menu_entries_vl fme
WHERE prompt IS NOT NULL
AND not exists (
SELECT 1
FROM fnd_resp_functions
WHERE rule_type = 'M' AND application_i
d = 385 AND action_id = menu_id AND responsibility_id = c1.responsibility_id )
AND not exists (
SELECT 1
FROM fnd_resp_functions
WHERE rule_type = 'F' AND application_i
d = 385 AND action_id = function_id AND responsibility_id = c1.responsibility_i
d )
CONNECT BY PRIOR sub_menu_id = menu_id
START WITH menu_id =
(SELECT b.menu_id
FROM fnd_responsibility_vl a, fnd_menus b
WHERE responsibility_id = c1.responsibility_id
AND a.menu_id = b.menu_id
)
AND prompt IS NOT NULL
AND grant_flag = 'Y'
ORDER BY entry_sequence) a
CONNECT BY PRIOR sub_menu_id = menu_id
START WITH menu_id =
(SELECT b.menu_id
FROM fnd_responsibility_vl a, fnd_menus b
WHERE responsibility_id = c1.responsibility_id
AND a.menu_id = b.menu_id
) /*like INV_NAVIGATE*/
AND prompt IS NOT NULL)
loop

dbms_output.put_line(' '||c2.prompt);
end loop;
dbms_output.put_line(c1.RESPONSIBILITY_NAME);
dbms_output.put_line(' END OF Responsibility');
end loop;
end;
/
################################################################################
####################################
################## Find menu and submenus attached to given responsibility
##################
################################################################################
####################################
declare
v varchar2(100);
begin
for c1 in (select responsibility_id,RESPONSIBILITY_NAME from fnd_responsibility_
vl where CREATION_DATE > '01-JUN-2010' and RESPONSIBILITY_NAME like 'DEP Despatc
h Superuser Mobile')
loop
dbms_output.put_line(c1.RESPONSIBILITY_NAME);
for c2 in (
SELECT prompt1, prompt
FROM (SELECT fme.menu_id, sub_menu_id,USER_MENU_NAME prompt1,LPAD (' ', (L
EVEL - 1) * 2) || MENU_NAME prompt
frOM fnd_menu_entries_vl fme,
fnd_menus_vl fmv
WHERE prompt IS NOT NULL
AND fme.sub_menu_id=fmv.menu_id
CONNECT BY PRIOR sub_menu_id = fme.menu_id
START WITH fme.menu_id =
(SELECT b.menu_id
FROM fnd_responsibility_vl a, fnd_menus b
WHERE responsibility_id = c1.responsibility_id
AND a.menu_id = b.menu_id)
) a
CONNECT BY PRIOR sub_menu_id = menu_id
START WITH menu_id =
(SELECT b.menu_id
FROM fnd_responsibility_vl a, fnd_menus b
WHERE responsibility_id = c1.responsibility_id
AND a.menu_id = b.menu_id
) /*like INV_NAVIGATE*/
-- AND prompt IS NOT NULL
)
loop
dbms_output.put_line(c2.prompt1 ||' '||c2.prompt);
end loop;
dbms_output.put_line(c1.RESPONSIBILITY_NAME);
dbms_output.put_line(' END OF Responsibility');
end loop;
end;
/
################################################################################
####################################
######### Find menu and submenus attached to given responsibility with level de
tail number ##################
################################################################################
####################################
declare
v varchar2(100);
begin
for c1 in (select responsibility_id,RESPONSIBILITY_NAME from fnd_responsibility_
vl where CREATION_DATE > '01-JUN-2010' and RESPONSIBILITY_NAME like 'DEP%Mobile'
)
loop
dbms_output.put_line(c1.RESPONSIBILITY_NAME);
for c2 in (
SELECT prompt1,level, prompt
FROM (SELECT fme.menu_id, sub_menu_id,USER_MENU_NAME prompt1,MENU_NAME pro
mpt, LEVEL
frOM fnd_menu_entries_vl fme,
fnd_menus_vl fmv
WHERE prompt IS NOT NULL
AND fme.sub_menu_id=fmv.menu_id
CONNECT BY PRIOR sub_menu_id = fme.menu_id
START WITH fme.menu_id =
(SELECT b.menu_id
FROM fnd_responsibility_vl a, fnd_menus b
WHERE responsibility_id = c1.responsibility_id
AND a.menu_id = b.menu_id)
) a
CONNECT BY PRIOR sub_menu_id = menu_id
START WITH menu_id =
(SELECT b.menu_id
FROM fnd_responsibility_vl a, fnd_menus b
WHERE responsibility_id = c1.responsibility_id
AND a.menu_id = b.menu_id
) /*like INV_NAVIGATE*/
-- AND prompt IS NOT NULL
)
loop
DBMS_OUTPUT.ENABLE(10000);
dbms_output.put_line(C2.LEVEL||' '||c2.prompt );
end loop;
dbms_output.put_line(c1.RESPONSIBILITY_NAME);
dbms_output.put_line(' END OF Responsibility');
end loop;
end;
/
################################################################################
####################################
###### 6) To check the timeline of the reques
t
######
################################################################################
####################################
SELECT request_id, TO_CHAR( request_date, 'DD-MON-YYYY HH24:MI:SS' )
request_date, TO_CHAR( requested_start_date,'DD-MON-YYYY HH24:MI:SS' )
requested_start_date, TO_CHAR( actual_start_date, 'DD-MON-YYYY HH24:MI:SS' )
actual_start_date, TO_CHAR( actual_completion_date, 'DD-MON-YYYY HH24:MI:SS' )
actual_completion_date, TO_CHAR( sysdate, 'DD-MON-YYYY HH24:MI:SS' )
current_date, ROUND( ( NVL( actual_completion_date, sysdate ) - actual_start_dat
e ) * 24, 2 ) duration
FROM fnd_concurrent_requests
WHERE request_id = TO_NUMBER('&p_request_id');

################################################################################
####################################
###### 6) Find Trace File Name
######
################################################################################
####################################
prompt
accept request prompt 'Please enter the concurrent request id for the appropriat
e concurrent program:'
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_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;

################################################################################
####################################
###### 7) DEV60cgi/f60cgi login
######
################################################################################
####################################
7) DEV60cgi/f60cgi login
To enable DEV60cgi/f60cgi login
java oracle.apps.fnd.security.AdminAppServer apps/sysappsmay10 AUTHENTICATION O
FF DBC=ukcrp5.dbc
To disable DEV60cgi/f60cgi login
java oracle.apps.fnd.security.AdminAppServer apps/sysappsmay10 AUTHENTICATION
SECURE DBC=ukcrp5.dbc
To check status of DEV60cgi/f60cgi login

java oracle.apps.fnd.security.AdminAppServer apps/sysappsmay10 STATUS DBC=ukcrp5


.dbc
################################################################################
####################################
###### 8) To find out trace file for particula
r request id from backend ######
################################################################################
####################################

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_id
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;

Queries related to responsibility


SELECT responsibility_name,
RESPONSIBILITY_KEY,
APPLICATION_SHORT_NAME
FROM fnd_responsibility_tl frt,
fnd_responsibility fr ,
fnd_application fa
WHERE upper(responsibility_name) LIKE upper('%&resp_name%')
AND frt.RESPONSIBILITY_ID=fr.RESPONSIBILITY_ID
AND fr.APPLICATION_ID =fa.APPLICATION_ID
select 'mig_aol_gm.sh UKCRP5 ppsmrgld10a UKPRX ' ||'"' ||MENU_NAME || '"'
select menu_name,USER_MENU_NAME,responsibility_name from fnd_menus fm, fnd_menus
_tl fmt, fnd_responsibility fr ,fnd_responsibility_tl frt
where upper(responsibility_name) LIKE upper('%&resp_name%')
AND frt.RESPONSIBILITY_ID=fr.RESPONSIBILITY_ID
and fr.menu_id = fmt.menu_id
and fm.menu_id = fmt.menu_id

select REQUEST_GROUP_NAME,responsibility_name,APPLICATION_SHORT_NAME
from fnd_responsibility fr, fnd_request_groups frg, fnd_responsibility_tl frt, f
nd_application fa
where upper(responsibility_name) LIKE upper('%&resp_name%')
AND frt.RESPONSIBILITY_ID=fr.RESPONSIBILITY_ID
and fr.REQUEST_GROUP_ID = frg.REQUEST_GROUP_ID
and fa.application_id=fr.application_id

SELECT responsibility_name,
menu_name,
USER_MENU_NAME,
RESPONSIBILITY_KEY,
APPLICATION_SHORT_NAME RESP_APPLICATION_NAME,
REQUEST_GROUP_NAME,
APPLICATION_SHORT_NAME REQ_APPLICATION_NAME
FROM fnd_responsibility_tl frt,
fnd_responsibility fr ,
fnd_application fa,
fnd_menus fm,
fnd_menus_tl fmt,
fnd_request_groups frg
WHERE fr.CREATION_DATE like '%JUN-10'
and upper(responsibility_name) LIKE upper('DEP%')
AND frt.RESPONSIBILITY_ID=fr.RESPONSIBILITY_ID
AND fr.APPLICATION_ID =fa.APPLICATION_ID
AND frt.RESPONSIBILITY_ID=fr.RESPONSIBILITY_ID
AND fr.menu_id = fmt.menu_id
AND fm.menu_id = fmt.menu_id
AND fr.REQUEST_GROUP_ID = frg.REQUEST_GROUP_ID
AND fa.application_id =fr.application_id
AND frt.RESPONSIBILITY_ID=fr.RESPONSIBILITY_ID

You might also like