Friday, March 9, 2012

Monitoring Active Connections

I realize this may be an elementary question for this newsgroup, but is there any way to monitor/log the number of ACTIVE concurrent connections in SQL/MSDE? I would like to log a week's worth of activity on our database to see if MSDE will work or if we
need to upgrade to full-blown SQL Server. DB size is not a concern (well below 2GB), and I don't believe connections will be either but I need data to prove it.
The performance counters in perfmon show sleeping as well as active connections. Our app is such that connections wake up, retrieve a small amount of data, and go back to sleep.
Sysprocesses gives you informaton about all the connections on your sql
server at the moment. You can run this in a loop and direct it to an output
file. You can also choose the columns you want.
Something like --
while (1=1)
begin
select getdate()
select * from master..sysprocesses
waitfor delay '00:00:15'
end
-- save above to .sql file and run from cmd line as
osql -Usa -P<password> -i<filenameabove> -o<outputfilename>
Cheers,
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
|||Sysprocesses gives you informaton about all the connections on your sql
server at the moment. You can run this in a loop and direct it to an output
file. You can also choose the columns you want.
Something like --
while (1=1)
begin
select getdate()
select * from master..sysprocesses
waitfor delay '00:00:15'
end
-- save above to .sql file and run from cmd line as
osql -Usa -P<password> -i<filenameabove> -o<outputfilename>
Cheers,
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

No comments:

Post a Comment