Last week I was asked to write a little script to automate an upgrade of oracle client 22.214.171.124 to 126.96.36.199.
Reason for this was that we needed to update arround 1.300 clients to enable them to connect to a 10g database (we couldn’t install 10g clients because of other applications restricted the client version to 9i).
Ok, easy enough. Oracle allows you to automate installations and upgrades via response files and the response file for a client upgrade from 188.8.131.52 to 184.108.40.206 is very simple.
When I started testing the upgrade, I immediately spotted a first problem. The setup.exe (it was on windows xp) started a new console and then returned directly to the prompt in the original console. This would make it impossible to check the return codes to know if a upgrade was successful or not.
The upgrade itself finished without a problem, but at the end the following message appeared in the newly started console: “Press enter to exit”.
Huh!? This was supposed to be a “silent” install, meaning no interraction needed. But here it was, asking to press enter to exit.
And the documentation was not telling anything about it.
After some searching, I found that you can specify the “-noconsole” flag when starting the setup, which would surpress the new console and avoid the question to press enter.
You still would see the question in the logfiles, but the installation presumed you responded to it and finishes the upgrade.
This left me with the first problem: the prompt would still directly return while the upgrade was running in the background.
After some searching in the documentation I found a note stating that you need to modify the oraparam.ini file and change the BOOTSTRAP parameter from TRUE to FALSE.
Unfortunately this did not help. Yelling at it did either.
Then I found that in 10g, you had a “-waitforcompletion” flag you could set, that would do exactly what I needed. So I tried if it would work for the oui shipped in the 220.127.116.11 patchset.
At first, it didn’t, but then I found metalink note 293044.1 that said that the setup.exe in Disk1 and Disk1/install where not the same and that the one in Disk1/install should be used for the “-waitforcompletion” flag.
At last it worked.
For those interested, here is the full command I used to start the silent upgrade:
start /wait C:\oracle\patches\18.104.22.168\Disk1\install\setup.exe -silent -noconsole -waitforcompletion -responsefile c:\oracle\patches\22.214.171.124\patchset.rsp -paramfile c:\oracle\patches\126.96.36.199\oraparam.ini
Thanks to Geert for the yelling link :)