[MSSQL]xp_cmdshell 查看磁盘空间
EXEC xp_cmdshell 'wmic logicaldisk get freespace,caption | findstr C'; <class 'pyodbc.Row'> ('C: 25581236224 \r', )
查看所有磁盘可用空间
Exec master.dbo.xp_fixeddrives;
获取数据库、日志文件路径
select filename from student.dbo.sysfiles;
EXEC xp_cmdshell 'wmic logicaldisk get freespace,caption | findstr C'; <class 'pyodbc.Row'> ('C: 25581236224 \r', )
查看所有磁盘可用空间
Exec master.dbo.xp_fixeddrives;
获取数据库、日志文件路径
select filename from student.dbo.sysfiles;