Friday, July 29, 2011

OPatch failed with error code = 74

A frequent issue I come across when trying to apply an Oracle Critical Patch Update on a Windows Server is the error:

OPatch failed with error code = 74

Typically you will see several Oracle .dll files listed above this entry that cannot be copied.  This is because some Oracle process still has a lock on these files, despite the fact that you have shutdown all the Oracle services and Distributed Transaction Coordinator service as suggested in the patch documentation.

Sometimes rebooting the server will fix this problem, but I've found that this is not always the case.  One of the most reliable ways to fix this issue is to temporarily remove the Oracle entries from the PATH variable and then restarting.  Here are the steps that I follow to work around this problem:


  1. Open up the 'Services' window.  Set all the Oracle services to "Manual" or "Disabled" that are currently set to "Automatic"
  2. Right-click on 'My Computer' and select "Properties".
  3. Select the 'Advanced' tab and click on "Environment Variables" button.
  4. Under 'System variables' scroll down and select "Path".  Click on the 'Edit' button.
  5. Copy the entire Path 'Variable value' and paste it into a text document and save that file.
  6. Delete any mention of an Oracle path in the Path 'Variable value' window.  At the very least this will be your %ORACLE_HOME%\bin.
  7. Click OK for each window to save your changes.
  8. Restart your server.
  9. When you log back onto your server, be sure to stop the 'Distributed Transaction Coordinator' service again.  All your Oracle services should not have started because of Step 1.
  10. Proceed with patching your system.  Because you have removed the Oracle path from the Path environment variable, you will need to invoke OPatch through the full path. (example:  cmd>%ORACLE_HOME%\Opatch\Opatch apply
  11. Once the patch completes, remember to set your Oracle services back to 'Automatic' that were changed in Step 1.  Also, restore the old Path 'Variable value' that you saved in the text document in Step 6.
Are you a System Administrator that has been forced to also perform Oracle DBA tasks?  Would you like to avoid these time-consuming tasks so you can concentrate on your normal full-time duties?   Contact me to find out how you can have full-time Senior Oracle database administration support for as little as $500 / month.

No comments:

Post a Comment