opatch – make sure there's no space on the end of TRUE

I’ve been having problems with opatch.

Setting ACTIVE_STATE_PERL=TRUE cured at least one of these (although I’m not sure that I didn’t patch at least once without the setting, because there was another version of perl – mksnt – one the server) as per the previous post

Its sometimes failed then worked without me being entirely sure what I changed in the meantime.

Last night I sussed that at least some of this is caused by having a space following the ACTIVE_STATE_PERL=TRUE

This is a stupid, but unlikely mistake – certainly a problem with the wetware, but it’s not easy to spot and it cost me a lot of time (and grief).

The following test case does the following:

1) Sets the other variables
2) Sets ACTIVE_STATE_PERL=TRUE with a trailing space on the end of true
3) echos the variable back to display the space
4) runs opatch -lsinventory and it fails
5) Re-sets ACTIVE_STATE_PERL=TRUE with the trailing space removed
6) runs opatch -lsinventory and it succeeds

-some other variables. Allegedly the case of the D: is significant
set ORACLE_HOME=D:ORACLEORA92
set PERL5LIB=D:Perllib

— typing TRUE then a space before the carriage return
set ACTIVE_STATE_PERL=TRUE

— show there’s a space at the end
echo %ACTIVE_STATE_PERL%x
TRUE x

— run opatch
D:oracleora92OPatch>d:perlbinperl.exe opatch.pl lsinventory -all

— it fails. Its possibly another discussion, but you wouldn’t necessarily know
— this was failure if you were doing an apply and you hadnt seem it before, but
— anyway…

Oracle Interim Patch Installer version 1.0.0.0.53
Copyright (c) 2005 Oracle Corporation. All Rights Reserved..

We recommend you refer to the OPatch documentation under
OPatch/docs for usage reference. We also recommend using
the latest OPatch version. For the latest OPatch version
and other support related issues, please refer to document
293369.1 which is viewable from metalink.oracle.com

Oracle Home = D:oracleora92
Location of Oracle Universal Installer components = D:oracleora92oui
Location of OraInstaller.jar = “D:oracleora92ouijlib”
Oracle Universal Installer shared library = D:oracleora92ouilibwin32oraIns
taller.dll
Location of Oracle Inventory Pointer = N/A
Location of Oracle Inventory = D:oracleora92inventory
Path to Java = “D:oracleora92jre1.4.2binjava.exe”
Log file = D:oracleora92/.patch_storage//*.log

— reset without the spurious space
D:oracleora92OPatch>set ACTIVE_STATE_PERL=TRUE

— prove there’s no space
D:oracleora92OPatch>echo %ACTIVE_STATE_PERL%x
TRUEx

— and it works
D:oracleora92OPatch>d:
perlbinperl.exe opatch.pl lsinventory -all

Oracle Interim Patch Installer version 1.0.0.0.53
Copyright (c) 2005 Oracle Corporation. All Rights Reserved..

We recommend you refer to the OPatch documentation under
OPatch/docs for usage reference. We also recommend using
the latest OPatch version. For the latest OPatch version
and other support related issues, please refer to document
293369.1 which is viewable from metalink.oracle.com

Oracle Home = D:oracleora92
Location of Oracle Universal Installer components = D:oracleora92oui
Location of OraInstaller.jar = “D:oracleora92ouijlib”
Oracle Universal Installer shared library = D:oracleora92ouilibwin32oraIns
taller.dll
Location of Oracle Inventory Pointer = N/A
Location of Oracle Inventory = D:oracleora92inventory
Path to Java = “D:oracleora92jre1.4.2binjava.exe”
Log file = D:oracleora92/.patch_storage//*.log

Remove extra quote surrounding system commands on Windows…
Creating log file “D:oracleora92.patch_storageLsInventory__01-25-2006_10-35-
14.log”

Remove extra quote surrounding system commands on Windows…
ORACLE HOME LOCATION
———– ——–

OraHome8160 D:OracleOra8160
OraHome92 d:oracleora92

OPatch succeeded.

Grrrr!

Advertisements