title: How to remotely collect windows performance counters through sql server
body: <p>I'd like my application (which is deployed to thousands of locations) to be able to monitor its own environment, in particular the sql server box. When the SQL Server is local, this is easy to do as I can use the System.Diagnostics library and collect the windows performance counters through that. When the SQL server is remote however I have a problem because I cannot guarantee that my c# application (a windows service in this case) has access to the remote sql server machine OTHER THAN the fact that I know it can access the SQL Server.</p>
  
  <p>Any ideas on how I can collect the windows performance counters off that machine through SQL?</p>
  
  <p>One way I've thought of is to use SQL CLR, but it seems to require UNSAFE access, which I'm pretty sure I don't want.</p>
  
  <p>Thanks</p>