Skip to content

Commit

Permalink
fix "Warning: Null value is eliminated by an aggregate or other SET o…
Browse files Browse the repository at this point in the history
…peration." messages in the execution logs
  • Loading branch information
dan-andreistefan committed Jan 11, 2021
1 parent d246464 commit 09cd93a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ WHILE @@FETCH_STATUS=0
end
CLOSE crsActiveDatabases
DEALLOCATE crsActiveDatabases

/* get last date for backup and other database flags / options */
IF @isAzureSQLDatabase = 0
begin
Expand All @@ -514,7 +514,7 @@ WHILE @@FETCH_STATUS=0
, sdb.[page_verify_option]
, sdb.[compatibility_level] ' +
CASE WHEN @isAzureSQLDatabase = 0
THEN N', MAX(bs.[backup_finish_date])'
THEN N', MAX(ISNULL(bs.[backup_finish_date], CONVERT([datetime], ''1900-01-01'', 120)))'
ELSE N', NULL'
END + N' AS [last_backup_time]
, CASE WHEN sdb.[source_database_id] IS NULL THEN 0 ELSE 1 END AS [is_snapshot]
Expand Down Expand Up @@ -546,6 +546,7 @@ WHILE @@FETCH_STATUS=0
END CATCH
end


/* check for AlwaysOn Availability Groups configuration */
IF @serverVersionNum >= 12 AND @isAzureSQLDatabase = 0
begin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ WHILE @@FETCH_STATUS=0
FROM [dbo].[logEventMessages]
WHERE [project_id] = @projectID
AND [instance_id] = @instanceID
AND [remote_event_id] IS NOT NULL

SET @maxRemoteEventID = ISNULL(@maxRemoteEventID, 0)

Expand Down

0 comments on commit 09cd93a

Please sign in to comment.