Download SQL Patch Info

  • Thanks Michael, 
    Glad to hear it's usefull 🙂
    Adding the EOL column is on my unfortunately rather long to-do list, so keep an eye on this forum.
    As for the EOL per SP/CU, thats simple enough, if there is a new one, the old SP/CU becomes obsolete.

    grtz,
    Theo.

  • With 2019 CTP 2.2 a ? was added to the version on the website.

    This crashes my script 🙁

    The fix is easy enough, just add the following lines to the script.

    ---------------------------------------------------------------------------------------------------------------------------------------------------
    -- ProductVersion fixes, so you can use SERVERPROPERTY('ProductVersion') to match your SQL instance build to sqlserverbuilds.blogspot.com
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    --2019--
    set @ID = (select ID from @out where ProductVersion = '15.00.1200.?')
    Update @out SET ProductVersion = '15.00.1200.0' where ID = @ID -- the minor version does not support a ?
    Update @out SET fileversion = '2018.150.1200.0' where ID = @ID -- the file version does not support a ?
    Update @out SET build = '15.0.1200.0' where ID = @ID -- the build does not support a ?

    delete FROM [ServerInfo].[dbo].[tblBuildList] where ReleaseDate = '2018-12-11' -- fix after the fact

  • Hi guys, 

    A new version of the website was posted today, and that change also needs a very small code change to the script:

    <h1 id=sql…   must be changed to:   <h2 id=sql…

    The updated version is here: http://www.ekelmans.com/FTP/Web/ImportSqlserverbuildsBlogspotCom.sql

    Enjoy 

    p.s.

    Let's buy the operator of http://sqlserverbuilds.blogspot.com coffee for all the time spent on maintaining that site at https://www.buymeacoffee.com/sqlserverbuilds.

  • Another way to get this inventory is through RedGate SQL Monitor.
    Not sure where they scrape their data from, but in version 8 (possibly sooner) they have an Estate tab that includes the name of the SQL instance, the version/Edition, the status/product level/version number, the latest available update and the end of mainstream support.

    But for those without RedGate SQL Monitor, the script from Theo Ekelmans and webpage sqlserverbuilds.blogspot.com are really good alternatives; I used them until I found that tab in RedGate SQL Monitor.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Your solution is brilliant. Thank you!

  • Thanks for the kind feedback all 🙂

  • Hi Theo, the script stopped working for me on the 14th Feb. My guess is the website changed a little bit. I'm not sure of the correct etiquette for posting a suggested work around to new issues like this. But I found a fix by making a small edit to the code around line 441. The release date value was giving this conversion error. "Conversion failed when converting date and/or time from character string."

    I suspect my fix isn't the best way to do this. I'm sure you would have a much smarter way of resolving this problem, but it worked for me, so I thought I would share it. I used a SUBSTRING to strip out the 10 digit date value from the string as follows:
    SUBSTRING(i.[releasedate], 17, 10) as 'releasedate'
    When I used this to replace the basic select for the 'i.[releasedate]' column it seems to work. 
    I've attached a copy of your full script including this edit.

    I hope this helps.
    Kind regards.
    Tim.

  • Hi Tim,
    Several people mailed me about his, and i posted an updated version: http://www.ekelmans.com/FTP/Web/ImportSqlserverbuildsBlogspotCom.sql 

    My fix was: at the HTML stripping phase:

    update @htmlRows set td = replace(td, '<time datetime="', '') -- remove DT prefix;

    and in the write to the HTML staging table

    UPDATE @out SET releasedate = left((select td from @htmlRows where ID = 7), 10) WHERE CURRENT OF curOut 

    Could you give that version a try ?

  • Cheers Theo, it works like a charm. Many thanks!

  • That fixed mine too!

  • Hello,

    as a datasource you can use public Google Sheet with all SQL Server builds:

    https://docs.google.com/spreadsheets/d/16Ymdz80xlCzb6CwRFVokwo0onkofVYFoSkc7mYe6pgw/view

    Download using PowerShell as CSV – DownloadSqlServerBuildsAsCsv.ps1:

    $SqlVersion = "2017"
    $URL = "https://docs.google.com/spreadsheets/d/16Ymdz80xlCzb6CwRFVokwo0onkofVYFoSkc7mYe6pgw/gviz/tq?tq=select+*+where+A%3D" + $SqlVersion + "&tqx=out:csv"
    Invoke-WebRequest $URL -OutFile "C:\Users\Example\AppData\Local\Temp\SqlServerBuilds.csv"

    Run:

    PowerShell.exe -ExecutionPolicy Unrestricted .\DownloadSqlServerBuildsAsCsv.ps1

     

  • More options !!!

    yay 🙂

  • Hello,

    First of all; thank you for this nice solution.

    We are planning to use this to get SQL patch info from the csv-file (http://sqlbuilds.ekelmans.com/sqlbuilds.csv) once per day and I just wonder if the site is maintained and planned to be up for a foreseeable future?

  • Hi Christian,

    The site is running on a Intel NUC at my home, and has been up for about 2? years now, and i have no intention of taking it down, since my own team uses it on a daily basis.

    The only reasons for this site to go down are: the datasource becomes unavailable, my house burns down, my company goes bellyup, the dykes break and the Netherlands slide beneath the waves, or my car experiences an unplanned 100G decelleration.

    None of the above are likely anytime soon, so i'd say you're safe using the daily download.

    But even if my site goes down, you could always download the data yourself using my script in the article 😉

    grtz, T

  • Superb! Excellent job, sir. I've been after something like this for ages, there's some rocket science going on to be sure. Thank you very much for sharing:)

    FYI, a bit of a hack (and I may go back and do it properly) but I had to change the datatype on the tblBuildListImport.releasedate column to VARCHAR(1000).

    Also, some of the double-quoting around the wget execution had to be tidied up for it to work for me. And, to get it to work through the company proxy I needed to add some switches. Might be useful to others reading this:

    set @Cmd = 'CMD /S /C "'+@Path+'wget.exe -e https_proxy=http://xxxxxx:80 --no-check-certificate -O '+@Path+'out.html" https://sqlserverbuilds.blogspot.com '

Viewing 15 posts - 31 through 45 (of 75 total)

You must be logged in to reply to this topic. Login to reply