Logon failed for login due to trigger execution

If there is an damaged logon trigger on your Microsoft SQL Server, all login attempts will fail.

Cannot connect to servername

ADDITIONAL INFORMATION:

Logon failed for login ‘DOMAIN\USERNAME’ due to trigger execution.

Changed database context to ‘master’.

Changed language setting to us_english. (Microsoft SQL Server, Error: 17892)

We need to connect with sqlcmd and drop logon trigger for able to login again. User must be in sysadm group on SQL Server for disable logon trigger.

sqlcmd -S LocalHost -d master -A

1> DROP TRIGGER logon_trigger_name ON ALL SERVER

2> GO

Now we can login to the server and fix the problem which damaged the logon trigger. It can be insufficient data or log space database which logon trigger uses for import data. After fixing the issue logon trigger must be rebuilt.

Leave a Reply

Your email address will not be published. Required fields are marked *