ASP + MS-SQL 사용중인 DB 용량보기
'사용중인 DB 용량 Free/Used/Total
Function getDBSize()
Dim strSql, sizeRs, freeSize
strSql = "sp_spaceused" '내장프로시져명
set sizeRs = conn.execute(strSql)
freeSize = replace(sizeRs(1),"MB","") - replace(sizeRs(2),"MB","")
getDBSize = "<span style='color:red;'> Free : " & freeSize & " MB</span> / "&_
"<span style='color:green;'>Used : " & sizeRs(2) & "</span> / " &_
"<span style='color:#ff6600;'>Total : " & sizeRs(1) & "</span>"
SizeRs.close
Set SizeRs = nothing
End Function
'사용법
Response.write getDBSize()