SQL查询服务器硬盘剩余空间

栏目: 数据库 · 发布时间: 8年前

内容简介:这篇文章主要介绍了SQL查询服务器硬盘剩余空间的相关资料,非常不错,具有参考借鉴价值,需要的朋友可以参考下

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

以上所述就是小编给大家介绍的《SQL查询服务器硬盘剩余空间》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Google's PageRank and Beyond

Google's PageRank and Beyond

Amy N. Langville、Carl D. Meyer / Princeton University Press / 2006-7-23 / USD 57.50

Why doesn't your home page appear on the first page of search results, even when you query your own name? How do other web pages always appear at the top? What creates these powerful rankings? And how......一起来看看 《Google's PageRank and Beyond》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具