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: https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022#start-in-visual-studio
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.