Error encountered while installing Oracle 9.2.0.8 patch set

oracle

I encountered the error message below while applying Oracle 9.2.0.8 patch set using OUI on server running Oracle 9.2.0.7 and Windows 2003 Enterprise Edition SP2:

Error in writing to file 'C:\oracle\ora92\BIN\orapls9.dll'
[C:\oracle\ora92\BIN\orapls9.dll (he process cannot access
the file because it is being used by another process)]

I've already stopped the Oracle instance and services before invoking the setup.exe.

My question is: Why this is happening and what is the resolution to prevent this error from
happening?

Best Answer

This is happening because some running process has loaded one or more Oracle DLLs and must be stopped before the install can proceed. The fun part is tracking them down.

First, ALL services running out of the Oracle Home being installed must be stopped, including the listener, data gatherer, etc.

Make sure the Microsoft Distributed Transaction Coordinator Service is stopped.

Failing that, download and install Process Explorer and use it to find the DLL's being complained about.

An alternative to process explorer (altho it's pretty nifty) is to simply use tasklist (since you know the name of the offending dll):

C:\>tasklist /m orapls9.dll

Image Name                     PID Modules
========================= ======== ============================================
TNSLSNR.EXE                   1664 orapls9.dll
oracle.exe                    1792 orapls9.dll
oracle.exe                    1836 orapls9.dll
oracle.exe                    1868 orapls9.dll
oracle.exe                    1884 orapls9.dll
oracle.exe                    1900 orapls9.dll
oracle.exe                    1916 orapls9.dll
oracle.exe                    1932 orapls9.dll
oracle.exe                    2028 orapls9.dll

C:\>