whatregistryhistory (DBTier Script: executes using -- sqlplus / as sysdba)
What EBusiness Suite Database Registry History, Installation/Update/CPUs/PSUs.
Patch Set Updates (PSUs) are proactive cumulative patches containing recommended
bug fixes that are released on a regular and predictable schedule. PSUs are on the same quarterly
schedule as the Critical Patch Updates (CPU), specifically the Tuesday closest to the 17th of January,
April, July, and October.
Critical Patch Updates are collections of security fixes for Oracle products. They are available to
Critical Patch Updates are collections of security fixes for Oracle products. They are available to
customers with valid support contracts. They are released on the Tuesday closest to the 17th day of
January, April, July and October.
Example:
#---------------------------------------------------------------#
#- What (whatregistryhistory) -#
#---------------------------------------------------------------#
06-JUN-13 OATC (oratest) Oracle Registry History
11:24:59 EBusiness Oracle Database History
Action Bundle
Time Version Action Name Space ID Comments Series
--------- ---------- ------- ---------- ---- ----------------- ----------
25-DEC-12 11.2.0.3.0 UPGRADE SERVER Upgraded from
02.01.20 11.1.0.7.0
26-DEC-12 11.2.0.3 APPLY SERVER 0 Patchset PSU
05.06.17 11.2.0.2.0
26-DEC-12 11.2.0.3 APPLY SERVER 1 PSU 11.2.0.3.1 PSU
07.23.13
#!/usr/bin/ksh
#whatregistryhistory ()
#-----------------------------------------------------------------------#
# Module Name: whatregistryhistory (C) Copyright 2012 #
# #
# Purpose: Report on DBA Registry History (Upgrades/CPUs/PSUs) #
# #
# Maintenance #
# Date Author Description #
# ----------- ------------ ------------------------------------- #
# 10-May-2012 R.Kab 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 " # whatregistryhistory: Oracle Database History #"
echo " #--------------------------------------------------#"
echo
print
echo " Connecting as SYSDBA"
sleep 2
clear
else
SEARCH=$1
clear
fi
ORANAM=${ORASID}
#-----------------------------------------------------------------------#
# Initialize #
#-----------------------------------------------------------------------#
SPOOLNM=/tmp/whatregistryhistory_$$.txt
Appendix- whatregistryhistory script (continued)
#-----------------------------------------------------------------------#
# SQL*Plus ("Here-Document") #
#-----------------------------------------------------------------------#
sqlplus -s /nolog <<-END_FILE
CONNECT / as SYSDBA
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 (whatregistryhistory) -#
prompt #--------------------------------------------------------#
COLUMN datevalue NOPRINT NEW_VALUE DATEVAR
COLUMN timevalue NOPRINT NEW_VALUE TIMEVAR
COLUMN rhtime format A9 HEADING 'Action|Time' WORD_WRAPPED
COLUMN rhvers format A10 HEADING 'Version' WORD_WRAPPED
COLUMN rhactn format A7 HEADING 'Action' WORD_WRAPPED
COLUMN rhname format A10 HEADING 'Name Space' WORD_WRAPPED
COLUMN rhidnm format 9999999999 HEADING 'ID' WORD_WRAPPED
COLUMN rhcomm format A17 HEADING 'Comments' WORD_WRAPPED
COLUMN rhbser format A10 HEADING 'Bundle|Series' WORD_WRAPPED
TTITLE CENTER '${ORASID} (${HNAME}) Oracle Registry History ' -
LEFT DATEVAR skip 1 -
CENTER 'eBusiness Oracle Database History' -
LEFT TIMEVAR skip 2
alter session set NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
Appendix- whatregistryhistory script (continued)
SELECT TO_CHAR(sysdate, 'DD-MON-YY') datevalue,
TO_CHAR(sysdate, 'HH24:MI:SS') timevalue,
substr(action_time, 1,18) rhtime,
version rhvers,
action rhactn,
namespace rhname,
id rhidnm,
comments rhcomm,
bundle_series rhbser
FROM REGISTRY\$HISTORY
ORDER BY action_time;
END_FILE
print
print "Please see /tmp/whatregistryhistory_$$.txt"
print
}
No comments:
Post a Comment