Created
September 23, 2014 01:55
-
-
Save revirth/b46799075a5253ba6538 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use master; | |
-- database_connection_stats daily, hourly | |
select database_name, cast(end_time as varchar(13)) end_date, | |
SUM(success_count) success_count, SUM(total_failure_count) total_failure_count, SUM(connection_failure_count) connection_failure_count, | |
SUM(terminated_connection_count) terminated_connection_count, SUM(throttled_connection_count) throttled_connection_count | |
from sys.database_connection_stats | |
where database_name = 'DB Name' | |
group by database_name, cast(end_time as varchar(13)) | |
having SUM(total_failure_count) > 10 | |
order by end_date desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment