On windows, patching an Oracle database can be tricky.
Very often for example, the dll file will be used by some process which is a bit… Undefined. So to make sure everything run smoothly, the following process must be used.
It should in fact be used as a best practice on windows.
Stopping Oracle services might not be enough.
———
- the instances,
- the Intelligent Agent,
- the OLAP agent,
- the Oracle Management Server,
- the TNSListener,
- HTTP server.
- SNMP service,
- MSDTC (Microsoft Distributed Transaction Coordinator) service,
- Microsoft IIS (admin) service,
- Microsoft COM+ Event System,
- MTSrecovery service,
- BackupExec agent,
- ArcServe Agent,
- IBM Director Support Program.
————-
The list above comes from oracle support.
- Stop OracleService, Listener, DBConsole and anything else related to Oracle + additional services as stated above.
-
- Change the services start mode to manual
- Go to system>Environment variable.
- Backup PATH environment variable to notepad
- Remove all Oracle path from PATH (I had c:\oracle\product\102\bin)
- Reboot the server
- Install the patch:
- Make sure to select the correct oracle_home. By default, it will install the patch in a new home.
- Put the oracle path back in PATH environment variable.
- start the oracle service using the following command: C:\>oradim -startup -sid [SID] starttype srvc
- Start the listener via windows service manager
- In SqlPlus, log in as sysdba:
- C:\>set oracle_sid=[SID]
- C:\>sqlplus / as sysdba
- SQL>startup upgrade
- spool d:\somewhere\upgde.log
- @[oracle_home]\RDBMS\admin\catupgrd.sql (depending on the machine it can take up to 40 minutes)
- spool off
- Check if there is any ORA- error (this is long because there are a lot in the comments)
- shutdown
- startup
- @[oracle_home]\RDBMS\admin\utlrp.sql (takes up to 10 minutes)
- @[oracle_home]\RDBMS\admin\utlrp.sql (takes about 1 minute)
Great article! I had same issue, but with multiple Oracle Homes and DB versions. I needed to use set ORACLE_HOME=X:\path\to\oracle_home; and then X:\> %ORACLE_HOME%\bin\sqlplus …
One question – did you mind:
10. @[oracle_home]\RDBMS\admin\utlirp.sql
and not utlrp.sql?
Hi.
I think it’s utlrp.sql…
But let me check. I’ll have a look tomorrow and let you know.
Thanks for your nice comment by the way it motivates me to keep going.
I have a lot of things cooking right now but not really finding the time to update as much as I would like.
Additional information to the best practice:
The following should be done before applying any patches:
1) Look for any ORA- errors in the alert log and validate them.
2) Copy the oracle binaries (oracle home) and paste it to a different location as a backup.
@Dejan> Sorry for the very late reply but I’ve performed a couple of upgrades recently and it’s utlrp.sql all the way.
Nico