opatch - make sure there's no space on the end of TRUE
I’ve been having problems with opatch.
todo - fix the link 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 - on 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:
- Sets the other variables
- Sets ACTIVE_STATE_PERL=TRUE with a trailing space on the end of true
- echos the variable back to display the space
- runs opatch -lsinventory and it fails
- Re-sets ACTIVE_STATE_PERL=TRUE with the trailing space removed
- runs opatch -lsinventory and it succeeds
-some other variables. Allegedly the case of the D: is significant
set ORACLE_HOME=D:\ORACLE\ORA92
set PERL5LIB=D:\Perl\lib
-- 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:\oracle\ora92\OPatch>d:\perl\bin\perl.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:\oracle\ora92
Location of Oracle Universal Installer components = D:\oracle\ora92\oui
Location of OraInstaller.jar = "D:\oracle\ora92\oui\jlib"
Oracle Universal Installer shared library = D:\oracle\ora92\oui\lib\win32\oraInstaller.dll
Location of Oracle Inventory Pointer = N/A
Location of Oracle Inventory = D:\oracle\ora92\inventory
Path to Java = "D:\oracle\ora92\jre1.4.2\bin\java.exe"
Log file = D:\oracle\ora92\.patch_storage\\*.log
-- reset without the spurious space
D:\oracle\ora92\OPatch>set ACTIVE_STATE_PERL=TRUE
-- prove there's no space
D:\oracle\ora92\OPatch>echo %ACTIVE_STATE_PERL%x
TRUEx
-- and it works
D:\oracle\ora92\OPatch>d:\perl\bin\perl.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:\oracle\ora92
Location of Oracle Universal Installer components = D:\oracle\ora92\oui
Location of OraInstaller.jar = "D:\oracle\ora92\oui\jlib"
Oracle Universal Installer shared library = D:\oracle\ora92\oui\lib\win32\oraInstaller.dll
Location of Oracle Inventory Pointer = N/A
Location of Oracle Inventory = D:\oracle\ora92\inventory
Path to Java = "D:\oracle\ora92\jre1.4.2\bin\java.exe"
Log file = D:\oracle\ora92\.patch_storage\\*.log
Remove extra quote surrounding system commands on Windows...
Creating log file "D:\oracle\ora92.patch_storage\LsInventory__01-25-2006_10-35-14.log"
Remove extra quote surrounding system commands on Windows...
ORACLE HOME LOCATION
----------- --------
OraHome8160 D:\Oracle\Ora\8160
OraHome92 d:\oracle\ora92
OPatch succeeded.
Grrrr!