ExaGridDba

psuvers.sql: get Oracle Database PSU version

Jun 4th, 2017
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. -- psuvers.sql
  2. -- get Oracle Database PSU version
  3. with a as
  4. (
  5. select xmltype(xml_inventory) patch_output
  6. from sys.opatch_xml_inv
  7. ),
  8. xt as
  9. (
  10. select x.*
  11. from a, xmltable(
  12. 'InventoryInstance/patches/*'
  13. passing a.patch_output
  14. columns
  15. patchID number path 'patchID',
  16. patchDescription varchar2(80) path 'patchDescription'
  17. ) x
  18. where regexp_like(patchDescription, 'Database Patch Set Update')
  19. )
  20. select patchDescription
  21. from xt
  22. where patchID = ( select max( patchID ) from xt )
  23. ;
  24.  
  25. @ psuvers.sql
  26.  
  27. PATCHDESCRIPTION
  28. --------------------------------------------------------------------------------
  29. Database Patch Set Update : 12.1.0.2.170418 (25171037)
Advertisement
Add Comment
Please, Sign In to add comment