Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

OPatch via Powershell

DTSIguyApr 28 2025

Has anybody out there managed to wrap the Opatch process into a PowerShell script? We are currently using the Oracle 19 64-bit runtime client. The product installs just fine on remote systems via a PowerShell routine however, there is a required OPatch that must be run as well…and that part is not going so well.

So far, I've been able to rename/backup the OPatch directory after the runtime client install. It then recreates the OPatch directory with the new OPatch version that is needed to install the required patch. I can set the “INVENTORY_LOC” env variable on the remote system at the machine level, stop the MSDTC service, set the “ORACLE_HOME” env variable and extract the new patch.

However, when I try running OPatch on the remote system…it runs, no errors returned, takes 1 second (so I know it didn't do anything) and there's no log file in the inventory.

We have a batch file that does work but if/when BAT files go away then I'll need the ps routine to work.

This post has been answered by DTSIguy on Apr 28 2025
Jump to Answer
Comments
Post Details
Added on Apr 28 2025
2 comments
50 views