diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs
index 17901e6a..7b54484e 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs
@@ -38,7 +38,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
///
/// Local time when the execution starts, specifically when the object is created
///
- private readonly DateTime executionStartTime;
+ private DateTime executionStartTime;
///
/// Factory for creating readers/writers for the output of the batch
@@ -65,7 +65,6 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
// Initialize the internal state
BatchText = batchText;
- executionStartTime = DateTime.Now;
Selection = new SelectionData(startLine, startColumn, endLine, endColumn);
HasExecuted = false;
resultSets = new List();
@@ -198,6 +197,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
command.CommandText = BatchText;
command.CommandType = CommandType.Text;
command.CommandTimeout = 0;
+ executionStartTime = DateTime.Now;
// Execute the command to get back a reader
using (DbDataReader reader = await command.ExecuteReaderAsync(cancellationToken))