December 5, 2025 at 8:24 pm
I have a login I need to deny connect to on a server, but it is "hidden" inside a Windows Security Group instead of directly added to SQL Server security.
I cannot deny connect to the whole group. I need to specifically not allow this specific login to connect to this server. But when I try to run DENY CONNECT SQL TO ThisLogin; it fails because the login doesn't exist on the server.
Any thoughts on how I can get this done?
December 5, 2025 at 11:15 pm
Nevermind. I needed to leave out the SQL keyword.
December 8, 2025 at 1:21 pm
Hey,
Create a login for the user on the server and deny access so they can not connect, even if their group has permission.
April 9, 2026 at 12:43 pm
The solution is DENY CONNECT TO <ThisLogin>;
I just had to remove "SQL" from the code.
What can I say? I was having an off day.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply