• Manoj Bhopale (1/31/2014)


    Use this query to find out disabled windows users/groups.

    SELECT name from sys.server_principals

    where is_disabled='1' and type_desc like '%WINDOWS%'

    This will work when users are disabled in SQL Level not OS Login Level.

    Actually I want to list out all the inactive users(windows) which are not able to login into the OS & henceforth they are not able to connect the SQL Server but they are still alive in the SQL Server as records.