I am trying to drop a login from my SQL Server but I am getting the below error:
Drop failed for Login ''. (Microsoft.SqlServer.Smo)
Login '' has granted one or more permission(s). Revoke the permission(s) before dropping the login. (Microsoft SQL Server, Error: 15173)
I see the login has granted Connect permission to a user on the database. When I use the below SQL to revoke it, it gives me a Syntax error
REVOKE CONNECT ON LOGIN::  FROM [SQL_Login]
Msg 102, Level 15, State 1, Line 0 Incorrect syntax near 'CONNECT...'.
Please help fix and identify where I am missing anything.
asked Jan 28, 2016 at 03:23 AM in Default
It looks to me like you need to do this:
See Books Online for more details: https://msdn.microsoft.com/en-us/library/ms177573.aspx
answered Jan 28, 2016 at 07:24 AM