0
GetDBUptime
emcs
38次下载
344次浏览
2019-07-24
4.5

脚本内容

COLUMN STARTED_AT format A25
COLUMN UPTIME format A50
SELECT TO_CHAR (startup_time, 'DD-MON-YYYY HH24:MI:SS') started_at,
           TRUNC (SYSDATE - (startup_time))
       || ' day(s), ' || TRUNC (  24 * ((SYSDATE - startup_time) -
       TRUNC (SYSDATE - startup_time)))
       || ' hour(s), '|| MOD (TRUNC (  1440 * (  (SYSDATE - startup_time) -
       TRUNC (SYSDATE - startup_time))),60)
       || ' minute(s), '|| MOD (TRUNC (  86400 * (  (SYSDATE - startup_time) -
       TRUNC (SYSDATE - startup_time))),60)
       || ' seconds' uptime
FROM v$instance;

评论

贡献排行榜