how to see server logins

  • hi,

    how can we see server logins id

    thxxx

    regards

    jagpal singh

  • suser_id()

    suser_name()

    functions are what you are looking for i think ?

    if not you may need to be more specific

    kgunnarsson
    Mcitp Database Developer.

  • hi

    thaxx for reply but i just want to know that how we can see all users

    login id .like we can see through management studio we just go to security and we can see all users but how can we see through t-sql

  • Hey,

    sp_who or sp_who2

    Cheers,

    Phillip Cox

    MCITP - DBAdmin

  • is this what you are looking for?

    select * from sys.syslogins

    or

    select * from sys.server_principals

    Piotr

    ...and your only reply is slàinte mhath

  • true.. the correct answer would be sys.sql_logins

    kgunnarsson
    Mcitp Database Developer.

  • sql_logins only gives you some of the logins for the server.

    All logins are in server_principals./

  • hi,

    thaxx for nice answer

    regards

    jagpal singh

Viewing 8 posts - 1 through 7 (of 7 total)

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