If you see messages like that..

Failed to retrieve data for this request.

Failed to connect to server

Logon failed for login

OR

Cannot connect to server…

We have an easy solution! You just need disable all server trigger!

but…

When it’s happen, “maybe” you don’t know the trigger’s list or you don’t have so much time.

The solution can be very easy:

Step 1 : Connect to server because you must run on the server.

Step 2: Open a console

C:\>sqlcmd –A  -d  master 1> use master; declare @sql nvarchar(4000); SET @sql=’’; SELECT @sql=@sql+‘DISABLE TRIGGER ‘+[name]+’ ON ALL SERVER;’ FROM sys.server_triggers; EXEC(@sql); 2> GO

FIX IT!

Well, I don’t like idea to delete a trigger.

1
2use master; declare @sql nvarchar(4000); SET @sql=''; SELECT @sql=@sql+'DISABLE TRIGGER '+[name]+' ON ALL SERVER;' FROM sys.server_triggers; EXEC(@sql);

Source :

http://blog.sqlauthority.com/2009/06/27/sql-server-fix-error-17892-logon-failed-for-login-due-to-trigger-execution-changed-database-context-to-master/

https://support.microsoft.com/en-us/kb/2002062