September 8, 2015

Uptime of Oracle database

Simple query to obtain the last start date of an Oracle instance:

SELECT to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') "DB Startup Time"
FROM sys.v_$instance;

Should generate an output similar to this:

DB Startup Time
--------------------------
22-AUG-2015 00:22:21