Monday, May 16, 2016

Script to Get Data for SR Update Apache, Java, Client JRE, Forms, Perl, PL/SQL versions and Forms communication mode & Oracle Patch information

1) Apache, Java, Client JRE, Forms, Perl, PL/SQL versions and Forms communication mode
 
#!/bin/bash
# +===========================================================================+ 
# | FILENAME 
# | Instancedetails_R12.sh 
# | 
# | DESCRIPTION 
# |   This script can be used to collect Apache, Jserv, Forms, Jinitiator and   
# |   Perl version in E-Business suite R12 
# | 
# | PLATFORM 
# | Unix Generic, Linux, HP-UX,IBM AIX, Sunsolaris  
# | 
# | NOTES 
# |   Before running the script ensure that you have sourced the environment  
# |   by running APPS_host.env file from $APPL_TOP.   
# | 
# | HISTORY 
# |   Version 1.0
# +===========================================================================+ 
# 
#--------------------------------------------------------------------
# CONSTANTS

TEMP_FILE=/tmp/`hostname`_`date +%m%d%y.%H%M`.txt
ID1=dba@oncalldba.com

#--------------------------------------------------------------------
# MAIN
( 
echo "Script Started " 
date 
## The script shows output on screen and creates file named ${TEMP_FILE} file in /tmp  ## directory 
## Collect the Apache version 
echo "*****Apache Version*****" 
$IAS_ORACLE_HOME/Apache/Apache/bin/httpd -v 
echo " " 
## Collect perl version 
echo "*****perl version******" 
$IAS_ORACLE_HOME/perl/bin/perl -v|grep built 
echo " " 
## Collect Java version 
echo "******Java Version******" 
sh -c "`awk -F= '$1 ~ /^JSERVJAVA.*$/ {print $2}' $ADMIN_SCRIPTS_HOME/java.sh` -version;" 
echo " " 
## Collect client JRE version 
echo "*****Client JRE version*****" 
cat $FORMS_WEB_CONFIG_FILE|grep sun_plugin_version| cut -c 1-35 
echo " " 
## Collect Forms version 
echo "*****Forms Version*****" 
$ORACLE_HOME/bin/frmcmp_batch|grep Forms| grep Version 
echo " " 
## Collect PL/SQL Version 
echo "*****PL/SQL Version****" 
$ORACLE_HOME/bin/frmcmp_batch|grep PL/SQL|grep Version 
echo " " 
## Collect Forms communication mode 
echo "****Forms Communication Mode****" 
cat $FORMS_WEB_CONFIG_FILE|grep serverURL= 
echo "If the serverURL parameter has no value then Forms is implemented in socket mode else it is servlet" 
echo " " 
echo "Script Completed Successfully and it has generated the file  ${TEMP_FILE} in /tmp directory" 
echo "Script completed " 
date 
) 2>&1 | tee $TEMP_FILE
###
### END OF SCRIPT
###
# Use This to get the File to Inbox
uuencode $TEMP_FILE $TEMP_FILE |mail -s "${TWO_TASK} Details for SR Update" $ID1
# This Can be used if Mailx is activated for the host
2) Oracle Home & OPatch Information
 
#!/bin/bash
#===================================================================#
#                                                                   #
# Name     : sr_update.sh                                           #
# Synopsis : Gathers the  Host info and ORACLE_HOME & OPatch        #
#            Information and Stores in to File.                     #
#                                                                   #
#===================================================================#
#--------------------------------------------------------------------
# CONSTANTS

TEMP_FILE=/tmp/sr_update.txt
ID1=dba@oncalldba.com

#--------------------------------------------------------------------
# MAIN

echo "############ BEGIN INFO GATHERING ############" > $TEMP_FILE 
echo "[Date]: " `date` >> $TEMP_FILE 
echo "" >> $TEMP_FILE 
echo "------------- ORACLE HOME Info ----------------" >> $TEMP_FILE 
echo "" >> $TEMP_FILE 
echo "[ORACLE_HOME]: "$ORACLE_HOME >> $TEMP_FILE 
echo "" >> $TEMP_FILE 
echo "------------ Machine Info ------------" >> $TEMP_FILE 
echo "" >> $TEMP_FILE 
echo "[Name]: " `uname -an` >> $TEMP_FILE 
echo "" >> $TEMP_FILE 
echo "----------- ORACLE_HOME Patch Info -------------" >> $TEMP_FILE 
echo "" >> $TEMP_FILE 
$ORACLE_HOME/OPatch/opatch lsinventory -details -invPtrLoc \ 
$ORACLE_HOME/oraInst.loc >> $TEMP_FILE 
echo "" >> $TEMP_FILE 
echo "############ END INFO GATHERING ############" >> $TEMP_FILE 
echo "" >> $TEMP_FILE 

# Use This to get the File to Inbox
uuencode $TEMP_FILE $TEMP_FILE |mail -s "${ORACLE_SID} Details for SR Update" $ID1
# This Can be used if Mailx is activated for the host


Metalink Note ID's R12 : -- Script to find Apache, Java, JRE, Forms version for Oracle E-Business Suite R12 (Doc ID 468311.1) 11i/R12 : -- Utility /Script To Check The Techstack Component Versions (Forms, Http Server, JDK, Framework, Database, etc) (Doc ID 601736.1) ~~ Cheers

No comments :

Post a Comment