i have a vbscript to connect to the sqlServer
strDBServerName = "."
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)"
How to i impersoante this to a specific user.
i tried
objSQLServer.LoginSecure = False
objSqlServer.Login = "UserName"
objSQLServer.Password = "Password"
but it didn;t work


