Support Center

SQL Version Number Update

Last Updated: Oct 09, 2017 08:44AM CDT
From time to time MinionWare sends out updates to the SQL Server version table.  This has not effect on the system as a whole and is safe to run.  The update is sent in clear text so you’ll be able to inspect the statements being run.
What is the SQL Version table?
Minion Enterprise gives you the ability to not only see what version of SQL Server you’re on, but also what version you should be on.  We accomplish this by keeping an updated version table that contains the latest SQL Server CUs, security updates, service packs, and hotfixes.  So now you can easily see how far behind you are on patches, and even setup alerts to let you know when you’re too far behind.  This feature is a fabulous way to keep track of SQL Server patches across your entire enterprise, and not just a server at a time. 

Here are some sample queries you can use:
To query the entire table:
SELECT * from [dbo].[SQLVersionLevelsGet]
To see any servers that are behind in patching:
SELECT * from [dbo].[SQLVersionLevelsGet]
WHERE CurrentPatchReleaseDate < LatestPatchReleaseDate
To see any servers that are behind in patching by a certain time:
DECLARE @MonthsBehind INT = 3
SELECT DATEDIFF(MONTH, CurrentPatchReleaseDate, LatestPatchReleaseDate) AS MonthsBehind, * from [dbo].[SQLVersionLevelsGet]
WHERE CurrentPatchReleaseDate < LatestPatchReleaseDate
AND DATEDIFF(MONTH, CurrentPatchReleaseDate, LatestPatchReleaseDate) >= @MonthsBehind
To see any servers that are missing security patches:
CREATE VIEW [dbo].[SQLVersionSecurityUpdatesGet]
       --Get all of the security patches available, that were released after a server's current patch.
--You often need to know how many of your boxes aren't on the latest security updates.
--This view shows you a list of available security updates, that your servers aren't using yet.
--MinionWare will send out updates to the version table as new patches come out.
SELECT  S.InstanceID
      , S.ServerName
      , S.SQLBuild AS SQLBuild
      , S.SQLVersion AS VersionName
      , SecUpd.VersionName AS NewerSecurityPatch
      , SecUpd.[ReleaseDate] AS NewerSecurityPatchReleaseDate
      , SV.VersionName AS CurrentPatch
      , SV.[ReleaseDate] AS CurrentPatchReleaseDate
      , SecUpd.SupportLink AS NewerSecurityPatchURL
      , S.ServiceLevel
      , S.SQLEdition
      , 'This view shows you list of all available security patches that have not been installed for each server. It only includes security updates; CUs, SPs, and hotfixes are excluded.' AS ViewDesc
FROM    dbo.Servers AS S
        ON S.SQLBuild = SV.BUILD
LEFT OUTER JOIN [dbo].SQLVersions AS SecUpd
        ON S.SQLVersion = SecUpd.Version
           AND SV.ReleaseDate < SecUpd.ReleaseDate
           AND SecUpd.VersionName = 'Security Update';
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found