script for login enbled or disabled

  • Hi,

    Can anyone help me out to get a script to know if a login is enabled or disabled.As in case of many logins in server we cannot check with each and every login.

  • Try this

    SELECT name,default_database_name,is_disabled,type_desc

    FROM sys.server_principals

    WHERE type IN ('u','g','s');

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply