File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -303,15 +303,15 @@ public static async Task<ServerProperties> GetServerTelemetryProperties(SqlConne
303303 {
304304 try
305305 {
306- string serverPropertiesQuery = $ "SELECT SERVERPROPERTY('EngineEdition'), SERVERPROPERTY('EngineEdition ')";
306+ string serverPropertiesQuery = $ "SELECT SERVERPROPERTY('EngineEdition'), SERVERPROPERTY('Edition ')";
307307
308308 logger . LogDebugWithThreadId ( $ "BEGIN GetServerTelemetryProperties Query={ serverPropertiesQuery } ") ;
309309 using ( var selectServerEditionCommand = new SqlCommand ( serverPropertiesQuery , connection ) )
310310 using ( SqlDataReader reader = await selectServerEditionCommand . ExecuteReaderAsync ( cancellationToken ) )
311311 {
312312 if ( await reader . ReadAsync ( cancellationToken ) )
313313 {
314- int engineEdition = reader . GetByte ( 0 ) ;
314+ int engineEdition = reader . GetInt32 ( 0 ) ;
315315 var serverProperties = new ServerProperties ( ) { Edition = reader . GetString ( 1 ) } ;
316316 // Mapping information from
317317 // https://learn.microsoft.com/en-us/sql/t-sql/functions/serverproperty-transact-sql?view=sql-server-ver16
You can’t perform that action at this time.
0 commit comments