May 29, 2017 at 3:16 am
Hi,
I am wondering does anybody have a script to determine the SQL Server Version and whether or not it is in support e.g. what patch is it at and if this is still in support?
Thanks,
Fiona
May 29, 2017 at 3:20 am
juniorDBA13 - Monday, May 29, 2017 3:16 AMHi,
I am wondering does anybody have a script to determine the SQL Server Version and whether or not it is in support e.g. what patch is it at and if this is still in support?
Thanks,
Fiona
Select @@version, copy output and google
😎
May 29, 2017 at 3:23 am
Yes, I know select @@version works but I need to determine for it for number of servers so i would prefer to have a script that checks the version and lets me know if patching is required.
May 29, 2017 at 3:30 am
The thing is, such a script would have to be updated frequently. Probably best if you check the MS sites for what the current supported patches are, then write a script, using SERVERPROPERTYEX most likely that looks for anything below that value.
The script will be out of date as soon as the supported versions change though.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 29, 2017 at 4:08 am
juniorDBA13 - Monday, May 29, 2017 3:23 AMYes, I know select @@version works but I need to determine for it for number of servers so i would prefer to have a script that checks the version and lets me know if patching is required.
Patching is one thing, checking if the servers are still in support is another, you definitely do not want to depend on some script for determine the latter!. Suggest you change you're approach to monitor the releases of new patches, keeping a register of which have already been applied to each instance.
😎
May 30, 2017 at 11:04 am
The only thing I could suggest is maybe creating a process that does a screen scrape of Microsoft's version page which then loads the data into a table. You then use the data in the table (getting the latest version) to compare against your servers. It's somewhat complicated and will break the instant that the version page goes down for any reason, but if you really have your heart set on automating this, it's your best bet.
On the other hand, having this automated is no excuse for not regularly (and manually) checking for patches. I never put in an automated job without building manual checks around it so I can be sure things are going as planned.
May 30, 2017 at 12:25 pm
If you really need to, you can export a list of the SQL Server support product lifecycle. There is a link on the right of the page to export the information to a csv file. It's not a good idea going forward though. Maybe just for a first time cursory check. The product lifecycle is available here:
Search product lifecycle
Sue
May 30, 2017 at 1:39 pm
one day back on 07/28/2016 i was inspired to create a procedure to do this;
as everyone has already identified, the problem is keeping up with releases. how many patches, CU's and service packs have been done in 10 or so months?
I thought of doing what Brandie suggested: a Powershell script or a CLR to screen scrape a known web site, but meh, i ran out of interest in automating it.
here's a linky to what I wrote; i'd run this on Central Managment servers to see where I stood for patches; it's just plain old comparing to a internal table full of what I scraped.
*Edit* it has a dependency to master.dbo.DelimitedSplit8K!
Lowell
May 30, 2017 at 2:11 pm
There's a free tool from Idera Software which I use that does this kind of work:
https://www.idera.com/productssolutions/freetools/sql-instance-check
and they keep track of the patches and updates available for all the different versions.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply