1 Reply Latest reply on Sep 18, 2015 2:47 PM by d09h

    how can I generate a Down Nodes type of resource via Microsoft SQL Server Management Studio


      I was inspired by the below article to rewrite something that no longer works for me.


      SQL Server Reference Guide | Powershell and SQL Server - Web Pages from a SQL Query | InformIT


      I want to create an HTML file of down nodes and move it to a Linux server.  I already do this on each of my two pollers.  Ideally, this would be one HTML file that I would move to a Linux server.  So I'm doing it from my SQL server rather than each of my two pollers using NCM.  (The obvious way of having Linux server wget has been tried and works, but not with PKI...hence my attempts at workarounds.  I am not the admin of the Linux server.)  If I was running PowerShell v3 on my SolarWinds servers, I know I would have some options similar to wget.  Unfortunately I'm running PowerShell v2.  v3 is too far out for me to wait for that option.


      The reference to which I linked seems like it could work, but I'm a little hung up on how to execute against the correct table of the correct database--'SolarWindsOrion'.


      When I launch Microsoft SQL Server Management Studio, I see the following:


      <my server name, which I'm redacting here>\SOLARWINDS (SQL Server 10.50.2550 - <domain redacted>\<username redacted>)


      System Databases

      Database Snapshots





           Database Diagrams


                System Tables





      My SQL query against dbo.Nodes is dead simple--Select Caption, Status FROM [SolarWindsOrion].[dbo].[Nodes]


      Any suggestions on how to set this up?  I envision a service account running this so that an updated 'Down Nodes.html' file will be copied to my Linux server.  The movement of the file is not the issue.  The URL I referenced uses SQLText.txt in C:\temp\ for the SQL query.So my text file would be something like the query in the preceding paragraph.


      Is [SolarWindsOrion].[dbo].[Nodes] specific enough that my query definitely won't run elsewhere (for example, in ConfigMgmt)?