Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Prevent connections to SQL 7.0 & 2000#2839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mdaigle merged 1 commit intodotnet:mainfromedwardneal:sql2000-support-removal
Dec 17, 2024

Conversation

edwardneal
Copy link
Contributor

This prevents connections from the .NET Framework build of Microsoft.Data.SqlClient to SQL Server 7.0 and SQL Server 2000 (RTM & SP1.) Doing so aligns the .NET Framework build with the .NET Core build on all OSes: the library will no longer be able to connect to any version of SQL Server prior to 2005.

I've also included a test to verify failed/successful connections to different simulated server versions.

There's a bit of SQL Server 2000-specific code in the .NET Framework project, and this hasn't been removed yet. Since this could be considered a breaking change, I'm aiming simply to implement the functional block for the v6 release, ready for the then-redundant paths to be removed later.

ErikEJ and MichelZ reacted with hooray emoji
Also add a test to verify failed/successful connections to different simulated server versions
@Wraith2
Copy link
Contributor

While those systems aren't supported is there a reason to remove the ability to use it? I've encountered a live sql 2000 server recently and while i wasn't programming against it others may be, for example sql management studio will lose the ability to connect.

edwardneal and rhuijben reacted with thumbs up emoji

@edwardneal
Copy link
ContributorAuthor

That's a completely fair point, and part of the reason I raised the PR is to talk that through. As we start to merge the more sensitive classes relating to connections and transactions, there are code paths which we handle differently for downlevel clients. The options for this are:

  1. Implement the same code paths in the .NET Core library, and test them with a SQL 2000 system. I'm not opposed to doing this if it's technically practical for the CI to run those tests, but at that point we've effectively relaxed the minimum version from SQL 2014 to SQL 2000
  2. Lock them behind conditional compilation - which isn't the worst thing in the world, but I'd prefer to only do this for cases where .NET Core/Framework have different APIs for the same operation, rather than to maintain a codebase which has different capabilities based on how it's targeted
  3. Remove SQL 2000 & SQL 7.0 support from the .NET Framework library

Theinitial feedback was:

There's no reason that main needs to work on anything older than 2014. Scratch that. 2016, since 2014 EOLs July 9. Users who are running EOL servers can use old clients.

I've seen enough SQL 2008/R2/2012 servers recently to err on the side of caution when thinking about enforcing a minimum version of SQL 2014 across the board, but a baseline of SQL 2005 seems fair enough. I'm only proposing the removal of SQL 2000 support from the .NET Framework version, which still has the supported alternative of System.Data.SqlClient; the .NET Core library has never supported it.

As far as SSMS support goes: I expect that people who still need to connect to downlevel versions of SQL Server would need an older version of SSMS.

To put some context to the downstream changes this'll enable, I've got a second PR after this which covers the actual code changes. The diff of this ishere.

ErikEJ and MichelZ reacted with thumbs up emoji

@David-Engel
Copy link
Contributor

We aren't going to test EOL SQL Server versions in CI. Security compliance rules that out.

I'm all for cleaning up old code. We should not connect to anything prior to TDS 7.4.

CC:@saurabh500 and@cheenamalhotra as an FYI.

cheenamalhotra and MichelZ reacted with thumbs up emoji

@MichelZ
Copy link
Contributor

Removing SQL 7.0/2000 support from TdsParser would remove quite a few differences between netcore and netfx and make merging the classes much easier. I hope this gets in soon :)

Copy link
Contributor

@benrr101benrr101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm sort of on the fence about this one. I can totally sympathize with@Wraith2 desire to leave support for old versions intact (eg, I work on a side project that targets a totally out-of-date version of nodejs so I can have the widest support I can). Yet, I also acknowledge that with corporate-sponsored open-source projects, we have to follow the compliance rules, and that generally means dropping support for EOL products. If there's no easy/approved way to test against EOL products, the code is going to wither, we'll get complaints about it not working, and won't be able to address the issues. So ultimately, I think we'll have to drop support for EOL SQL Server versions. As long as we don't pull old versions of MDS from Nuget, there'll still be an option for users of old versions of SQL Server.

@benrr101
Copy link
Contributor

/azp run

@azure-pipelinesAzure Pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecovCodecov
Copy link

codecovbot commentedDec 2, 2024
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.67%. Comparing base(d89372a) to head(aef1954).
Report is 230 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@##             main    #2839      +/-   ##==========================================+ Coverage   72.02%   72.67%   +0.65%==========================================  Files         299      285      -14       Lines       61430    59155    -2275     ==========================================- Hits        44246    42993    -1253+ Misses      17184    16162    -1022
FlagCoverage Δ
addons92.58% <ø> (-0.33%)⬇️
netcore75.47% <ø> (-0.49%)⬇️
netfx71.06% <ø> (+0.84%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MichelZ
Copy link
Contributor

@benrr101@mdaigle Can this be merged? That would help with#2953

mdaigle reacted with thumbs up emoji

@mdaiglemdaigle merged commit986cdb9 intodotnet:mainDec 17, 2024
188 checks passed
@edwardnealedwardneal deleted the sql2000-support-removal branchDecember 18, 2024 08:15
@mdaiglemdaigle added this to the7.0-preview1 milestoneDec 18, 2024
@SimonCropp
Copy link
Contributor

just a heads up to people that this is now in the 6.1 milestone.
so i raised a discussion to talk about if this should be considered "breaking enough" to not be in a minor release

#3276

edwardneal and ErikEJ reacted with thumbs up emoji

@samsharma2700samsharma2700 added the Breaking Change 🔨Issues/PRs that are related with breaking API changes in the driver. labelApr 15, 2025
@cheenamalhotracheenamalhotra removed the Breaking Change 🔨Issues/PRs that are related with breaking API changes in the driver. labelApr 24, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@benrr101benrr101benrr101 approved these changes

@mdaiglemdaiglemdaigle approved these changes

@cheenamalhotracheenamalhotraAwaiting requested review from cheenamalhotra

@samsharma2700samsharma2700Awaiting requested review from samsharma2700

@imasud00imasud00Awaiting requested review from imasud00

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
6.1-preview1
Development

Successfully merging this pull request may close these issues.

9 participants
@edwardneal@Wraith2@David-Engel@MichelZ@benrr101@SimonCropp@mdaigle@cheenamalhotra@samsharma2700

[8]ページ先頭

©2009-2025 Movatter.jp