Is there a way for a non admin user to check the uptime of an Oracle instance? I.e. I don't have sysdba privileges.
CURRENT_DATE returns the current date in the session time zone, in a value in the Gregorian calendar of datatype DATE. The following statement shows the current date in 'DD-MON-YYYY HH24:MI:SS' format : SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS'; Session altered.
Try this. It doesn't require an admin user, although SELECT
access to the v_$instance
table.
SELECT to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') "DB Startup Time"
FROM sys.v_$instance;
Or, if you assume that PMON startup time is the same as the database startup time, you can get the uptime like this:
SELECT to_char(logon_time,'DD/MM/YYYY HH24:MI:SS')
FROM v$session
WHERE sid=1;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With