Added retry policy for sleeping serverless error for SqlConnections (#2155)

This commit is contained in:
Alex Ma
2023-08-16 13:17:40 -07:00
committed by GitHub
parent e4db70fb39
commit 4ae9534ac8
15 changed files with 140 additions and 63 deletions

View File

@@ -43,6 +43,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
}
using (SqlConnection connection = new SqlConnection(ConnectionService.BuildConnectionString(connInfo.ConnectionDetails)))
{
connection.RetryLogicProvider = Connection.ReliableConnection.SqlRetryProviders.ServerlessDBRetryProvider();
connection.Open();
using (SqlCommand sqlQueryCommand = new SqlCommand(sqlQuery, connection))
{