-
Notifications
You must be signed in to change notification settings - Fork 316
Open
Labels
P1Use to label relatively higher severity issues, or issues that impact a large number of customers.Use to label relatively higher severity issues, or issues that impact a large number of customers.Potential RegressionHas not been confirmed as a regression, but it was working properly on a previous versionHas not been confirmed as a regression, but it was working properly on a previous versionTriage Done ✔️Issues that are triaged by dev team and are in investigation.Issues that are triaged by dev team and are in investigation.Waiting for Customer ⏳Issues/PRs waiting for user response/action.Issues/PRs waiting for user response/action.
Milestone
Description
Describe the bug
When connecting to a remote server, version 6.1.0 is taking significantly longer than 6.0.2
using Microsoft.Data.SqlClient;
namespace SqlServerConnectTest
{
internal class Program
{
static void Main(string[] args)
{
var builder = new SqlConnectionStringBuilder();
builder.DataSource = "xxx";
builder.InitialCatalog = "xxx";
builder.UserID = "xxx";
builder. Password = "xxx";
builder.TrustServerCertificate = true;
builder.ApplicationName = "Connection test";
builder.ConnectTimeout = 30;
builder.Encrypt = true;
Console.WriteLine(builder.ConnectionString);
using (var cn = new SqlConnection(builder.ConnectionString))
{
try
{
var stopwatch = System.Diagnostics.Stopwatch.StartNew();
cn.Open();
stopwatch.Stop();
Console.WriteLine("Connection successful!");
Console.WriteLine($"Time taken to connect: {stopwatch.ElapsedMilliseconds} ms");
}
catch (SqlException ex)
{
Console.WriteLine($"SQL Error: {ex.Message}");
}
catch (Exception ex)
{
Console.WriteLine($"General Error: {ex.Message}");
}
}
}
}
}When running 6.0.2 on my system this took 948ms, in 6.1.0ms this takes 16494 ms. This is running in .NET 9 and the SQL Server is 2019.
Expected behavior
The connection should happen in roughly the same time on both versions
suhrab and refacteh
Metadata
Metadata
Assignees
Labels
P1Use to label relatively higher severity issues, or issues that impact a large number of customers.Use to label relatively higher severity issues, or issues that impact a large number of customers.Potential RegressionHas not been confirmed as a regression, but it was working properly on a previous versionHas not been confirmed as a regression, but it was working properly on a previous versionTriage Done ✔️Issues that are triaged by dev team and are in investigation.Issues that are triaged by dev team and are in investigation.Waiting for Customer ⏳Issues/PRs waiting for user response/action.Issues/PRs waiting for user response/action.