# Server Trigger: connection_limit_trigger

## Properties

Property | Value
--- | ---
Trigger Name | connection_limit_trigger
Trigger ID | 1227151417
Trigger Type | SQL trigger
Enabled |
Microsoft Shipped |
Uses ANSI NULL |
Uses QUOTED IDENTIFIER |
Modify Time | 9/19/2010 3:28:26 AM
Create Time | 9/19/2010 3:28:26 AM

## Trigger Events

Event Type | First | Last | Event Group Type
--- | --- | --- | ---
LOGON |  |  |

## SQL

Script
CREATE TRIGGER connection_limit_trigger ON ALL SERVER WITH EXECUTE AS 'login_test' FOR LOGON AS BEGIN IF ORIGINAL_LOGIN()= 'login_test' AND (SELECT COUNT(*) FROM sys.dm_exec_sessions WHERE is_user_process = 1 AND original_login_name = 'login_test') > 3 ROLLBACK; END;

#### See also

List of Server Triggers