jadarnel27 / sqlserverversionscript Goto Github PK
View Code? Open in Web Editor NEWCreates a T-SQL script to build a table with all supported SQL Server versions and their support dates
License: MIT License
Creates a T-SQL script to build a table with all supported SQL Server versions and their support dates
License: MIT License
An error occurred. Details to follow:
System.FormatException: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at GetSqlServerVersionInfo.SqlServerBuild..ctor(List`1 cells, String majorVersionName) in C:\Users\edarl\Downloads\SqlServerVersionScript-master\SqlServerVersionScript-master\src\GetSqlServerVersionInfo\SqlServerBuild.cs:line 16
at GetSqlServerVersionInfo.Program.GetSqlServerBuildsFromMicrosoftWebsite(IReadOnlyCollection`1 supportDates) in C:\Users\edarl\Downloads\SqlServerVersionScript-master\SqlServerVersionScript-master\src\GetSqlServerVersionInfo\Program.cs:line 142
at GetSqlServerVersionInfo.Program.TryMain(String[] args) in C:\Users\edarl\Downloads\SqlServerVersionScript-master\SqlServerVersionScript-master\src\GetSqlServerVersionInfo\Program.cs:line 34
at GetSqlServerVersionInfo.Program.Main(String[] args) in C:\Users\edarl\Downloads\SqlServerVersionScript-master\SqlServerVersionScript-master\src\GetSqlServerVersionInfo\Program.cs:line 17
The table definition states "MainstreamSupportEndDate date not null,", but in the data there are records with NULL values.
for example:
"(13, 5149, 'SP2 CU1', 'https://support.microsoft.com/en-us/help/4135048', '2018-05-30', NULL, NULL, 'SQL Server 2016', 'Service Pack 2 Cumulative Update 1'),"
This is not allowed:
Cannot insert the value NULL into column 'MainstreamSupportEndDate', table 'DBADB.dbo.SqlServerVersions'; column does not allow nulls. INSERT fails.
Same goes for ExtendedSupportEndDate
After fixing #9 and running the produced SQL I get the following error:
Msg 515, Level 16, State 2, Line 1
Cannot insert the value NULL into column 'MainstreamSupportEndDate', table 'DBADB.dbo.SqlServerVersions'; column does not allow nulls. INSERT fails.
It seems this is the one giving the problem:
(12, 6024, 'SP3 ', 'https://support.microsoft.com/en-us/help/4022619', '2018-10-30', NULL, NULL, 'SQL Server 2014', 'Service Pack 3 '),
Thanks for adding the primary key.
I do have an issue with using the produced script.
Due to the replication I am not able/allowed to drop the table.
"Cannot drop the table 'dbo.SqlServerVersions' because it is being used for replication."
Would be nice if there was a commandline option which let's you decide to create a full script (including creation of the table), or 'just' the data, with an additional DELETE statement to clean the table first.
DELETE
FROM dbo.SqlServerVersions
Per a request in the First Responder Kit repo, we should
OBJECT_ID
to check for table existenceGO
where appropriate for proper batchingPretty please thanks
SQL Server 2014 SP3 has been added to the support site now, so the custom code for that can now be removed.
The SqlServerVersions table does not contain a primary key, this won't allow us to replicate this table through our central DBADA database.
One way would be to create a clustered key on 'MajorVersionNumber', 'MinorVersionNumber' and 'ReleaseDate', this can be done by adding this to the table creation.
CONSTRAINT [PK_SqlServerVersions] PRIMARY KEY CLUSTERED
(
[MajorVersionNumber] ASC,
[MinorVersionNumber] ASC,
[ReleaseDate] ASC
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.