
Installgen
Features and Benefits
Installgen
Demo Available for download...
Bookmark This Page

#!/bin/sh
# script: 52_sol_920_patch_db_1.sh
# Features: This shell script applies the 9.2.0.2 patch
# to the Oracle 9.2.0 (64bit) database.
#
# Script Sequence#: 52
# Used By: run via 9_sol_920_ora_post_install_1.sh script as oracle UNIX user
# Copyright 2002 by .com Solutions Inc.
#
# ---------------------- Revision History ---------------
# Date By Changes
# 10-30-2002 dsimpson Initial Release
# This output file was created by Installgen version 1.38 on Sun Nov 10 14:20:50 2002. By .com Solutions Inc. www.dotcomsolutionsinc.net
# define globally used paths/variables
ORACLE_BASE=/u01/v901
ORACLE_HOME=/u01/v901
ORACLE_OWNER=oracle
ORACLE_OWNER_PATH=/export/oracle
ORACLE_GROUP=dba
ORACLE_HOME=/u01/v901
ORACLE_SID=prod1
LD_LIBRARY_PATH=/u01/v901/lib:/u01/v901/lib64:/usr/dt/lib
CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
ORAENV_ASK=NO
TNS_ADMIN=$ORACLE_HOME/network/admin
PATH=/usr/sbin/:/bin:/usr/bin:/usr/ccs/bin:/usr/ucb/bin:/usr/ucb:/usr/openwin/bin:/usr/dt/bin:/usr/local/bin:/opt/bin:/usr/opt/SUNWmd/sbin:/usr/platform/sun4u/sbin:/opt/sfw/bin:.:/usr/local/sbin:/u01/v901/bin
TERM=vt100
NLS_LANG=AMERICAN_AMERICA.US7ASCII
export ORACLE_OWNER ORACLE_OWNER_PATH ORACLE_GROUP ORACLE_HOME ORACLE_SID ORA_BDUMP_DIR LD_LIBRARY_PATH PATH ORAENV_ASK TNS_ADMIN TERM NLS_LANG
# make sure the oracle user is running this script
if [ ! $LOGNAME = "$ORACLE_OWNER" ]
then
# the user running this script is not $ORACLE_OWNER - exit
echo "You must be logged in as the $ORACLE_OWNER user to run this script, exiting...."
# exit immediately!
exit
fi
echo "Before installing this patch, the following requirements must be met:"
echo "1) The Shared Pool must be greater than 150Mb."
echo "2) The SYSTEM tablespace must have at least 10Mb of free space."
echo ""
echo "Please press the Return key to continue."
read answer
# shut down the database during the patch install
$ORACLE_HOME/bin/sqlplus /nolog<< EOF
connect / as SYSDBA
shutdown immediate
exit;
EOF
# the patch file p2632931_9202_SOLARIS64.zip will have already been copied to the /export/oracle directory
# prior to the running of this patch, the default database passwords will have already been changed
echo "Uncompressing p2632931_9202_SOLARIS64.zip patch file"
/bin/unzip p2632931_9202_SOLARIS64.zip
echo "Untarring 9202_Solaris64_release.tar file"
tar xvf 9202_sparc64_release.tar
echo ""
echo "Stopping the Oracle Intelligent agent during the install..."
$ORACLE_HOME/bin/agentctl stop
echo "Stopping the Oracle Listener during the install..."
$ORACLE_HOME/bin/lsnrctl stop
echo ""
echo ""
echo "Running xhost + localhost so Java installer can run."
echo ""
xhost + localhost
echo ""
echo "*************************************************"
echo "Please wait for the Oracle Java installer to complete running."
echo "The Oracle installer will run in silent mode to install the patch."
echo ""
echo "After the Oracle installer completes, please press the Return key to continue."
echo ""
echo "*************************************************"
# run the Oracle Java-based installer in silent mode to install the patch
/u01/v901/bin/runInstaller -responseFile /export/oracle/68_sol_920_patch9202_response_1.rsp -silent
read answer
echo ""
echo "Re-starting the Oracle Intelligent agent..."
$ORACLE_HOME/bin/agentctl start
echo "starting the Oracle Listener..."
$ORACLE_HOME/bin/lsnrctl start
echo ""
# copy spnc_makefile again - because it got replaced by the installer
mv $ORACLE_HOME/plsql/spnc_makefile.mk $ORACLE_HOME/plsql/orig-spnc_makefile.mk
cp /export/oracle/63_sol_920_spnc_makefile.mk $ORACLE_HOME/plsql/spnc_makefile.mk
# run the post install commands on the database
$ORACLE_HOME/bin/sqlplus /nolog<< EOF
connect / as SYSDBA
startup migrate
spool patch.log
-- if the catpatch.sql script is not found, then the installer has not finished running
-- catpatch.sql replaces running of catalog.sql and catproc.sql
@/u01/v901/rdbms/admin/catpatch.sql
spool off
-- check spool file and re-run catpatch.sql again after correcting any problems
shutdown immediate
startup
@/u01/v901/rdbms/admin/utlrp.sql
exit;
EOF

