it is easy to find out which patches have been applied to the oracle software with opatch lsinventory. But what about the database? How can I find out if the corresponding sql has been applied?
My actual problem:
I've an environment (Linux) with 12.1.0.2.4 (so latest patchest). If I create a new database (regardless if I use a predefined default template like "General Purpose" or create a "custom database") I cannot see that the PSU has been applied. My theory is that the predefined template shouldn't have the patch applied while the custom database should.
I've checked with
SELECT patch_id, version, status, bundle_id, bundle_series
FROM dba_registry_sqlpatch;
but both database came back with no rows returned.
If I run datapatch it applies the patch so after that the output of the query looks like this:
PATCH_ID VERSION STATUS BUNDLE_ID BUNDLE_SERIES
---------- -------------------- --------------- ---------- ------------------------------
20831110 12.1.0.2 SUCCESS 4 PSU
but that's not what I expected as a new database should pick up the newest version of the sql scripts.