sqlserver数据库获取数据库信息

zh_bx 18 0 PDF 2020-12-17 11:12:46

MS SQL SERVER 获取当前数据库文件等信息,适用于多个版本: 代码如下:SELECT dbf.file_id AS FileID , dbf.name AS [FileName] , s.filename AS FileLocation , CAST(dbf.size/128.0 AS DECIMAL(19,2)) AS FileSizeMB , CAST(CAST(FILEPROPERTY(dbf.name, ‘SpaceUsed’) AS int)/128.0 AS DECIMAL(19,2)) AS SpaceUsedMB , CAST(dbf

用户评论
请输入评论内容
评分:
暂无评论