
Installgen
Features and Benefits
Installgen
Demo Available for download...

#! /bin/sh
# script: 52_sol_901_patch_db_1.sh
# Features: This shell script applies the 9.0.1.3.0 patch
# to the Oracle 9.0.1 (32bit) database.
#
# Script Sequence#: 52
# Used By: run via 9_sol_901_ora_post_install_1.sh script as oracle UNIX user
# Copyright 2002 by .com Solutions Inc.
#
# ---------------------- Revision History ---------------
# Date By Changes
# 9-29-2001 dsimpson Initial Release
# 11-06-2001 dsimpson Added commands for 32 bit patch 9.0.1.1
# 11-24-2001 dsimpson Updated commands for 32 bit patch 9.0.1.2
# 04-30-2002 dsimpson Updated commands for 32 bit patch 9.0.1.3.0
# This output file was created by Installgen version 1.38 on Sun Nov 10 14:51:56 2002. By .com Solutions Inc. www.dotcomsolutionsinc.net
# define globally used paths/variables
ORACLE_OWNER=oracle
ORACLE_OWNER_PATH=/export/oracle
ORACLE_GROUP=dba
ORACLE_HOME=/u01/v901
ORACLE_SID=prod1
ORA_BDUMP_DIR=/u01/bdump
LD_LIBRARY_PATH=/u01/v901/lib:/u01/v901/lib64:/usr/dt/lib
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
# 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
# shut down the database during the patch install
$ORACLE_HOME/bin/sqlplus /nolog<< EOF
connect / as SYSDBA
shutdown immediate
exit;
EOF
# install Oracle 32 bit patch 9.0.1.3.0 for Solaris
# the patch file p2271678_9013_SOLARIS.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
/bin/unzip p2271678_9013_SOLARIS.zip
tar xvf 9013_Solaris32_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_901_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_901_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
-- if the catpatch.sql script is not found, then the installer has not finished running
ALTER SYSTEM SET "_system_trig_enabled"=FALSE SCOPE=MEMORY;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0 SCOPE=MEMORY;
ALTER SYSTEM SET AQ_TM_PROCESSES=0 SCOPE=MEMORY;
ALTER SYSTEM SET NLS_LENGTH_SEMANTICS=BYTE SCOPE=MEMORY;
ALTER SESSION SET EVENTS '10520 TRACE NAME CONTEXT FOREVER, LEVEL 10';
-- catpatch.sql replaces running of catalog.sql and catproc.sql
@/u01/v901/rdbms/admin/catpatch.sql
ALTER SYSTEM DISABLE RESTRICTED SESSION;
@/u01/v901/ctx/admin/s0900013.sql
ALTER USER ctxsys IDENTIFIED BY re-ulh ACCOUNT UNLOCK;
CONNECT ctxsys/re-ulh
@/u01/v901/ctx/admin/dr0pkh.sql
@/u01/v901/ctx/admin/dr0plb.sql
@/u01/v901/ctx/admin/dr0type.plb
@/u01/v901/ctx/admin/dr0typec.plb
@/u01/v901/ctx/admin/dr0typer.plb
CONNECT / AS SYSDBA
update obj$ set status=5 where type#=29 and owner#!=0;
commit;
shutdown immediate
startup
CONNECT / AS SYSDBA
ALTER SYSTEM SET "_system_trig_enabled"=FALSE SCOPE=MEMORY;
@/u01/v901/javavm/install/jvmursc.sql
CONNECT / AS SYSDBA
@/u01/v901/xdk/admin/initxml.sql
@/u01/v901/xdk/admin/xmlja.sql
ALTER USER wksys IDENTIFIED BY re-ulh ACCOUNT UNLOCK;
@/u01/v901/ultrasearch/admin/wk0csys.sql re-ulh ctxsys wksys DRSYS TEMP
@/u01/v901/rdbms/admin/utlrp.sql
shutdown immediate
startup
exit;
EOF

