SQL SERVER – Fix : Error : 17892 Logon failed for login due to trigger execution. Changed database context to master
Posted on 2011 under Errors & Solution | Comments are off22 May
This error could be due to the logon trigger in sql server 2005, like the one mentioned in the below link
http://www.mssqltips.com/tip.asp?tip=1830.
Solution
There are only two ways to connect to sql server in this scenario.
1. Connect using DAC.(using -A)
sqlcmd -S LocalHost -d master -A
go
drop trigger trigger_name on all server
go
2. Connect using sqlservr.exe from the binn folder
Execute the sqlservr.exe from the command prompt, specifying the location of the binn, using -m & -f to start sql in single user mode with minimal configuration.
Logon failed for login due to trigger execution
Once SQL is started with minimal config, you could connect through management studio & disable the trigger.