September 13, 2006 at 3:03 pm
does anyone know how to automate perfmon to log some counters into a SQL table and run for a certain amount of time each day
I want to setup collection of a few counters during the day for 8 hours every day and I can't seem to find a way to do it
Any help would be gratly appreciated.
Thanks,
Adam
September 13, 2006 at 4:26 pm
Probably can just capture data from master.dbo.sysperfinfo
A.J.
DBA with an attitude
September 14, 2006 at 7:04 am
What you want is a Counter Log in perfmon. The trick is to first create a DSN (ODBC Data Source Name) that points to the database where you will store the counter log data. If you first set up the DSN, when you configure the counter log in perfmon, you will select the "SQL Database" from the "Log file type" dropdown. Next pick "configure" to choose the DSN you created earlier. This process will direct the counter data output from your perfmon log to the database indicated in the DSN.
Credit: Shawn Calderon ; SQL Server Standard, May/June 2006.pp 16-23.
September 14, 2006 at 7:14 am
Thanks, but my main problem is trying to get perfmon to run every day for a specific time frame. I can only schedule a start and a stop time for 1 day. after that you have to go in and change the schedule to run for the next day and that is wha I am trying to automate. sysperfinfo would work great if it also contianed perfomance info for CPU,disk,memory, etc. Thanks for the suggestions, but does anyone know how to automate perfmon to run every day for a time frame?
September 14, 2006 at 8:49 am
You can setup the start and stop of the counter log via a Windows Scheduled Task.
Use the logman command line app. Type logman /? for the syntax.
--------------------
Colt 45 - the original point and click interface
September 14, 2006 at 8:57 am
Perfect - that looks like exactly what I need. Thanks for pointing me in the right direction.
February 23, 2007 at 8:22 am
Made a setup as mentioned above for logging some counters in a table. However it doesn't work as it should.
I'm using the same domain account (windows-authentication) for both the database i want to put the output in and running perfmon (both on the same server). DSN (ODBC Data Source Name) works correctly. The account has db-owner rights on the database an Administrator-rights on the server. Running the setup results in an error. Eventlog provides no clue.
MS-support has an Article: 296222 which describes the same setup.
Any suggestions??
February 23, 2007 at 8:36 am
specifically, what is the error you get?
October 8, 2009 at 10:48 am
Here's a good link on using Logman to do this:
http://www.mssqltips.com/tipprint.asp?tip=1776
MCITP, Database Administrator
A hodgepodge of Information Technology and Life
LinkedIn Profile
My Twitter
September 20, 2011 at 8:41 am
Old, dead thread, I realize, but perfcollect grabs perfmon counters from named and default sql instances. If you run it once, it will create a data collector set which you can modify and run at will.
Free for anyone to use. Contact the author (me) if you want any additional counters included.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply