using Common; using System; using System.Data; namespace Dao { public class GwUtilityDao : IDisposable { public DataTable GetTableSpaceStatis() { return OracleHelper.Execute("select total.tablespace_name,\r\n  round(total.MB, 2) as Total_MB,\r\n  round(total.MB - free.MB, 2) as Used_MB,\r\n  round((1 - free.MB / total.MB) * 100, 2) as Used_Pct\r\n  from (select tablespace_name, sum(bytes) / 1024 / 1024 as MB\r\n  from dba_free_space\r\n  group by tablespace_name) free,\r\n  (select tablespace_name, sum(bytes) / 1024 / 1024 as MB\r\n  from dba_data_files\r\n  group by tablespace_name) total\r\n  where free.tablespace_name = total.tablespace_name AND total.tablespace_name in ('SMGWLOG','SMGWDAT')", OracleHelper.Connection); } public void Dispose() { } } }