Saturday, September 14, 2019

Oracle Database PSU version

Oracle Database PSU version

Query

with a as
(
        select xmltype(xml_inventory) patch_output
        from sys.opatch_xml_inv
),
xt as
(
select x.*
from a, xmltable(
        'InventoryInstance/patches/*'
        passing a.patch_output
        columns
        patchID number path 'patchID',
        patchDescription varchar2(80) path 'patchDescription'
) x
where regexp_like(patchDescription, 'Database Patch Set Update')
)
select patchDescription
from xt
where patchID = ( select max( patchID ) from xt )
;

OUTPUT

@psu_version.sql


PATCHDESCRIPTION
--------------------------------------------------------------------------------

Database Patch Set Update : 12.1.0.2.190115 (28729169)




O






No comments: