2026-06-28 19:28:39

This commit is contained in:
2026-06-28 21:28:40 +02:00
parent 6979efd308
commit 42efb600ca
7 changed files with 958 additions and 15 deletions
+598
View File
@@ -0,0 +1,598 @@
PLAY [Gather facts for a specific inventory host] ******************************
TASK [Gathering Facts] *********************************************************
ok: [bakura]
TASK [Ensure 'server' variable is provided] ************************************
ok: [bakura] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Ensure 'oracle_sid' variable is provided] ********************************
ok: [bakura] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Ensure 'opatch_zip' variable is provided] ********************************
ok: [bakura] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Ensure 'dbru_zip' variable is provided] **********************************
ok: [bakura] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Show selected system facts] **********************************************
ok: [bakura] => {
"msg": {
"cpu_count": "4",
"hardware_model": "x86_64",
"hostname": "bakura.swgalaxy",
"ip_address": "192.168.0.64",
"operating_system": "OracleLinux 9.7",
"os_family": "RedHat",
"ram_gb": "7"
}
}
TASK [Source oraenv and display OPatch informations] ***************************
changed: [bakura]
TASK [Display OPatch output] ***************************************************
ok: [bakura] => {
"opatch_output.stdout_lines": [
"ORACLE_SID = [oracle] ? The Oracle base has been set to /app/oracle/base",
"OPatch Version: 12.2.0.1.48",
"",
"OPatch succeeded.",
"",
"",
"38743688;OCW RELEASE UPDATE 23.26.1.0.0 (GOLD IMAGE) (38743688) Gold Image",
"38743669;Database Release Update : 23.26.1.0.0 (38743669) Gold Image",
"",
"OPatch succeeded."
]
}
TASK [Check if any oracle processes are using ORACLE_HOME files] ***************
ok: [bakura]
TASK [List oracle processes using ORACLE_HOME files and fail if any found] *****
skipping: [bakura]
TASK [Remove $ORACLE_HOME/OPatch directory] ************************************
changed: [bakura]
TASK [Show OPatch removal result] **********************************************
ok: [bakura] => {
"msg": "OPatch removal: ORACLE_SID = [oracle] ? The Oracle base has been set to /app/oracle/base\nremoved"
}
TASK [Copy OPatch zip to remote host] ******************************************
changed: [bakura]
TASK [Extract OPatch zip into $ORACLE_HOME] ************************************
changed: [bakura]
TASK [Remove uploaded OPatch zip from remote] **********************************
changed: [bakura]
TASK [Remove /app/oracle/staging_area if present] ******************************
changed: [bakura]
TASK [Recreate /app/oracle/staging_area] ***************************************
changed: [bakura]
TASK [Check local dbru_zip path exists on controller (only if provided)] *******
ok: [bakura -> localhost]
TASK [Fail if local dbru_zip file not found on controller] *********************
skipping: [bakura]
TASK [Copy local dbru_zip to remote staging_area] ******************************
changed: [bakura]
TASK [Unarchive uploaded zip into staging_area] ********************************
changed: [bakura]
TASK [Remove uploaded zip from remote staging_area] ****************************
changed: [bakura]
TASK [Find extracted directories under staging_area] ***************************
ok: [bakura]
TASK [Show staging directories found] ******************************************
ok: [bakura] => {
"staging_dirs.files": [
{
"atime": 1777441178.0,
"ctime": 1782674143.7840257,
"dev": 64516,
"gid": 54321,
"gr_name": "oinstall",
"inode": 134218071,
"isblk": false,
"ischr": false,
"isdir": true,
"isfifo": false,
"isgid": false,
"islnk": false,
"isreg": false,
"issock": false,
"isuid": false,
"mode": "0750",
"mtime": 1777441178.0,
"nlink": 8,
"path": "/app/oracle/staging_area/39088031",
"pw_name": "oracle",
"rgrp": true,
"roth": false,
"rusr": true,
"size": 159,
"uid": 54321,
"wgrp": false,
"woth": false,
"wusr": true,
"xgrp": true,
"xoth": false,
"xusr": true
}
]
}
TASK [Find all subdirectories inside extracted main dirs (depth=2)] ************
ok: [bakura]
TASK [Show all subdirectories to process] **************************************
ok: [bakura] => {
"all_subdirs.stdout_lines": [
"/app/oracle/staging_area/39088031/39093738",
"/app/oracle/staging_area/39088031/39099119",
"/app/oracle/staging_area/39088031/39099244",
"/app/oracle/staging_area/39088031/39099110",
"/app/oracle/staging_area/39088031/39093711"
]
}
TASK [Apply OPatch for each extracted subdirectory (clean chdir)] **************
ok: [bakura] => (item=/app/oracle/staging_area/39088031/39093738)
ok: [bakura] => (item=/app/oracle/staging_area/39088031/39099119)
ok: [bakura] => (item=/app/oracle/staging_area/39088031/39099244)
ok: [bakura] => (item=/app/oracle/staging_area/39088031/39099110)
ok: [bakura] => (item=/app/oracle/staging_area/39088031/39093711)
TASK [Show OPatch apply results (stdout lines)] ********************************
ok: [bakura] => {
"opatch_apply_results.results | map(attribute='stdout_lines') | list": [
[
"ORACLE_SID = [oracle] ? The Oracle base has been set to /app/oracle/base",
"Oracle Interim Patch Installer version 12.2.0.1.51",
"Copyright (c) 2026, Oracle Corporation. All rights reserved.",
"",
"",
"Oracle Home : /app/oracle/product/26",
"Central Inventory : /app/oracle/oraInventory",
" from : /app/oracle/product/26/oraInst.loc",
"OPatch version : 12.2.0.1.51",
"OUI version : 12.2.0.9.0",
"Log file location : /app/oracle/product/26/cfgtoollogs/opatch/opatch2026-06-28_21-15-52PM_1.log",
"",
"Verifying environment and performing prerequisite checks...",
"OPatch continues with these patches: 39093738 ",
"",
"Do you want to proceed? [y|n]",
"Y (auto-answered by -silent)",
"User Responded with: Y",
"All checks passed.",
"",
"Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.",
"(Oracle Home = '/app/oracle/product/26')",
"",
"",
"Is the local system ready for patching? [y|n]",
"Y (auto-answered by -silent)",
"User Responded with: Y",
"Backing up files...",
"Applying interim patch '39093738' to OH '/app/oracle/product/26'",
"ApplySession: Optional component(s) [ oracle.crs, 23.0.0.0.0 ] , [ oracle.has.cvu, 23.0.0.0.0 ] , [ oracle.has.crs.cvu, 23.0.0.0.0 ] , [ oracle.xag, 23.0.0.0.0 ] , [ oracle.has.crs, 23.0.0.0.0 ] , [ oracle.tfa, 23.0.0.0.0 ] not present in the Oracle Home or a higher version is found.",
"",
"Patching component oracle.has.common, 23.0.0.0.0...",
"Patch 39093738 successfully applied.",
"Sub-set patch [38743688] has become inactive due to the application of a super-set patch [39093738].",
"Please refer to Doc ID 2161861.1 for any possible further required actions.",
"Log file location: /app/oracle/product/26/cfgtoollogs/opatch/opatch2026-06-28_21-15-52PM_1.log",
"",
"OPatch succeeded."
],
[
"ORACLE_SID = [oracle] ? The Oracle base has been set to /app/oracle/base",
"Oracle Interim Patch Installer version 12.2.0.1.51",
"Copyright (c) 2026, Oracle Corporation. All rights reserved.",
"",
"",
"Oracle Home : /app/oracle/product/26",
"Central Inventory : /app/oracle/oraInventory",
" from : /app/oracle/product/26/oraInst.loc",
"OPatch version : 12.2.0.1.51",
"OUI version : 12.2.0.9.0",
"Log file location : /app/oracle/product/26/cfgtoollogs/opatch/opatch2026-06-28_21-16-16PM_1.log",
"",
"Verifying environment and performing prerequisite checks...",
"Skip patch 39099119 from list of patches to apply: This patch is skipped because none of the components from patch are present in ORACLE_HOME.",
"Please ensure that atleast one of the component from patch is present in ORACLE_HOME.",
"",
"",
"After skipping patches with missing components, there are no patches to apply.",
"Log file location: /app/oracle/product/26/cfgtoollogs/opatch/opatch2026-06-28_21-16-16PM_1.log",
"",
"OPatch completed with warnings."
],
[
"ORACLE_SID = [oracle] ? The Oracle base has been set to /app/oracle/base",
"Oracle Interim Patch Installer version 12.2.0.1.51",
"Copyright (c) 2026, Oracle Corporation. All rights reserved.",
"",
"",
"Oracle Home : /app/oracle/product/26",
"Central Inventory : /app/oracle/oraInventory",
" from : /app/oracle/product/26/oraInst.loc",
"OPatch version : 12.2.0.1.51",
"OUI version : 12.2.0.9.0",
"Log file location : /app/oracle/product/26/cfgtoollogs/opatch/opatch2026-06-28_21-16-24PM_1.log",
"",
"Verifying environment and performing prerequisite checks...",
"Skip patch 39099244 from list of patches to apply: This patch is skipped because none of the components from patch are present in ORACLE_HOME.",
"Please ensure that atleast one of the component from patch is present in ORACLE_HOME.",
"",
"",
"After skipping patches with missing components, there are no patches to apply.",
"Log file location: /app/oracle/product/26/cfgtoollogs/opatch/opatch2026-06-28_21-16-24PM_1.log",
"",
"OPatch completed with warnings."
],
[
"ORACLE_SID = [oracle] ? The Oracle base has been set to /app/oracle/base",
"Oracle Interim Patch Installer version 12.2.0.1.51",
"Copyright (c) 2026, Oracle Corporation. All rights reserved.",
"",
"",
"Oracle Home : /app/oracle/product/26",
"Central Inventory : /app/oracle/oraInventory",
" from : /app/oracle/product/26/oraInst.loc",
"OPatch version : 12.2.0.1.51",
"OUI version : 12.2.0.9.0",
"Log file location : /app/oracle/product/26/cfgtoollogs/opatch/opatch2026-06-28_21-16-31PM_1.log",
"",
"Verifying environment and performing prerequisite checks...",
"Skip patch 39099110 from list of patches to apply: This patch is skipped because none of the components from patch are present in ORACLE_HOME.",
"Please ensure that atleast one of the component from patch is present in ORACLE_HOME.",
"",
"",
"After skipping patches with missing components, there are no patches to apply.",
"Log file location: /app/oracle/product/26/cfgtoollogs/opatch/opatch2026-06-28_21-16-31PM_1.log",
"",
"OPatch completed with warnings."
],
[
"ORACLE_SID = [oracle] ? The Oracle base has been set to /app/oracle/base",
"Oracle Interim Patch Installer version 12.2.0.1.51",
"Copyright (c) 2026, Oracle Corporation. All rights reserved.",
"",
"",
"Oracle Home : /app/oracle/product/26",
"Central Inventory : /app/oracle/oraInventory",
" from : /app/oracle/product/26/oraInst.loc",
"OPatch version : 12.2.0.1.51",
"OUI version : 12.2.0.9.0",
"Log file location : /app/oracle/product/26/cfgtoollogs/opatch/opatch2026-06-28_21-16-38PM_1.log",
"",
"Verifying environment and performing prerequisite checks...",
"",
"--------------------------------------------------------------------------------",
"Start OOP by Prereq process.",
"Launch OOP...",
"",
"Oracle Interim Patch Installer version 12.2.0.1.51",
"Copyright (c) 2026, Oracle Corporation. All rights reserved.",
"",
"",
"Oracle Home : /app/oracle/product/26",
"Central Inventory : /app/oracle/oraInventory",
" from : /app/oracle/product/26/oraInst.loc",
"OPatch version : 12.2.0.1.51",
"OUI version : 12.2.0.9.0",
"Log file location : /app/oracle/product/26/cfgtoollogs/opatch/opatch2026-06-28_21-17-08PM_1.log",
"",
"Verifying environment and performing prerequisite checks...",
"OPatch continues with these patches: 39093711 ",
"",
"Do you want to proceed? [y|n]",
"Y (auto-answered by -silent)",
"User Responded with: Y",
"All checks passed.",
"",
"Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.",
"(Oracle Home = '/app/oracle/product/26')",
"",
"",
"Is the local system ready for patching? [y|n]",
"Y (auto-answered by -silent)",
"User Responded with: Y",
"Backing up files...",
"Applying interim patch '39093711' to OH '/app/oracle/product/26'",
"ApplySession: Optional component(s) [ oracle.client, 23.0.0.0.0 ] , [ oracle.companionCD.db, 23.0.0.0.0 ] , [ oracle.dbjava.dev, 23.0.0.0.0 ] , [ oracle.dslm, 23.0.0.0.0 ] , [ oracle.has.client.cvu, 23.0.0.0.0 ] , [ oracle.has.gsm.cvu, 23.0.0.0.0 ] , [ oracle.ldap.companion, 23.0.0.0.0 ] , [ oracle.mgw.common.companion, 23.0.0.0.0 ] , [ oracle.network.cman, 23.0.0.0.0 ] , [ oracle.nlsrtl.companion, 23.0.0.0.0 ] , [ oracle.odbc.companion, 23.0.0.0.0 ] , [ oracle.oraolap.mgmt, 23.0.0.0.0 ] , [ oracle.perlint, 5.38.2.0.0 ] , [ oracle.pg4appc, 23.0.0.0.0 ] , [ oracle.pg4mq, 23.0.0.0.0 ] , [ oracle.precomp.companion, 23.0.0.0.0 ] , [ oracle.rdbms.companion, 23.0.0.0.0 ] , [ oracle.rdbms.ic, 23.0.0.0.0 ] , [ oracle.rdbms.tg4db2, 23.0.0.0.0 ] , [ oracle.rdbms.tg4ifmx, 23.0.0.0.0 ] , [ oracle.rdbms.tg4msql, 23.0.0.0.0 ] , [ oracle.rdbms.tg4sybs, 23.0.0.0.0 ] , [ oracle.rdbms.tg4tera, 23.0.0.0.0 ] , [ oracle.sdo.companion, 23.0.0.0.0 ] , [ oracle.sqlj, 23.0.0.0.0 ] , [ oracle.sqlj.companion, 23.0.0.0.0 ] , [ oracle.sqlplus.companion, 23.0.0.0.0 ] , [ oracle.tg, 23.0.0.0.0 ] , [ oracle.xdk.companion, 23.0.0.0.0 ] , [ oracle.jdk, 11.0.25.9.0 ] , [ oracle.python, 3.12.5.0.0 ] not present in the Oracle Home or a higher version is found.",
"",
"Patching component oracle.assistants.acf, 23.0.0.0.0...",
"",
"Patching component oracle.assistants.asm, 23.0.0.0.0...",
"",
"Patching component oracle.assistants.deconfig, 23.0.0.0.0...",
"",
"Patching component oracle.assistants.netca.client, 23.0.0.0.0...",
"",
"Patching component oracle.assistants.server, 23.0.0.0.0...",
"",
"Patching component oracle.bali.ewt, 12.2.1.0.0...",
"",
"Patching component oracle.bali.ice, 6.1.3.2.0...",
"",
"Patching component oracle.bali.jewt, 11.1.1.1.0...",
"",
"Patching component oracle.bali.share, 12.2.1.0.0...",
"",
"Patching component oracle.blaslapack, 23.0.0.0.0...",
"",
"Patching component oracle.buildtools.common, 23.0.0.0.0...",
"",
"Patching component oracle.buildtools.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.crypto.fips, 23.0.0.0.0...",
"",
"Patching component oracle.crypto.ojmisc, 23.0.0.0.0...",
"",
"Patching component oracle.crypto.pki, 23.0.0.0.0...",
"",
"Patching component oracle.crypto.rsa, 23.0.0.0.0...",
"",
"Patching component oracle.crypto.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.ctx, 23.0.0.0.0...",
"",
"Patching component oracle.ctx.atg, 23.0.0.0.0...",
"",
"Patching component oracle.ctx.companion, 23.0.0.0.0...",
"",
"Patching component oracle.ctx.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.dbdev, 23.0.0.0.0...",
"",
"Patching component oracle.dbjava.ic, 23.0.0.0.0...",
"",
"Patching component oracle.dbjava.jdbc, 23.0.0.0.0...",
"",
"Patching component oracle.dbjava.server, 23.0.0.0.0...",
"",
"Patching component oracle.dbjava.ucp, 23.0.0.0.0...",
"",
"Patching component oracle.dbtoolslistener, 23.0.0.0.0...",
"",
"Patching component oracle.hadoopcore, 23.0.0.0.0...",
"",
"Patching component oracle.has.common, 23.0.0.0.0...",
"",
"Patching component oracle.has.common.cvu, 23.0.0.0.0...",
"",
"Patching component oracle.has.db, 23.0.0.0.0...",
"",
"Patching component oracle.has.db.cvu, 23.0.0.0.0...",
"",
"Patching component oracle.has.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.help.ohj, 11.1.2.0.0...",
"",
"Patching component oracle.help.share, 11.1.2.0.0...",
"",
"Patching component oracle.install.deinstalltool, 23.0.0.0.0...",
"",
"Patching component oracle.javavm.client, 23.0.0.0.0...",
"",
"Patching component oracle.javavm.companion, 23.0.0.0.0...",
"",
"Patching component oracle.javavm.server, 23.0.0.0.0...",
"",
"Patching component oracle.javavm.server.core, 23.0.0.0.0...",
"",
"Patching component oracle.jdk, 11.0.24.7.0...",
"",
"Patching component oracle.ldap.admin, 23.0.0.0.0...",
"",
"Patching component oracle.ldap.client, 23.0.0.0.0...",
"",
"Patching component oracle.ldap.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.mgw.common, 23.0.0.0.0...",
"",
"Patching component oracle.network, 23.0.0.0.0...",
"",
"Patching component oracle.network.aso, 23.0.0.0.0...",
"",
"Patching component oracle.network.client, 23.0.0.0.0...",
"",
"Patching component oracle.network.gsm, 23.0.0.0.0...",
"",
"Patching component oracle.network.listener, 23.0.0.0.0...",
"",
"Patching component oracle.network.netmgr, 23.0.0.0.0...",
"",
"Patching component oracle.network.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.nlsrtl.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.nlsrtl.rsf.core, 23.0.0.0.0...",
"",
"Patching component oracle.nlsrtl.rsf.ic, 23.0.0.0.0...",
"",
"Patching component oracle.nlsrtl.rsf.lbuilder, 23.0.0.0.0...",
"",
"Patching component oracle.odbc, 23.0.0.0.0...",
"",
"Patching component oracle.odbc.ic, 23.0.0.0.0...",
"",
"Patching component oracle.onnx, 23.0.0.0.0...",
"",
"Patching component oracle.ons, 23.0.0.0.0...",
"",
"Patching component oracle.ons.core, 23.0.0.0.0...",
"",
"Patching component oracle.ons.ic, 23.0.0.0.0...",
"",
"Patching component oracle.options, 23.0.0.0.0...",
"",
"Patching component oracle.oracler.server, 23.0.0.0.0...",
"",
"Patching component oracle.oracore.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.oracore.rsf.core, 23.0.0.0.0...",
"",
"Patching component oracle.oraml.server, 23.0.0.0.0...",
"",
"Patching component oracle.oraolap, 23.0.0.0.0...",
"",
"Patching component oracle.oraolap.api, 23.0.0.0.0...",
"",
"Patching component oracle.oraolap.dbscripts, 23.0.0.0.0...",
"",
"Patching component oracle.ordim.client, 23.0.0.0.0...",
"",
"Patching component oracle.ordim.server, 23.0.0.0.0...",
"",
"Patching component oracle.ovm, 23.0.0.0.0...",
"",
"Patching component oracle.precomp.common, 23.0.0.0.0...",
"",
"Patching component oracle.precomp.common.core, 23.0.0.0.0...",
"",
"Patching component oracle.precomp.lang, 23.0.0.0.0...",
"",
"Patching component oracle.precomp.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.python, 3.12.3.0.0...",
"",
"Patching component oracle.rdbms, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.crs, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.db, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.dbcur, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.dbscripts, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.deconfig, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.dm, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.dv, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.hs_common, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.hsodbc, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.install.common, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.install.plugins, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.install.seeddb, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.lbac, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.locator, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.oci, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.olap, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.plsql, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.rat, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.rman, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.rsf.ic, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.scheduler, 23.0.0.0.0...",
"",
"Patching component oracle.rdbms.util, 23.0.0.0.0...",
"",
"Patching component oracle.rhp.common, 23.0.0.0.0...",
"",
"Patching component oracle.rhp.db, 23.0.0.0.0...",
"",
"Patching component oracle.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.sdo, 23.0.0.0.0...",
"",
"Patching component oracle.sdo.locator, 23.0.0.0.0...",
"",
"Patching component oracle.sdo.locator.jrf, 23.0.0.0.0...",
"",
"Patching component oracle.server, 23.0.0.0.0...",
"",
"Patching component oracle.slax.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.sqlj.sqljruntime, 23.0.0.0.0...",
"",
"Patching component oracle.sqlplus, 23.0.0.0.0...",
"",
"Patching component oracle.sqlplus.ic, 23.0.0.0.0...",
"",
"Patching component oracle.sqlplus.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.tfa.db, 23.0.0.0.0...",
"",
"Patching component oracle.usm.deconfig, 23.0.0.0.0...",
"",
"Patching component oracle.wwg.plsql, 23.0.0.0.0...",
"",
"Patching component oracle.xdk, 23.0.0.0.0...",
"",
"Patching component oracle.xdk.parser.java, 23.0.0.0.0...",
"",
"Patching component oracle.xdk.rsf, 23.0.0.0.0...",
"",
"Patching component oracle.xdk.server, 23.0.0.0.0...",
"",
"Patching component oracle.xdk.xquery, 23.0.0.0.0...",
"Patch 39093711 successfully applied.",
"Sub-set patch [38743669] has become inactive due to the application of a super-set patch [39093711].",
"Please refer to Doc ID 2161861.1 for any possible further required actions.",
"Log file location: /app/oracle/product/26/cfgtoollogs/opatch/opatch2026-06-28_21-17-08PM_1.log",
"",
"OPatch succeeded."
]
]
}
TASK [Collect failed OPatch applies] *******************************************
ok: [bakura]
TASK [Fail if any OPatch apply failed] *****************************************
skipping: [bakura]
TASK [Remove /app/oracle/staging_area if present] ******************************
changed: [bakura]
TASK [Recreate /app/oracle/staging_area] ***************************************
changed: [bakura]
PLAY RECAP *********************************************************************
bakura : ok=29 changed=12 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0
@@ -0,0 +1,63 @@
-- +----------------------------------------------------------------------------+
-- | Jeffrey M. Hunter |
-- | jhunter@idevelopment.info |
-- | www.idevelopment.info |
-- |----------------------------------------------------------------------------|
-- | Copyright (c) 1998-2012 Jeffrey M. Hunter. All rights reserved. |
-- |----------------------------------------------------------------------------|
-- | DATABASE : Oracle |
-- | FILE : dba_invalid_objects.sql |
-- | CLASS : Database Administration |
-- | PURPOSE : Provide a detailed report of all invalid objects in the |
-- | database. |
-- | NOTE : As with any code, ensure to test this script in a development |
-- | environment before attempting to run it in production. |
-- +----------------------------------------------------------------------------+
SET TERMOUT OFF;
COLUMN current_instance NEW_VALUE current_instance NOPRINT;
SELECT rpad(instance_name, 17) current_instance FROM v$instance;
SET TERMOUT ON;
PROMPT
PROMPT +------------------------------------------------------------------------+
PROMPT | Report : Invalid Objects |
PROMPT | Instance : &current_instance |
PROMPT +------------------------------------------------------------------------+
SET ECHO OFF
SET FEEDBACK 6
SET HEADING ON
-- SET LINESIZE 180
SET PAGESIZE 50000
SET TERMOUT ON
SET TIMING OFF
SET TRIMOUT ON
SET TRIMSPOOL ON
SET VERIFY OFF
CLEAR COLUMNS
CLEAR BREAKS
CLEAR COMPUTES
COLUMN owner FORMAT a25 HEADING 'Owner'
COLUMN object_name FORMAT a30 HEADING 'Object Name'
COLUMN object_type FORMAT a20 HEADING 'Object Type'
COLUMN status FORMAT a10 HEADING 'Status'
BREAK ON owner SKIP 2 ON report
COMPUTE count LABEL "" OF object_name ON owner
COMPUTE count LABEL "Grand Total: " OF object_name ON report
SELECT
owner
, object_name
, object_type
, status
FROM dba_objects
WHERE status <> 'VALID'
ORDER BY owner, object_name
/
@@ -0,0 +1,62 @@
-- +----------------------------------------------------------------------------+
-- | Jeffrey M. Hunter |
-- | jhunter@idevelopment.info |
-- | www.idevelopment.info |
-- |----------------------------------------------------------------------------|
-- | Copyright (c) 1998-2012 Jeffrey M. Hunter. All rights reserved. |
-- |----------------------------------------------------------------------------|
-- | DATABASE : Oracle |
-- | FILE : dba_registry.sql |
-- | CLASS : Database Administration |
-- | PURPOSE : Provides summary report on all registered components. |
-- | NOTE : As with any code, ensure to test this script in a development |
-- | environment before attempting to run it in production. |
-- +----------------------------------------------------------------------------+
SET TERMOUT OFF;
COLUMN current_instance NEW_VALUE current_instance NOPRINT;
SELECT rpad(instance_name, 17) current_instance FROM v$instance;
SET TERMOUT ON;
PROMPT
PROMPT +------------------------------------------------------------------------+
PROMPT | Report : Database Registry Components |
PROMPT | Instance : &current_instance |
PROMPT +------------------------------------------------------------------------+
SET ECHO OFF
SET FEEDBACK 6
SET HEADING ON
-- SET LINESIZE 180
SET PAGESIZE 50000
SET TERMOUT ON
SET TIMING OFF
SET TRIMOUT ON
SET TRIMSPOOL ON
SET VERIFY OFF
CLEAR COLUMNS
CLEAR BREAKS
CLEAR COMPUTES
COLUMN comp_id FORMAT a9 HEADING 'Component|ID'
COLUMN comp_name FORMAT a35 HEADING 'Component|Name'
COLUMN version_full FORMAT a13 HEADING 'Version'
COLUMN status FORMAT a11 HEADING 'Status'
COLUMN modified HEADING 'Modified'
COLUMN Schema FORMAT a15 HEADING 'Schema'
COLUMN procedure FORMAT a45 HEADING 'Procedure'
SELECT
comp_id
, comp_name
, version_full
, status
, modified
, schema
, procedure
FROM
dba_registry
ORDER BY
comp_id;
@@ -6,3 +6,11 @@ all:
ansible_host: togoria.swgalaxy
ansible_user: root
ansible_python_interpreter: /usr/bin/python3.9
wayland:
ansible_host: wayland.swgalaxy
ansible_user: root
ansible_python_interpreter: /usr/bin/python3.9
bakura:
ansible_host: bakura.swgalaxy
ansible_user: root
ansible_python_interpreter: /usr/bin/python3.9
@@ -0,0 +1,38 @@
# togoria
#########
ansible-playbook playbooks/ora_stand_patch_oh.yml \
-e server=togoria \
-e oracle_sid=NABOOPRD \
-e opatch_zip=/mnt/yavin4/kit/Oracle/opatch/p6880880_190000_Linux-x86-64.zip \
-e dbru_zip=/mnt/yavin4/kit/Oracle/Oracle_Database_19/patch/GIRU_19.31/p39036936_190000_Linux-x86-64.zip
ansible-playbook playbooks/ora_stand_datapatch.yml -e server=togoria -e oracle_sid=NABOOPRD
# wayland
#########
ansible-playbook playbooks/ora_stand_patch_oh.yml \
-e server=wayland \
-e oracle_sid=GENOSISPRD \
-e opatch_zip=/mnt/yavin4/kit/Oracle/opatch/p6880880_190000_Linux-x86-64.zip \
-e dbru_zip=/mnt/yavin4/kit/Oracle/Oracle_Database_19/patch/GIRU_19.31/p39036936_190000_Linux-x86-64.zip
ansible-playbook playbooks/ora_stand_datapatch.yml -e server=wayland -e oracle_sid=GENOSISPRD
# bakura
########
ansible-playbook playbooks/ora_stand_patch_oh.yml \
-e server=bakura \
-e oracle_sid=SET19 \
-e opatch_zip=/mnt/yavin4/kit/Oracle/opatch/p6880880_190000_Linux-x86-64.zip \
-e dbru_zip=/mnt/yavin4/kit/Oracle/Oracle_Database_19/patch/GIRU_19.31/p39036936_190000_Linux-x86-64.zip
ansible-playbook playbooks/ora_stand_patch_oh.yml \
-e server=bakura \
-e oracle_sid=SET26 \
-e opatch_zip=/mnt/yavin4/kit/Oracle/opatch/p6880880_230000_Linux-x86-64.zip \
-e dbru_zip=/mnt/yavin4/kit/Oracle/Oracle_Database_26/patch/GIRU_23.26.2.0.0/p39088031_230000_Linux-x86-64.zip
@@ -76,7 +76,7 @@
. oraenv <<< {{ oracle_sid }} >/dev/null 2>&1
$ORACLE_HOME/bin/sqlplus -s / as sysdba <<'SQL'
set heading off feedback off verify off pagesize 0
select name||':'||open_mode from v$pdbs where name!='PDB$SEED';
select name||':'||open_mode||':'||restricted from v$pdbs where name!='PDB$SEED';
exit
SQL
register: pdb_list
@@ -91,15 +91,19 @@
- name: Show PDB list (if multitenant)
debug:
var: pdb_list.stdout_lines
msg: |
PDB, OPEN, RESTRICTED
{% for pdb in pdb_list.stdout_lines %}
{{ pdb }}
{% endfor %}
when: oracle_sid is defined and is_multitenant
- name: Check for non-OPEN PDBs
- name: Check for non-OPEN PDBs or RESTRICTED PDBs
shell: |
. oraenv <<< {{ oracle_sid }} >/dev/null 2>&1
$ORACLE_HOME/bin/sqlplus -s / as sysdba <<'SQL'
set heading off feedback off verify off pagesize 0
select name||':'||open_mode from v$pdbs where name!='PDB$SEED' and upper(open_mode) not like '%READ WRITE%';
select name||':'||open_mode||':'||restricted from v$pdbs where name!='PDB$SEED' and (upper(open_mode) not like '%READ WRITE%' or upper(restricted) = 'YES');
exit
SQL
register: pdb_not_open
@@ -117,3 +121,173 @@
msg: "PDB(s) not OPEN: {{ pdb_not_open_filtered }}"
when: oracle_sid is defined and is_multitenant and (pdb_not_open_filtered | length) > 0
- name: Execute datapatch
shell: |
. oraenv <<< {{ oracle_sid }} >/dev/null 2>&1
$ORACLE_HOME/OPatch/datapatch
register: datapatch_output
changed_when: false
when: oracle_sid is defined
- name: Show datapatch output
debug:
var: datapatch_output.stdout_lines
when: oracle_sid is defined
- name: Remove temporary SQL files from remote host
file:
path: "{{ item }}"
state: absent
loop:
- /tmp/dba_invalid_objects.sql
- /tmp/dba_registry.sql
when: oracle_sid is defined
- name: Execute utlrp.sql in CDB$ROOT
shell: |
. oraenv <<< {{ oracle_sid }} >/dev/null 2>&1
$ORACLE_HOME/bin/sqlplus -s / as sysdba <<'SQL'
@$ORACLE_HOME/rdbms/admin/utlrp.sql
exit
SQL
register: utlrp_root
changed_when: false
when: oracle_sid is defined
- name: Get list of PDBs for utlrp execution
shell: |
. oraenv <<< {{ oracle_sid }} >/dev/null 2>&1
$ORACLE_HOME/bin/sqlplus -s / as sysdba <<'SQL'
set heading off feedback off verify off pagesize 0
select name from v$pdbs where name!='PDB$SEED' and open_mode like '%READ WRITE%' and restricted='NO';
exit
SQL
register: pdb_names
failed_when: false
changed_when: false
when: oracle_sid is defined and is_multitenant
- name: Execute utlrp.sql in each PDB
shell: |
. oraenv <<< {{ oracle_sid }} >/dev/null 2>&1
$ORACLE_HOME/bin/sqlplus -s / as sysdba <<'SQL'
alter session set container={{ item | trim }};
@$ORACLE_HOME/rdbms/admin/utlrp.sql
exit
SQL
loop: "{{ pdb_names.stdout_lines | default([]) }}"
loop_control:
label: "{{ item }}"
register: utlrp_pdb_results
changed_when: false
failed_when: false
when: oracle_sid is defined and is_multitenant and (pdb_names.stdout_lines | default([]) | length) > 0
- name: Copy dba_invalid_objects.sql to remote host
copy:
src: ../files/scripts/sql/dba_invalid_objects.sql
dest: /tmp/dba_invalid_objects.sql
mode: '0644'
when: oracle_sid is defined
- name: Copy dba_registry.sql to remote host
copy:
src: ../files/scripts/sql/dba_registry.sql
dest: /tmp/dba_registry.sql
mode: '0644'
when: oracle_sid is defined
- name: Execute dba_invalid_objects.sql in CDB$ROOT
shell: |
. oraenv <<< {{ oracle_sid }} >/dev/null 2>&1
$ORACLE_HOME/bin/sqlplus -s / as sysdba <<'SQL'
@/tmp/dba_invalid_objects.sql
exit
SQL
register: dba_invalid_root
changed_when: false
when: oracle_sid is defined
- name: Show dba_invalid_objects.sql results in CDB$ROOT
debug:
var: dba_invalid_root.stdout_lines
when: oracle_sid is defined
- name: Execute dba_registry.sql in CDB$ROOT
shell: |
. oraenv <<< {{ oracle_sid }} >/dev/null 2>&1
$ORACLE_HOME/bin/sqlplus -s / as sysdba <<'SQL'
@/tmp/dba_registry.sql
exit
SQL
register: dba_registry_root
changed_when: false
when: oracle_sid is defined
- name: Show dba_registry.sql results in CDB$ROOT
debug:
var: dba_registry_root.stdout_lines
when: oracle_sid is defined
- name: Execute dba_invalid_objects.sql in each PDB
shell: |
. oraenv <<< {{ oracle_sid }} >/dev/null 2>&1
$ORACLE_HOME/bin/sqlplus -s / as sysdba <<'SQL'
alter session set container={{ item | trim }};
@/tmp/dba_invalid_objects.sql
exit
SQL
loop: "{{ pdb_names.stdout_lines | default([]) }}"
loop_control:
label: "{{ item }}"
register: dba_invalid_pdb_results
changed_when: false
failed_when: false
when: oracle_sid is defined and is_multitenant and (pdb_names.stdout_lines | default([]) | length) > 0
- name: Show dba_invalid_objects.sql results in PDBs
debug:
msg: |
dba_invalid_objects.sql output for PDB: {{ item }}
{{ dba_invalid_pdb_results.results[pdb_names.stdout_lines.index(item)].stdout }}
loop: "{{ pdb_names.stdout_lines | default([]) }}"
loop_control:
label: "{{ item }}"
when: oracle_sid is defined and is_multitenant and (pdb_names.stdout_lines | default([]) | length) > 0
- name: Execute dba_registry.sql in each PDB
shell: |
. oraenv <<< {{ oracle_sid }} >/dev/null 2>&1
$ORACLE_HOME/bin/sqlplus -s / as sysdba <<'SQL'
alter session set container={{ item | trim }};
@/tmp/dba_registry.sql
exit
SQL
loop: "{{ pdb_names.stdout_lines | default([]) }}"
loop_control:
label: "{{ item }}"
register: dba_registry_pdb_results
changed_when: false
failed_when: false
when: oracle_sid is defined and is_multitenant and (pdb_names.stdout_lines | default([]) | length) > 0
- name: Show dba_registry.sql results in PDBs
debug:
msg: |
dba_registry.sql output for PDB: {{ item }}
{{ dba_registry_pdb_results.results[pdb_names.stdout_lines.index(item)].stdout }}
loop: "{{ pdb_names.stdout_lines | default([]) }}"
loop_control:
label: "{{ item }}"
when: oracle_sid is defined and is_multitenant and (pdb_names.stdout_lines | default([]) | length) > 0
- name: Remove temporary SQL files from remote host
file:
path: "{{ item }}"
state: absent
loop:
- /tmp/dba_invalid_objects.sql
- /tmp/dba_registry.sql
when: oracle_sid is defined
@@ -125,17 +125,6 @@
state: absent
when: opatch_zip is defined
- name: Source oraenv and display OPatch informations
shell: |
. oraenv <<< {{ oracle_sid }} && $ORACLE_HOME/OPatch/opatch version && echo && echo && $ORACLE_HOME/OPatch/opatch lspatches
register: opatch_output
when: oracle_sid is defined
- name: Display OPatch output
debug:
var: opatch_output.stdout_lines
when: oracle_sid is defined
- name: Remove /app/oracle/staging_area if present
file:
path: /app/oracle/staging_area
@@ -255,3 +244,14 @@
state: directory
mode: '0755'
- name: Source oraenv and display OPatch informations (after OH patch)
shell: |
. oraenv <<< {{ oracle_sid }} && $ORACLE_HOME/OPatch/opatch version && echo && echo && $ORACLE_HOME/OPatch/opatch lspatches
register: opatch_output
when: oracle_sid is defined
- name: Display OPatch output (after OH patch)
debug:
var: opatch_output.stdout_lines
when: oracle_sid is defined