Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Security patch 68

Security patch 68

From: Yechiel Adar <adar76_at_inter.net.il>
Date: Mon, 27 Sep 2004 19:38:17 +0200
Message-ID: <001101c4a4b8$da0adfe0$c701a8c0@sys3>


These are two files that I develop to install the security 68 patches for 9.2.0.5 on win2000.
The sql file is at the bottom and it is run from the batch file. The run assume that an oracle database exist and need to patch. The batch file will install the first patch, run all the sql scripts needed and install the second patch.
Check that my mail did not warp lines before you run it.

Batch file:

echo off
rem unzip patch 3738339 to
file_server\oracle_install\9.2.0.5.3_unzipped\3738339 rem unzip patch 3847290 to file_server\oracle_install\9.2.0.5.3_2_unzipped

cd /d %4:\9.2.0.5.3_2_unzipped

rem check parameters

if x%1 == x goto usage
if x%2 == x goto usage
if x%3 == x goto usage
if x%4 == x goto usage
if x%5 == x goto usage

rem check parameters and echo usage.
echo make sure that all oracle services are down. you will get copy errors otherwise.
echo also make sure that there are no active applications using oracle. echo make sure that the drive letter %4 is not used on this computer pause press any key to continue

echo on

rem assign drive letter to patch and copy new opatch rem you can run this part again because in the second run the rename and md fails
rem and it just copy the new opatch again.

net use %4: \\file_server\oracle_install cd /d %1
rename opatch opatchold
md opatch
cd opatch
xcopy /Y /E %4:\opatch

rem patch 3738339

rem set path, oracle home, sid and apply patch. set path=%cd%;%path%
set oracle_home=%1
set oracle_sid=%2
cd /d %4:\9.2.0.5.3_unzipped\3738339

rem goto second unrem this line to run only the second patch.

rem if the patch installed ok and the scripts failed later just rem the next line on rerun

call opatch apply %4:\9.2.0.5.3_unzipped\3738339

echo check apply results. press any key to continue. press ctrl-C to stop. pause

rem now start the database and run scripts lsnrctl start listener
oradim -startup -sid %2 -STARTTYPE srvc,inst cd /d %1\rdbms\admin
sqlplus "/ as sysdba" @%4:opatch_3738339_1.sql %3

rem - patch 3847290

cd /d %4:\9.2.0.5.3_2_unzipped
call patch.cmd -m sysobjects -o %1 -c "sys as sysdba" -p %5 call patch.cmd -m midtier -o %1
cd /d %1
goto end

:usage
echo usage:
echo activate this patch with the following parameters:

echo  1) oracle home, including the drive letter: c:\oracle\ora92
echo  2) oracle sid
echo  3) ctxsys password
echo  4) drive letter to connect to file_server
echo  5) sys password

:end
net use %4: /delete
Echo opatch run finished



SQLFILE opatch_3738339_1.sql :

set echo on
spool patch68.log
shutdown immediate
startup migrate
set echo off
@prvtstas.plb
@prvtstat.plb
@catproc.sql
@dbmsiotc.sql

alter user ctxsys account unlock;
alter user ctxsys identified by &1;
connect ctxsys/&1
@..\..\ctx\Admin\dr0out.plb

connect / as sysdba
alter user ctxsys account lock;
alter user ctxsys password expire;
alter session set current_schema=MDSYS;
@..\..\md\admin\sdolrsmd.sql
@..\..\md\admin\prvtgmd.plb

shutdown
startup
@prvtpexp.plb

Exit

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Sep 27 2004 - 11:41:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US