.com Solutions Inc. - logo  
Products - Header Buttons
.
Repgen bullet item 7b Installgen bullet item 7b FmPro Migratorbullet item 7b CGIScripter
.
.
.

.
.

Installgen - win901 - Title Graphic

Installgen Features and Benefits

Installgen Demo Available for download...

Bookmark This Page

email a friend

.

#! /usr/local/bin/perl
# script: 52_win_901_patch_db_1.pl
# Features: This Perl script applies the 9.0.1.3.1 patch to the
# 32bit Oracle 9.0.1.1 database on Windows NT/2000.
#
# Script Sequence#: 52
# Used By: run via 4_win_901_postinstall_1.pl script as part of the post-install process
# Copyright 2002 by .com Solutions Inc.
#
# ---------------------- Revision History ---------------
# Date By Changes
# 04-24-2002 dsimpson Initial Release

# This output file was created by Installgen version 1.38 on Thu Nov 14 17:16:25 2002. By .com Solutions Inc. www.dotcomsolutionsinc.net

use strict;

my $answer='';
my @proglist = '';
my $temp_sql_filename = "tempsql.sql";
my $tempsqlcode="";

# make sure the Administrator user is running this script
my ($login_name) = Win32::LoginName;

if ($login_name ne "Administrator")
{
# the user running this script is not Administrator - exit
print "You must be logged in as the Administrator user to run this script, exiting....";
# exit immediately!
die
}

# shut down the database during the patch install
my $tempsqlcode=<<"EOF";
connect / as SYSDBA
shutdown immediate
exit;
EOF

open (FILE1,">$temp_sql_filename") || die ("Could not open output file $temp_sql_filename for writing. \n Does the full directory path exist?");
print FILE1 ($tempsqlcode);
# close the output file
close (FILE1);
# stop the service
@proglist = ("net stop OracleServiceprod3");
system (@proglist);
# start the service
@proglist = ("net start OracleServiceprod3");
system (@proglist);
# now shut down the instance
@proglist = ("c:\\v901\\bin\\sqlplus.exe /nolog \@$temp_sql_filename");
system (@proglist);

# install Oracle 32 bit patch 9.0.1.3.1 for Windows
# the patch file p2271678_9013_WINNT.zip file will have already been copied to the c:\oracle directory
# prior to the running of this patch, the default database passwords will have already been changed
print "\n\n";
print "WinZip will now be run in order to uncompress the p2271678_9013_WINNT.zip patch file.";
print "This file should be uncompressed into the c:\\oracle directory as 90131_nt_release.exe.\n";
print "\n";
print "Please press the Return key to run WinZip.\n";
print "\n\n";
$answer = ;
@proglist = ('c:\\oracle\\p2271678_9013_WINNT.zip');
system (@proglist);

print "\n\n";
print "WinZip will now be run again in order to uncompress the 90131_nt_release.exe patch file.";
print "This file needs to be uncompressed into the c:\\oracle\\Disk1 folder.\n";
print "\n";
print "Please press the Return key to run WinZip.\n";
print "\n\n";
# create folder Disk1 since the self extracting WinZip file does not do this automatically.
@proglist = ("mkdir c:\\oracle\\Disk1");
system (@proglist);

$answer = ;
@proglist = ("c:\\oracle\\90131_nt_release.exe");
system (@proglist);

print "\n";
print "Please press the Return key to continue.\n";
print "\n\n";
$answer = ;

print "\n\n";
print "Stopping the Oracle Intelligent agent during the install...
";
@proglist = ("c:\\v901\\bin\\agentctl.exe stop");
system (@proglist);
print "Stopping the Oracle Listener during the install...
";
@proglist = ("c:\\v901\\bin\\lsnrctl.exe stop");
system (@proglist);
print "\n\n";

print "\n\n";
print "*************************************************\n";
print "Please wait for the Oracle Java installer to complete running.\n";
print "The Oracle installer will run in silent mode.\n";
print "\n\n";
print "After the Oracle installer completes, please press the Return key to continue.\n";
print "\n";
print "*************************************************\n";
print "\n\n";
# run the Oracle Java-based installer in silent mode to install the patch
@proglist = ("c:\\oracle\\901_cd1\\install\\win32\\setup.exe -responseFile c:\\oracle\\68_win_901_patch9013_response_1.rsp -silent");
system (@proglist);
$answer = ;

print "\n\n";
print "Re-starting the Oracle Intelligent agent...\n";
@proglist = ("c:\\v901\\bin\\agentctl.exe start");
system (@proglist);
print "starting the Oracle Listener...\n";
@proglist = ("c:\\v901\\bin\\lsnrctl.exe start");
system (@proglist);
print "\n\n";

# stop the service
@proglist = ("net stop OracleServiceprod3");
system (@proglist);
# add 60 second delay to insure previous task completes
sleep(60);
# start the service
@proglist = ("net start OracleServiceprod3");
system (@proglist);
# run the post install commands on the database
my $tempsqlcode=<<"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';
\@c:\\v901\\rdbms\\admin\\catpatch.sql
ALTER SESSION SET EVENTS '10520 TRACE NAME CONTEXT OFF';
ALTER SYSTEM DISABLE RESTRICTED SESSION;
\@c:\\v901\\ctx\\admin\\s0900013.sql
ALTER USER ctxsys IDENTIFIED BY ctxsys ACCOUNT UNLOCK;
CONNECT ctxsys/ctxsys
\@c:\\v901\\ctx\\admin\\dr0pkh.sql
\@c:\\v901\\ctx\\admin\\dr0plb.sql
\@c:\\v901\\ctx\\admin\\dr0type.plb
\@c:\\v901\\ctx\\admin\\dr0typec.plb
\@c:\\v901\\ctx\\admin\\dr0typer.plb
CONNECT / AS SYSDBA
update obj\$ set status=5 where type#=29 and owner#!=0;
commit;
shutdown immediate
startup
host net start OracleServiceprod3
CONNECT / AS SYSDBA
ALTER SYSTEM SET "_system_trig_enabled"=FALSE SCOPE=MEMORY;
CONNECT / AS SYSDBA
\@c:\\v901\\javavm\\install\\jvmursc.sql
CONNECT / AS SYSDBA
\@c:\\v901\\xdk\\admin\\initxml.sql
\@c:\\v901\\xdk\\admin\\xmlja.sql
connect / as SYSDBA
ALTER USER wksys IDENTIFIED BY wksys ACCOUNT UNLOCK;
\@c:\\v901\\ultrasearch\\admin\\wk0csys.sql ctxsys ctxsys wksys DRSYS TEMP

\@c:\\v901\\rdbms\\admin\\utlrp.sql
host net stop OracleServiceprod3
host net start OracleServiceprod3
exit;
EOF

open (FILE1,">$temp_sql_filename") || die ("Could not open output file $temp_sql_filename for writing. \n Does the full directory path exist?");
print FILE1 ($tempsqlcode);
# close the output file
close (FILE1);
@proglist = ("c:\\v901\\bin\\sqlplus.exe /nolog \@$temp_sql_filename");
system (@proglist);



.

hline

. .

.

. .
 

Home | Products | Services | Downloads | Order | Support | Contact

Legal Notices

.
.   .
.
Home Products Services Downloads Order Support Contact