Recently I was working on one of the servers to analyze the performance using Performance Counters which were collected historically for a long period of time.
I noticed some of the needed counters were missing for the collection.
So what was happening with that server where performance counters were missing? After running the following query on current snapshot of performance counters, I did not get the result. SQL Server was not reporting any counters.
After doing some research I found that there is one configuration file that lists all the performance counters which SQL Server loads. The name of the performance counter configuration file is generally perfsqlctr.ini or perf-sqlctr.ini located in Binn directory.
To precisely get the file name and location, you may take help from Registry.
- In Registry Go to HKLM\SYSTEM\CurrentControlSet\services\
- Extract the value from Key ImagePath until Binn
- Go to HKLM\SYSTEM\CurrentControlSet\services\[InstanceName]
\Performance - Extract the value from key PerfIniFile
- Merge the values from #2 and #4, that is the file name which has all of the counters.
Now you got all of the file names needed, follow these steps to reload the counters.
- Open file in text editor, make sure that all of the needed counters are there in the file, if not there then add counter while matching the format of existing counters.
- Unload the Counters
- If Default Instance then run following command from shell.
- Unlodctr MSSQLSERVER
- If Named Instance then run the following command from shell.
- Unlodctr MSSQL$[ServiceName]
- Restart the MSSQL Service for that instance
- Reload the counters with following command from shell.
- Lodctr [path\file you got in #5]
- Restart MSSQLService for the instance
495D83081D
ReplyDeleteMany businesses are now focusing on enhancing their online presence to reach a broader audience. A well-designed website plays a crucial role in achieving this goal, providing potential customers with easy access to products and services. By investing in user-friendly interfaces and engaging content, companies can significantly improve their visibility and credibility. For more information, visit the website.
ReplyDeleteWhen it comes to customizing your apparel, finding the right transfer method is essential. Many entrepreneurs and hobbyists turn to innovative solutions like Dtf transfer for t shirts to achieve high-quality prints. This method offers vibrant colors and durable results, making it a popular choice for various designs. Whether you're creating personalized gifts or starting a small business, DTF transfers can help you produce professional-looking apparel with ease.