You are hereLongitude Knowledge Book / kb76: SQL Server collections fail due to missing performance counters

kb76: SQL Server collections fail due to missing performance counters


By csmith - Posted on 16 November 2009

Some Longitude SQL collections (e.g. BufferManager, CacheManager, Databases, Locks, MemoryManager) rely on SQL Server performance objects. If the performance objects are missing, the collections will not return any data. To resolve the problem, reload the SQL Server performance objects on the managed device as follows:

  1. Run the following from a command prompt to unload the existing counters:
    unlodctr.exe {MSSQLServer}

    Where {MSSQLServer} is the name of the SQL Server instance. The default instance is usually "MSSQLServer", and named instances are usually "MSSQLServer$Instance", with "Instance" being the instance specific name.

  2. Run the following from a command prompt to load the counters for the instance:
    lodctr.exe {MSSQLServer} {path_to_SQL/binn}/sqlctr.ini

  3. After loading new performance counters, you should see the counters listed in PerfMon. To make them available to WMI, do the following:
    1. run the command:
      winmgmt /clearadap
    2.  

    3. run the command:
      winmgmt /resyncperf
    4.  

    5. restart the Windows Management Instrumentation service
    6.  

    7. If WMI collections still do not register for the SQL application, reboot the managed device.