2012. 11. 23.

scripts] ms sql server total size check


'// sql server
'// Displays the total size of a SQL Server database
'//

strDBServerName = "database server name"
strDBName = "ScriptingGuysTestDB"

Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName

Set objDB = objSQLServer.Databases(strDBName)
WScript.Echo "Total Size of Data File + Transaction Log of DB " & strDBName & ": " & objDB.Size & "(MB)"

댓글 없음:

댓글 쓰기