Ansible for Oracle DBA

Ansible Playbooks for Oracle Grid and Database Release Update (19.26 with MRP & One-Off Fixes)

Since I enjoy automation and finding ways to simplify DBA tasks, I use Ansible for Oracle Database and Grid Infrastructure patching. In my previous posts, I explained why we prefer Ansible and how orchestration benefits us, so I won’t repeat those details here. Instead, I’d like to announce that I’ve updated my Ansible playbooks for the Oracle 19.26 Release Update.

We choose to follow Release Updates with one version behind from latest one, and apply latest MRP (Monthly Release Update) on top.
This new version comes with:

Involves January 2025 RU (19.26)
Included recommended one-off patches from Oracle Support Note 555.1
Precheck enhancements (Required space)
Designed and tested with RAC clusters in mind

GitHub Repository :

Insane-DBAs-Backpack – Latest Ansible Playbooks for Oracle Database Release Updates

Inside you’ll find:

Playbooks for Oracle Grid Infrastructure patching
Playbooks for Oracle Database patching
Optimized for multi-node RAC setups

While patching takes time, doing it with Ansible brings simplicity, repeatability, and peace of mind. These playbooks are what I currently use and update over time, especially as new RUs and one-offs release from Oracle.

If you’re into automation like I am, give them a try in your test environment.

Oracle Database Patching Tips

Oracle Grid Patching by using Ansible

Oracle Database Patching by Using Ansible

Automate Oracle Database Patching with Ansible Playbooks – 19.24

For Grid Infrastructure patching, you’ll need to download the following setup files from Oracle Support. Place them under the /u01/app/Setup directory, which should be owned by the ansible user. That’s all for the preparation phase. For a more detailed explanation, you can refer to my blog post: Oracle Grid Patching by using Ansible.

  • Grid Home Setup – LINUX.X64_193000_grid_home.zip    
  • Grid Infrastructure Release Update 19.26.0.0.250121 37257886 (GIRU System Patch involves DBRU) – p37257886_190000_Linux-x86-64.zip
  • GI MRP 19.26.0.0.250415 37769929 (GIMRP involve Database Montly Recommended Paches) – p37769929_1926000DBRU_Linux-x86-64.zip
  • OPatch 12.2.0.1.46 (Version 46) –  p6880880_122010_Linux-x86-64.zip
  • Recommended one of patch 34672698 – p34672698_1922000DBRU_Linux-x86-64.zip
  • Recommended one of patch 37669540 – p37669540_1926000DBRU_Linux-x86-64.zip

To begin and finish the patching process, simply run the main playbook. It will complete all necessary steps with a single command:

Prepare Step – prepare_grid_allnodes.yml

Apply Grid Infrastructure Release Update using Out of Place Patching – apply_giru_onfirstnode.yml

Switch to new Grid Home – finish_giru_allnodes.yml

Start Database Recovery Process on Standby Databases – it will only run on standby databases, otherwise it will not do anything. start_recover_allnodes.yml

Optional : Remove Old Grid Home – remove_giru_allnodes.yml

For Database patching, you’ll need to download the following setup files from Oracle Support. Place them under the /u01/app/Setup directory, which should be owned by the ansible user. That’s all for the preparation phase. For a more detailed explanation, you can refer to my blog post: Oracle Database Patching by Using Ansible.

  • Database home Setup – LINUX.X64_193000_db_home.zip
  • Grid Infrastructure Release Update 19.26.0.0.250121 37257886 (GIRU System Patch involves DBRU) – p37257886_190000_Linux-x86-64.zip
  • GI MRP 19.26.0.0.250415 37769929 (GIMRP involve Database Montly Recommended Paches) – p37769929_1926000DBRU_Linux-x86-64.zip
  • OPatch 12.2.0.1.46 (Version 46) –  p6880880_122010_Linux-x86-64.zip
  • Data Pump Bundle Patch – p37470729_1926000DBRU_Generic.zip
  • Spatial Bundle Patch – p37641238_1926000DBRU_Linux-x86-64.zip
  • OJVM Patch – p37102264_190000_Linux-x86-64.zip
  • Flashback Unusable Indexes Bug Fix – p36791812_1926000DBRU_Linux-x86-64.zip
  • Recommended one of patch – p34672698_1922000DBRU_Linux-x86-64.zip
  • Recommended one of patch – p37822691_1926000DBRU_Linux-x86-64.zip

To begin and finish the patching process, simply run the main playbook. It will complete all necessary steps with a single command:

Prepare Step – prepare_dbru_allnodes.yml

Apply Database Release Update using Out of Place Patching – apply_dbru_onfirstnode.yml

Run root.sh step – apply_dbru_runrootallnodes.yml

Finish Oracle Database Release Update and start databases from new database home – finish_dbru_onallnodes.yml

Apply datapatch – apply_datapatch_onprimary.yml

Optional : Remove Old Database Home – remove_dbru_onallnodes.yml

Content of the start_recover_onremote.sh

Feel free to fork, suggest improvements, or just drop a comment. I keep the repo up to date with each RU and always enjoy feedback from fellow DBAs.

Hope it helps your patching process.


Discover More from Osman DİNÇ


Comments

Leave your comment