SQL Server logins

  • Is there somewhere, a script in SQL where you can see when a login was created, what the current status(Active/Not in use) is and when the login will expire?

    Does a login expire?

    Regards

  • You can get the creation date\last update date by running:

    SELECT * FROM [syslogins]

     

    --
    James Moore
    Red Gate Software Ltd

  • Thanks 4 ur reply.

    I see that when u run that query, it shows a status column with 10. Does this indicate that it's active and what will the status be if it is'nt active?

    Thanks in advance!

  • Status column is for internal use only. The values have not been officially published. I do not know if they have been unofficially published.

    This has been replaced in SQL 2005 by sys.server_principals and sys.sql_logins.


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

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