用什么命令可以显示数据库的剩余空间
用什么命令可以显示数据库的剩余空间 <p>sp_helpdb <your_database_name></p> <p>select s.name, (select max(convert(int,t.status & 1)) from <em>zbtest</em>.dbo.<br/>systhresholds t where s.segment=t.segment) status, sum(u.size) size, sum(u.size <br/>- curunreservedpgs(u.dbid, u.lstart, u.unreservedpgs)) used, @@thresh_hysteresis <br/>hysteresis from <em>zbtest</em>.dbo.syssegments s, master.dbo.sysusages u where 1 = 1 and <br/>((u.segmap / ((s.segment & 1) + 1)) / power(2, (s.segment & 30))) & 1 = 1 and u.<br/>dbid = db_id('<font color="#000000"><em>zbtest</em></font>') and s.name like '%' group by s.name order by 1 </p><p>将zbtest 换成你的数据库名</p><p></p> sp_spaceused up
页:
[1]