Thursday, August 29, 2013

Applying Oracle Patches on a Windows Server - Something to Remember

In my quest to get a working copy of Oracle Enterprise Manager running in a Middlware home on Windows 2008 server I thought it might be best to apply the latest quarterly SPU (formerly known as Critical Patch Updates or CPUs).

With all the changes made between Oracle 10g and 11g Middleware I wasn't too surprised when I discovered I would not be using my old friend the OPatch utility but instead a new guy called "bsu" that I assume is part of Weblogic.

Regardless, the Oracle README that came with the Patchset was entirely unhelpful, giving instructions for executing .sh shell scripts (thanks Larry! Have fun at the America's Cup you jerk).

So I asked someone with a lot more 11g experience than me for help and he kindly provided a quick how-to for installing the patchset on a Windows 2008 Server installation.

Of course, all Oracle services needed to be turned off first, which I did. I opened a command prompt window and cd'ed to the <Middleware_Home>\utils\bsu directory and executed the following command:

bsu -patch_download_dir=C:\16619891 -patchlist=L51R -prod_dir=C:\Oracle\Middleware\wlserver_10.3 -install

It started off well, not finding any conflicts, but then it failed. Of course it failed. This is Oracle. Oracle on a Windows server.

The bsu utility was complaining it couldn't write a backup of a file. So I checked the folder permissions, ownership, etc. and found nothing. I tried opening the command prompt window with the "Run as administrator" option and still got the same error.

You old Oracle/Windows hands know what was going on, don't you? I googled and found nothing relating to this error. Because it was caused by a basic oversight on my part: when you stop a service on a Windows box, that doesn't mean it hasn't released all the files it was using before it was stopped.

So kids remember this the next time you're applying Oracle patches on a Windows server: always stop all the Oracle services, set them to manual, then REBOOT THE SERVER

And don't forget to set those services back to automatic when you're done!

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home