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.
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
The folder can be found from the location below.
C:\Users\<username>\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances
Step 2 - Re-create
Run the following command from your terminal
sqllocaldb create MSSQLLocaldb
Happy Coding! 😇