SQL查询服务器硬盘剩余空间
关键代码如下所示:
DECLARE @tb1 Table ( drive varchar(20), [MB 可用空间] varchar(20) ) INSERT INTO @tb1 Exec master.dbo.xp_fixeddrives select drive , CAST( CAST((CAST([MB 可用空间] as decimal(9,2))/1024 ) as decimal(9,2)) as varchar)+'G' as 剩余空间 from @tb1
相关推荐
lxpandsq 2013-08-02
vanturman 2019-12-18
vanturman 2019-12-17
furongwei 2019-12-14
insularisland 2007-04-22
sjpeter 2014-03-07
thone00 2011-12-14
包包 2012-05-18
lxpandsq 2015-06-02
lxyd000 2018-05-26
jzhf0 2016-06-10
oLiGuangZhi 2019-03-27
cxlabc 2011-05-12
miaoheping 2015-12-27
duolezengjie 2014-09-18
meteorshower0 2019-04-06
hardccyy 2009-08-11
linkelinux 2007-02-14