How to fix Localdb MSSQLLocalDB trigger execution

Encountering the error of connecting to localdb/mssqllocaldb gives Logon failed for login ‘xx\xxx’ due to trigger execution in Visual Studio

Solution for localdb\mssqllocaldb

Get rid of database and recreate it. It aren’t pretty, but it works!

Open the from Admin Visual Studio CMD prompt:

Write the following in the console prompt.

SqlLocalDB stop MSSQLLocalDB -k
SqlLocalDB delete MSSQLLocalDB
SqlLocalDB create MSSQLLocalDB -s

This will first stop the database, then delete it and finally create a new one. Now do the reconnection with success.