How to get the list of all database users

前端 未结 6 1896
感情败类
感情败类 2021-01-30 06:40

I am going to get the list of all users, including Windows users and \'sa\', who have access to a particular database in MS SQL Server. Basically, I would like the list to look

6条回答
  •  迷失自我
    2021-01-30 06:57

    EXEC sp_helpuser
    

    or

    SELECT * FROM sysusers
    

    Both of these select all the users of the current database (not the server).

提交回复
热议问题