Query to find database uptime in Oracle
Query to find database uptime SELECT host_name , instance_name , TO_CHAR(startup_time, 'DD-MM-YYYY HH24:MI:SS') …
Query to find the space used by a table
SELECT DS.TABLESPACE_NAME
, SEGMENT_NAME
, ROUND(SUM(DS.BYTES) / (1024 \ * 1024)) AS MB
, ROUND(SUM(DS.BYTES) / (1024 \ * 1024 \ * 1024)) AS GB FROM DBA_SEGMENTS DS
WHERE SEGMENT_NAME IN (SELECT TABLE_NAME FROM DBA_TABLES WHERE TABLE_NAME = 'REQUIRED_TABLE_NAME')
GROUP BY DS.TABLESPACE_NAME
,SEGMENT_NAME;
Query to find database uptime SELECT host_name , instance_name , TO_CHAR(startup_time, 'DD-MM-YYYY HH24:MI:SS') …
Query to find the queries executed by an user in Oracle SELECT VS.USERNAME , VS.MACHINE , VS.PROGRAM , VS.STATUS , …