I recently came across some issues running perfmon on Windows Server 2003 where the OS is 64-bit and SQL Server is 32-bit (Wow64). The SQL Performance counters were not appearing as the default Perfmon is 64-bit, which is unable to read the 32-bit SQL counters. Running the 32-bit version of Perfmon allows us to read the SQL counters. This can be done by either running the C:\WINDOWS\syswow64\smlogsvc.exe file directly or running the following from the command-line:
mmc /32 Perfmon.msc
So far, so good. However, attempts to create a performance counter log were failing as the Performance Logs and Alerts service was configured to use the 64-bit version of the smlogsvc executable. This was fixed by modifying the following registry keys (the usual warnings regarding modifying the registry apply here):
1) HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SysmonLog\ImagePath, change ImagePath value from %SystemRoot%\system32\smlogsvc.exe to %SystemRoot%\syswow64\smlogsvc.exe 2) HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\SysmonLogEventMessageFile, change EventMessageFile value from %SystemRoot%\system32\smlogsvc.exe to %SystemRoot%\syswow64\smlogsvc.exe
Perfmon can then be started with the /32 switch (or run the C:\WINDOWS\syswow64\smlogsvc.exe file directly) and the SQL counters succesfully logged.
How It Works: Almost Everything You Wanted To Know About The SQL Server (2005, 2008) Performance Counter Collection Components http://blogs.msdn.com/psssql/archive/2009/03/03/how-it-works-almost-everything-you-wanted-to-know-about-the-sql-server-2005-2008-performance-counter-collection-components.aspx
This doesn't apply to WIndows 2008 R2. Just ensure the Performance Counter DLL Host service is started.