Lately, I was trying to run the codemap on my visual studio and got the error “Login failed due to trigger execution”. Details were something like this.
TITLE: Error
Logon failed for login ‘XXXX’ due to trigger execution.
Changed database context to ‘master’.
Changed language setting to us_english. (Microsoft SQL Server, Error: 17892)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=17892&LinkId=20476
Since, I didn’t have much data in the database, I tried deleting the MSSQLLocalDb and recreating using the following sequence of commands in package manager console in my visual studio. I actually got the reference from this stackoverflow link
PM> sqllocaldb info
MSSQLLocalDB
ProjectModels
PM> sqllocaldb stop MSSQLLocalDB -k
LocalDB instance "MSSQLLocalDB" stopped.
PM> sqllocaldb delete MSSQLLocalDB
LocalDB instance "MSSQLLocalDB" deleted.
PM> sqllocaldb create MSSQLLocalDB
LocalDB instance "MSSQLLocalDB" created with version 15.0.4153.1.
This resolved my issues with the codemap. I hope this helps you all.