Database up time

Summary
The database up time in days + hours:minutes:seconds
SELECT DECODE(TRUNC(SYSDATE - LOGON_TIME), 0, NULL, TRUNC(SYSDATE - LOGON_TIME) || 
' Days' || ' + ') || TO_CHAR(TO_DATE(TRUNC(MOD(SYSDATE-LOGON_TIME,1) * 86400), 'SSSSS'), 
'HH24:MI:SS') UPTIME 
FROM v$session 
WHERE SID = 1;
Reviews
Filters
Search