What E-Business Suite Products are Installed/Shared/Uninstalled:
#!/usr/bin/ksh
# whatinstalled ()
#-----------------------------------------------------------------------#
# Module Name: whatinstalled #
# #
# Purpose: Report on the eBusiness Suite Installed Products. #
# #
# Maintenance #
# Date Author Description #
# ----------- ------------ ------------------------------------- #
# 10-Oct-2009 M.Barone Module design/creation #
#-----------------------------------------------------------------------#
{
DIRNAM=$(dirname $0)
ORASID=$(echo $CONTEXT_NAME | cut -f1 -d'_')
HNAME=$(uname -n)
clear
echo
echo " #------------------------------------------------------#"
echo " # whatinstalled: Oracle eBusiness Installed Products #"
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 _[7mAPPS_[0m Passwd: "
stty echo
echo
#---------------------------------------------------------------#
# Trap: Reset CNTL-C CNTL-D CNTL-\ After Password Protection #
#---------------------------------------------------------------#
trap 2
trap 3
clear
ORANAM=${ORASID}
#-----------------------------------------------------------------------#
# Initialize #
#-----------------------------------------------------------------------#
SPOOLNM=/tmp/whatinstalled_$$.txt
#-----------------------------------------------------------------------#
# SQL*Plus ("Here-Document") #
#-----------------------------------------------------------------------#
sqlplus -s /nolog <<-END_FILE
CONNECT APPS/$PASSWD
SPOOL ${SPOOLNM}
clear BREAKS
clear BUFFER
clear COLUMNS
clear COMPUTES
clear SCREEN
clear SQL
clear TIMING
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
prompt #--------------------------------------------------------#
prompt #- What (whatinstalled) -#
prompt #--------------------------------------------------------#
COLUMN datevalue NOPRINT NEW_VALUE DATEVAR
COLUMN timevalue NOPRINT NEW_VALUE TIMEVAR
COLUMN sname format A8 HEADING 'App|Short|Name' WORD_WRAPPED
COLUMN aname format A48 HEADING 'Application Name' WORD_WRAPPED
COLUMN stats format A14 HEADING 'Install|Status' WORD_WRAPPED
TTITLE CENTER '${ORASID} (${HNAME}) Apps Installed Products ' -
LEFT DATEVAR skip 1 -
CENTER 'eBusiness Suite' -
LEFT TIMEVAR skip 2
alter session set NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
SELECT TO_CHAR(sysdate, 'DD-MON-YY') datevalue,
TO_CHAR(sysdate, 'HH24:MI:SS') timevalue,
application_short_name sname,
application_name aname,
DECODE(status, 'I', 'Installed',
'S', 'Shared',
'N', 'Not Installed',
status) stats
FROM fnd_application_vl fa,
fnd_product_installations fpi
WHERE fpi.application_id = fa.application_id
ORDER BY 1;
EXIT;
END_FILE
print
print "Please see /tmp/whatinstalled_$$.txt"
print
}
No comments:
Post a Comment