Post

LocalDb - Logon failed for login 'xx\xxx' due to trigger execution

I encountered an issue - Logon failed for login 'xx\xxx' due to trigger execution today when I tested my local site. I expanded details from SSMS to investigate with no luck. I tried to re-install SQL 2019 localdb, reverted back to old version of localdb, none of them fixed my issue.

Fixes

After spending nearly an hour on this issue, I concluded my localdb MSSQLLocaldb was corrupted. I decided to delete and re-create MSSQLLocaldb to see if it works. Luckily, this approach fixed my issue.

Step 1 - Delete MSSQLLocaldb folder

The folder can be found from the location below.

1
C:\Users\<username>\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances

Step 2 - Re-create MSSQLLocaldb database

Run the following command from your terminal

1
2
sqllocaldb create MSSQLLocaldb

References

Logon failed for login due to trigger execute

Happy Coding! 😇

This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.

© Vincent. Some rights reserved.