Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 capture hostname OR IP counter ?

Author  Topic 

nhuanlieu
Starting Member

27 Posts

Posted - 2009-02-17 : 16:21:34
Hello, I want to periodically (every 15 mins or so) capture hostname OR IP counter of the calling host/IP in Windows Performance Monitor, but i don't see that object/counter? Is that possible?

The closest thing comes to mind is the SQL build-in "Activity Monitor" tool, but I don;t see an option in SQL Profile to allow me to can take a snapshot every 15 mins.

Thanks.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-02-17 : 16:23:04
I don't understand what you mean. Are you referring to the hostname/IP of the client machine that is accessing SQL Server?

You can take a snapshot of "Activity Monitor" by creating a SQL job that queries master.dbo.sysprocesses every 15 minutes.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-17 : 16:34:22
You could run batch file with windows task scheduler every 15 mins to capture IP counter of calling host.
Go to Top of Page

nhuanlieu
Starting Member

27 Posts

Posted - 2009-02-17 : 17:16:54
"Are you referring to the hostname/IP of the client machine that is accessing SQL Server?"

YES

"You can take a snapshot of "Activity Monitor" by creating a SQL job that queries master.dbo.sysprocesses every 15 minutes"

THAT DOES IT, THANKS.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-17 : 17:29:38
I run this in batch file to get information from windows task scheduler:

:: @ECHO OFF

:: *********** Version 1.0 **************

SET APP=C:\WINDOWS\system32\netstat.exe

:TOP

SET FILEDATE=%DATE:~-10%

SET FILEDATE=%FILEDATE:/=_%

SET LOGFILE=D:\temp\netstat_out_%FILEDATE%.log

ECHO . >>%LOGFILE%

ECHO %DATE% %TIME% >>%LOGFILE%

%APP% -a >> %LOGFILE%

ECHO %DATE% %TIME% >>%LOGFILE%

ECHO . >>%LOGFILE%

exit
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-02-17 : 18:04:08
quote:
Originally posted by nhuanlieu

"Are you referring to the hostname/IP of the client machine that is accessing SQL Server?"

YES

"You can take a snapshot of "Activity Monitor" by creating a SQL job that queries master.dbo.sysprocesses every 15 minutes"

THAT DOES IT, THANKS.



You're welcome.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -