posts - 9, comments - 4, trackbacks - 0, articles - 21
SYBASE ASE查询日志空间使用情况
select
    s.name,
    (select max(convert(int,t.status & 1))
    from <YOUR_DATABASE>.dbo.systhresholds t
    where s.segment=t.segment) status, sum(u.size)*2 size,
    sum(u.size - curunreservedpgs(u.dbid, u.lstart, u.unreservedpgs))*2.000/1024 used,
    @@thresh_hysteresis hysteresis
from
    <YOUR_DATABASE>.dbo.syssegments s, master.dbo.sysusages u
where
    1 = 1
    and ((u.segmap / ((s.segment & 1) + 1)) / power(2, (s.segment & 30))) & 1 = 1
    and u.dbid = db_id('YOUR_DATABASE') and s.name like '%'
group by
    s.name
order by 1  


只有注册用户登录后才能发表评论。


网站导航: