Monday 17 September 2012

How to Connect PerfMon to a Remote Server ?

Till now, we do not have any third party tool to monitor the SQL server, but we have implemented many custom alerts and report to help us in this regards.As our environments are growing,  we have decided to evaluate couple of third party monitoring tools. Yesterday we have installed the Red Gate  SQL monitor, but we were not able to add any of our servers to this tool to enable the monitoring. Sql Monitor was not able to establish the connection with the servers, that we need to monitor.On searching Red Gate website, we found the basic requirement to work this tool is , PerfMon should be able to connect to the remote servers from the server where the Sql Monitor is installed.In our case, both servers are in different domains.

The first issue was, we were not able to ping the server using the name as the DNS were not resolving the name correctly.We have fixed the issue by adding an entry in the hosts file (C:\Windows\System32\drivers\etc)  as  given below 

Now we are able ping the server using the server name without any restart. When we tried to access the remote server through PerfMon, it was throwing an error "unable to connect to the machine". Then we  have realized that, to connect the a remote server through PerfMon, the remote server should be able to communicate through port number 445. Telnet test showed us the communication between the local server and remote server through port number 445 is blocked. On opening the port, we were able to connect the server using telnet. You may not face this issue,if both servers are in the same domain as the communication through port 445 may be open by default.Again when we tried to connect the remote server, it was throwing the same error but surprisingly we were able to connect the server using the Red Gate Sql Monitor tool. Again we tried with PerfMon, it was not able to connect the remote server . Then we have realized that , PerfMon is trying to the connect the remote server using the logged in user account which will not work by default as both servers are in different domain. The next step to run the perfmon using a different user account which has access to the remote server. This can be achieved by running the below command from command prompt. (open the command prompt window with Run As Administrator option).
runas /netonly /user:MyserverDomain\MyUser "perfmon"

On running this command, it will ask for the password. On entering the password, it will open the PerfMon and you should be able to access the remote server. If you are still facing the issues, follow the below step:
  • Open the registry(regedit) on the local machine. 
  • Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib 
  • Right click on Perflib and select Permission
  • Add LOCAL SERVICE with Full Control
  • Restart the Remote Registry Service (services.msc)
If you liked this post, do like my page on FaceBook


  1. Try to use this solution to monitor remote computer's performance

  2. Nice post John!! Got question for you, where to supply machine/server name(\\MyServer) in following command?
    runas /netonly /user:MyserverDomain\MyUser "perfmon"

  3. Try to use this one

  4. Thank a lot !! I am facing many of this issue right now. Hope it will work when I will be back at work this Monday :) :)

  5. Good article and knowledge for me! I found a lot of information here!

  6. swagbucks money
    Can You Get Real Money From Swagbucks?


  7. survey bypass tool
    Top 5 Free Calling Websites Without Registration 2020

  8. Roblox is a multiplayer virtual game where you could appreciate the activity and arcade venture with your companions and make your own virtual reproduction world where you can assemble the structure, make the homestead, change your symbol, adjust the city, and some more. roblox free robux