Closed ronascentes closed 1 year ago
@ronascentes - hard to tell without a repo (that I can run).
Is your repro minimal? Are all the paramters necessary to repro the issue? What happens if you remove one or more if -TrustServerCertificate
-MultiSubnetFailover
-Encrypt Mandatory
?
This looks more like a bug in the Microsoft.Data.SqlClient driver to me, so we should try to isolate the problem.
Would you be able to write a simple .Net app (C# or PowerShell) that would just try to open a connection to your server and see what happens? If not, I can probably suggest one for you as a starting point...
Is your server on-prem or Azure (SQLDB, MI, etc)?
It is expected that the old v21 module and v22 module behaves differently because they use completely different drivers to connect to SQL.
@ronascentes - few more questions:
Could you provide the output of [System.AppDomain]::CurrentDomain.GetAssemblies() | Where-Object Location | Sort-Object -Property FullName | Select-Object -Property FullName, Location
after the issue happens?
Could you attach a debugger (e.g. Visual Studio) to pwsh.exe when the issue happens and see what version of Microsoft.Data.SqlClient.SNI
is actually loaded and from what location?
Is this still an issue in v22.1?
Hi @Matteo-T, this issue no longer persists in v22.1. I'm using on-prem btw. Do you still need any other info or can we close this issue?
Hi @ronascentes thanks for letting me know. Yeah, I agree... let's go ahead and close it.
Thank you Matteo.
Steps to reproduce the issue:
SqlServer 22.0.59 Windows PowerShell 5.1 Windows Server 2022 Standard (21H2)
SqlServer 22.0.59 PowerShell 7.3.3 Windows Server 2022 Standard (21H2)
Screenshot for reference:
This issue does not occur if using SqlServer module 21.1.18256
SqlServer 21.1.18256 PowerShell 7.3.3 Windows Server 2022 Standard (21H2)