whatprofile
What EBusiness Suite Profile Options and Profile Values.
What EBusiness Suite Profile Options are set at Site/Application/Responsibility/User.
Example:
#---------------------------------------------------------------#
#- eBusiness Suite 12.1 (whatprofile) -#
#---------------------------------------------------------------#
28-MAY-13 OATC (oratest) Profile Values
18:07:59 Sorted by ProfileName
User Last
Profile Profile Profile Update Profile
Name Name Level Context Date Value
--------------- ---------- ---------- ---------- --------- ---------------
OS: Site Use AS_SITE_US Site 04-MAY-00 MARKET
E
Site Name SITENAME Site 15-APR-13 OATC Oracle
12.1 CRP1
(Cloned From
PROD 20May2013)
By the way, this script can be used to keep a HISTORY of PROFILE values.
Each time this script executes and the Script-Search-Criteria is “%” a complete
list of ALL E-Business Suite Profile-Values is created in the /tmp Directory.
So, you can easily see if a Profile-Option has been changed.
#!/usr/bin/ksh
#whatprofile ()
#-----------------------------------------------------------------------#
# Module Name: whatprofile (c) Copyright May 2012 #
# #
# Purpose: Report on the eBusiness Suite Profile Values. #
# #
# Maintenance #
# Date Author Description #
# ----------- ------------ ------------------------------------- #
# 10-May-2012 M.Barone Module design/creation #
#-----------------------------------------------------------------------#
{
DIRNAM=$(dirname $0)
ORASID=$(echo $CONTEXT_NAME | cut -f1 -d'_')
HNAME=$(uname -n)
#---------------------------------------------------------------#
# TEST: Number ($#) of arguments passed to this function? #
#---------------------------------------------------------------#
if [ $# = 0 ]
then
clear
echo
echo " #---------------------------------------------------#"
echo " # whatprofile: Oracle Apps Profiles #"
echo " #---------------------------------------------------#"
echo
#------------------------------------------------------------#
# Trap: Set CNTL-C CNTL-D CNTL-\ Before Password Protection #
#------------------------------------------------------------#
trap "stty echo; return" 2
trap "stty echo; return" 3
stty -echo
read PASSWD?" Please Enter the Oracle [APPS Passwd]: "
stty echo
echo
#------------------------------------------------------------#
# Trap: Reset CNTL-C CNTL-D CNTL-\After Password Protection #
#------------------------------------------------------------#
trap 2
trap 3
read PROFNM?" Enter the Oracle [Profile-Name]: "
clear
else
PASSWD=$1
clear
fi
#-----------------------------------------------------------------------#
# Initialize #
#-----------------------------------------------------------------------#
SPOOLNM=/tmp/whatprofile_$$.txt
#-----------------------------------------------------------------------#
# SQL*Plus ("Here-Document") #
#-----------------------------------------------------------------------#
sqlplus -s /nolog <<-END_FILE
CONNECT APPS/$PASSWD
set pagesize 9000
set feedback off
set flush on
set heading on
set pause off
set space 1
set termout on
set verify on
set linesize 80
set pagesize 999
SPOOL ${SPOOLNM}
clear BREAKS
clear BUFFER
clear COLUMNS
clear COMPUTES
clear SCREEN
clear SQL
clear TIMING
prompt #--------------------------------------------------------#
prompt #- eBusiness Suite (whatprofile) -#
prompt #--------------------------------------------------------#
COLUMN datevalue NOPRINT NEW_VALUE DATEVAR
COLUMN timevalue NOPRINT NEW_VALUE TIMEVAR
COLUMN upname FORMAT A21 HEADING 'User|Profile|Name' WORD_WRAPPED
COLUMN pvname FORMAT A10 HEADING 'Profile|Name' WORD_WRAPPED
COLUMN lvlset FORMAT A10 HEADING 'Profile|Level' WORD_WRAPPED
COLUMN vcntxt FORMAT A10 HEADING 'Context' WORD_WRAPPED
COLUMN vupdat FORMAT A9 HEADING 'Last|Update|Date' WORD_WRAPPED
COLUMN vvalue FORMAT A15 HEADING 'Profile|Value' WORD_WRAPPED
TTITLE CENTER '${ORASID} (${HNAME}) Profile Values' -
LEFT DATEVAR skip 1 -
CENTER 'Sorted by ProfileName' -
LEFT TIMEVAR skip 2
SELECT TO_CHAR(sysdate, 'DD-MON-YY') datevalue,
TO_CHAR(sysdate, 'HH24:MI:SS') timevalue,
ptl.user_profile_option_name upname,
pro.profile_option_name pvname,
DECODE(val.level_id,
10001, 'Site',
10002, 'Application',
10003, 'Responsibility',
10004, 'User',
10005, 'Server',
10007, 'SERVRESP',
'UnDef') lvlset,
DECODE(to_char(val.level_id),
'10001', '',
'10002', app.application_short_name,
'10003', rsp.responsibility_key,
'10005', svr.node_name,
'10006', org.name,
'10004', usr.user_name,
'10007', 'Serv/resp',
'UnDef') vcntxt,
TO_CHAR(val.last_update_date,'DD-MON-RR') vupdat,
val.profile_option_value vvalue
FROM fnd_profile_options pro,
fnd_profile_option_values val,
fnd_profile_options_tl ptl,
fnd_user usr,
fnd_application app,
fnd_responsibility rsp,
fnd_nodes svr,
hr_operating_units org
WHERE pro.profile_option_id = val.profile_option_id (+)
AND pro.profile_option_name = ptl.profile_option_name
AND ptl.language = 'US'
and upper(ptl.user_profile_option_name) like
upper('%${PROFNM}%')
and usr.user_id (+) = val.level_value
and rsp.application_id (+) =
val.level_value_application_id
and rsp.responsibility_id (+)= val.level_value
and app.application_id (+) = val.level_value
and svr.node_id (+) = val.level_value
and org.organization_id (+) = val.level_value
ORDER BY 1,3,4;
EXIT;
END_FILE
Appendix- whaprofile script (continued)
print
print "Please see /tmp/whatprofile_$$.txt"
print
}
No comments:
Post a Comment