-
Notifications
You must be signed in to change notification settings - Fork 294
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
“Internal connection fatal error” from TdsParser when calling native compiled stored procedure in SQL Server 2019 #365
Comments
Hi @Genmutant I'm able to reproduce issue with Microsoft.Data.SqlClient and am looking into it. |
The token which can't be parsed seems to be the same as the one which JDBC has a problem with, and that also doesn't get recogniced by Wireshark: The 0xA3 token. |
|
Hi @Genmutant Yes you're right, this token is received because both JDBC and Microsoft.Data.SqlClient drivers support Data Classification and we send DATACLASSIFICATION FeatureExt token during login. System.Data.SqlClient does not support this feature hence is not impacted. The glitch is this token is not expected to be in the stream at a location where it's currently being received for this use-case, as per feature design. We're following up with product team internally to gather more details on the same. Will keep you posted! |
Client sends a Wireshark may not translate TDS login packets from client correctly. |
Hi @Genmutant I'd like to confirm this was identified as a bug in the SQL Server 2019 and we have received confirmation on the fix made to address the same. The upcoming SQL Server 2019 CU2 release will address this issue. |
I know this is not the right place to ask this kind of question, but I'm experiencing the same issue once I migrated from System.Data.SqlClient to Microsoft.Data.SqlClient while trying to execute a native compiled stored procedure on an SQL 2019 compatiblity Azure SQL Database through a linux-based dotNet Core 2.2 application on AKS, but I couldn't find any other information on the internet. The question is: Do you have an information when this fix (CU2) would be released for Azure SQL Database (PAAS)? |
@Genmutant thanks for linking the release update, we'll close the issue! |
Hello @cheenamalhotra! How are you? |
Hi @augustolp The fix is currently not yet deployed in Azure instances. |
Hello, Or can be there an ohter issue? |
@cheenamalhotra Can you confirm if the fix has been deployed to Azure SQL Service, and if not when it is scheduled? |
Do you have a repro app for Azure DB to reproduce errors you are facing? But the fix was deployed to Azure in April 2020 as per our information. |
I'm also getting this error, I have an Azure SQL, and running a stored procedure through .net core 3.1 / EF Core (3.1.2) The code is simple, something like this: |
Hi @tunechr Can you confirm you're able to run the stored procedure from SSMS? |
@cheenamalhotra Sorry I didn't see the reply. Yes I just tested from SSMS and it ran fine using: DECLARE @return_value int The code is very simple: Hope this helps? |
Still having issues on Azure SQL+ Data Classification + TdsParser as of 8/18/2020: If i remove all the data classification tags on that database the problem goes away.
|
@jumpingjackson That is due to a bug in SQLClient when using Data Classification with Bulk Copy. I believe that the bug was fixed in SQLCLient V2. |
Thanks! that fixed it. Its not obvious that you need to install 2.0.0 because if you install EFCore stuff sqlClient doesnt get referenced directly in your project so you dont get prompted to upgrade like most packagews. |
Ref: #568 (available since v2.0) |
at Microsoft.Data.SqlClient.TdsParser.SendFedAuthToken(SqlFedAuthToken fedAuthToken) |
@cheenamalhotra the issue is not yet resolved we are still facing the same issue in System.Data.SqlClient at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) |
@rakshith-aradhya |
@mhectorgato actual error not included... |
I was able to get it to work after all (had change the InvariantGlobalization setting first) with Microsoft.Data.SqlClient. |
Describe the bug
I am having huge problems with the current SQL Server 2019 (15.0.2070.41) and native compiled stored procedures when calling them from the
Microsoft.Data.SqlClient
(1.1.0 and lower).It is working when either using SQL Server 2017 or
System.Data.SqlClient
, or just not using a native compiled procedure.Apparently the
TdsParser
is receiving data it doesn't expect from the SQL Server connection and is throwing an exception during the parsing.To reproduce
Expected behavior
No exception and the
reader
should provide the result of the query.Further technical details
Microsoft.Data.SqlClient version: 1.1.0 and lower
.NET target: Core 3.1, Framework 4.7.2
SQL Server version: SQL Server 2019 (15.0.2070.41)
Operating system: Windows 10, Windows Server 2016 Standard
Additional context
I have the same problem with JDBC and it's
TDSParser
(7.4.1.jre8), see here. I also posted the problem on StackoverflowThe text was updated successfully, but these errors were encountered: