on 2021 Oct 21 10:51 AM
I want to create an event that logs info for any failed connection. I am trying to use the ConnectFailed event type, but that doesn't seem to fire for all failed conditions. In particular, if I have an inbound connection that fails because "Database server connection limit exceeded", I want to capture that as well as other information about the server. My event looks something like this:
create event connect_fail_event type "ConnectFailed" handler begin message 'ConnectFailed event fired at '||getdate() to console; end ;
If I put in an incorrect user/password then it fires. But if I exceed the number of allows connections, it doesn't fire.
Thoughts?
An event of type ConnectFailed would never fire on "Database server connection limit exceeded" as the connection object has not been initialized yet.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So would you see an otherwise failing connection there, say one faling because of wrong credentials?
Perhaps the server properties MaxConnections and ConnCount could be used in some way. I assume that if ConnCount == MaxConnections then the next connection attempt would fail. At least you'd know that you've reached the max. Not quite as good as knowing that a connection attempt failed because you have reached the max.
User | Count |
---|---|
79 | |
11 | |
10 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.