marcingminski / sqlwatch

SQL Server Performance Monitor
https://docs.sqlwatch.io
Other
436 stars 173 forks source link

minor bug in dbo.usp_sqlwatch_logger_whoisactive #399

Closed MCTSQL closed 3 years ago

MCTSQL commented 3 years ago

Did you check DOCS to make sure there is no workaround? Yes

Describe the bug Missing "minus sign" (-) in front of @min_session_duration_seconds on line 75 of dbo.usp_sqlwatch_logger_whoisactive

To Reproduce Nothing to reproduce. Actual behavior does not match expected behavior.

Expected behavior -- exclude anything that has been running for less that the desired duration in seconds (default 15) where [start_time] < dateadd(s,-@min_session_duration_seconds,getdate()) -- Note: start_time should be less than 15 (default) seconds from now (getdate())

Actual (current) behavior -- exclude anything that has been running for less that the desired duration in seconds (default 15) where [start_time] < dateadd(s,@min_session_duration_seconds,getdate()) -- Note: start_time will always be less than 15 (default) seconds into the future (getdate()+15 (default))

SQLWATCH version (from DACPAC or from sysinstances) existing main branch on github

marcingminski commented 3 years ago

Fixed in https://github.com/marcingminski/sqlwatch/pull/400