Find Date after Upgrade or Downgrade in Oracle
Today, my one DBA friend asked about how to validate the database upgraded or downgraded from which version along with what was the date. So, I thought it better to publish which helps my DBA friends. Below is an SQL command to validate in the database about the previous version along with on which date it was upgraded.
SQL statement to find previous & upgraded/downgraded version along with the date. Click here for sample output.
SET LINES 333
COLUMN NAME FOR A11
COLUMN ACTION_TIME FORMAT A21
COLUMN ACTION FORMAT A11
COLUMN NAMESPACE FORMAT A11
COLUMN VERSION FORMAT A11
COLUMN COMMENTS FORMAT A31
SELECT NAME "DB_NAME", TO_CHAR(ACTION_TIME, 'DD-MON-YYYY HH24:MI:SS') AS ACTION_TIME,
ACTION,
NAMESPACE,
VERSION,
ID,
COMMENTS
FROM V$DATABASE, REGISTRY$HISTORY WHERE ACTION LIKE '%UPGRADE%'
ORDER BY ACTION_TIME;
prompt$$$$$$$**Welcome to DBsGuru!**Share Learn Grow**$$$$$$$
We always encourage the technical person to visit section SCRIPTS to get more daily usage SQL commands.
Hope so you like this script!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the most recent update. Click here to know more about our pursuit.