I was testing a logon trigger to restrict connections to certain IPs. It looks like the trigger was not correct. Now I can't log in to the server even as
Is there a way to fix this?
You can connect to the instance using the Dedicated Administrator Connection (DAC). It only accepts local connection by default.
Sqlcmd can be used:
SQL Server Management Studio can also be used:
However trying to establish a connection from
From a disconnected Query Editor or connected with a regular user, reconnect using either of:
Once connected, DISABLE TRIGGER can then be executed: