发布-日期: 2015年06月16日 (评论)
这是一些从xp_fixed驱动器获取结果,并将其放在一个表中的快速逻辑。然后对该表的快速查询显示还有多少GB可用空间量。这个逻辑快速而简单。
Here’s some quick logic which takes the results from xp_fixed drives, and puts it in a table. Then a quick query against that tables shows the amount of free space in GB. It’s quick, and simple. Those are the best ones.
use master;
set nocount on
if exists (select object_id('tempdb..#get_drive_info'))
drop table #get_drive_info
create table #get_drive_info
(
drive char(1) not null
, mbfree int not null
)
insert into #get_drive_info
exec xp_fixeddrives
select
'drive' = drive
, 'gb free' = mbfree / 1024
from
#get_drive_info
order by
drive asc
Build Quality | Build History | ||||
---|---|---|---|---|---|
- 李聪明的数据库 Lee's Clever Data
- Mike的数据库宝典 Mikes Database Collection
- 李聪明的数据库 "Lee Songming"