wzp
2022-10-26 a3022b7241480fd71dae97443d98f12e313056be
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
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()
    {
    }
  }
}