How to Check Database Uptime in Oracle
Introduction
As a DBA, you may need to know how long the Oracle database has been running without a restart. This information is useful for troubleshooting, reporting, and monitoring stability.
Step 1: Check Instance Startup Time
SELECT instance_name, startup_time
FROM v$instance;
This shows the exact date and time when the database was last started.
Step 2: Calculate Uptime in Days/Hours
SELECT (SYSDATE - startup_time) AS days_up
FROM v$instance;
This gives the number of days since last startup.
Step 3: Find Database Host Uptime (Linux)
Sometimes you also need the OS uptime (not just Oracle):
uptime
This shows how long the Linux server itself has been running.
Conclusion
Checking Oracle database uptime is quick and simple. It helps DBAs ensure system stability and identify if recent restarts were the cause of performance or availability issues.

Comments
Post a Comment