Code: ( text )
select hostname, count(*) from master.sys.sysprocesses group by hostname
When trying to implement this to write out to a asp page, the result is the machine that is hitting the DB and nothing more. This works for a MS SQL 2000 but why doesn't it work for 2005. Here is the ado snippt I am using to connect to the DB using DSN.
Code: ( text )
Set objConn = server.CreateObject("ADODB.Connection")
objConn.Open "dbserver", "user", "password"
strSQL = "select hostname, count(*) as ""Connection"" from master..sysprocesses (nolock) group by hostname order by ""Connection"" desc"
Set sqlData = objConn.Execute(strSQL)
It occurs on objConn.Open, or on objConn.Execute?|||The odd thing is, I am not getting any Errors.
The page works but it doesn't show the correct information.
What it shows is the web machine that is accessing the sql 2005 machine.|||
Quote:
Originally Posted by rvl1980
The odd thing is, I am not getting any Errors.
The page works but it doesn't show the correct information.
What it shows is the web machine that is accessing the sql 2005 machine.
This is what I get from 2000 and 2005 sql from my asp.
From MS SQL 2000 using asp to display
Host Num of Connection(s)
Server123 118
WSX0160 90
From MS SQL 2005 using asp to display
Host Num of Connection(s)
TRACKING 1|||I guess there no help with this?
No comments:
Post a Comment