Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2389
  • Last Modified:

Logging Perfmon counter to a SQL Table

How do you log Perfmon counters to a SQL Server 2005 database.

Step by Step instructions preferred.

Thanks
0
rdray
Asked:
rdray
  • 5
  • 4
1 Solution
 
ptjcbCommented:
In Performance > Performance Logs and Alerts

Right-click on counter logs - create new log settings

add performance counters

Log Files tab

Change the log file type to SQL Database
0
 
rdrayAuthor Commented:
I did that.  Do I need to configure an odbc connection?  Do I need to set up a table or will perfmon create one?
0
 
ptjcbCommented:
http://support.microsoft.com/kb/296222

I followed the instructions to create an ODBC data source and then the perfmon logs. The tables are automatically created in the database used by the ODBC source.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
rdrayAuthor Commented:
I am getting an error when I try to run permon with the counters pointed to my sql database.

Event Type:      Warning
Event Source:      SysmonLog
Event Category:      None
Event ID:      2004
Date:            10/9/2007
Time:            7:15:37 AM
User:            N/A
Computer:      SQL-HELP
Description:
The service was unable to open the log file SQL:SQLMon!SQLMon for log SQLMon and will be stopped. Check the log folder for existence, spelling, permissions, and ensure that  no other logs or applications are writing to this log file. You can reenter the log file name using the configuration program.   This log will not be started. The error returned is: .

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: e1 0b 00 c0               á..À    
0
 
ptjcbCommented:
Probably a permission issue.

FROM http://www.jsifaq.com/SF/Tips/Tip.aspx?id=8011
This behavior occurs because the Performance Logs and Alerts service is running in the Network Service  account context, which does not have sufficient permissions to save the SQL performance counters in a trace file.

To fix this problem:

1. Start / Run / Services.msc / OK.

2. Double-click Performance Logs and Alerts.

3. Select the Log On tab.

4. Select the Local System account radial button.

5. Press Apply and OK.
0
 
rdrayAuthor Commented:
I changed the network service to local system and still fails.


when I set up the DSN the test work fine.  I set up the log to push to the DSN and it fails with a problem opening the SQL Database.

I created an accout on the Server.
Created the database.

do I need to create the tables in the database.
0
 
ptjcbCommented:
As I said before, the tables are automatically created in the database. I did this on my local computer and it is working. I stopped it after a day.
0
 
rdrayAuthor Commented:
Thank you for your time.
0
 
ptjcbCommented:
No problem. It's probably a network setting.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now