Code Monkey home page Code Monkey logo

sqlserverversionscript's People

Contributors

jadarnel27 avatar reharmsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sqlserverversionscript's Issues

Error running program

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

NULL value's not allowed

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

Problem with NULL in MainstreamSupportEndDate

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 '),

Add option to update/refresh data rather then dropping table

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

Add a primary key to SqlServerVersions table

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
)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.