Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Location
    Thailand
    Posts
    42

    Cool Unanswered: How can I check privilege each users

    How can I check privilege each users.I don't know command for list privilege each users.

  2. #2
    Join Date
    Sep 2002
    Location
    Hong Kong
    Posts
    159
    sp_displaylogin <login_name>

    will give you the roles the login is assigned to and whether they are on by default.

    sp_helpuser dbo

    will show the users aliased to dbo in the current database

    If you want more details, check out sysusers and sysalternates in each database and syslogins, sysroles and sysloginroles in the master database

    Richard.

  3. #3
    Join Date
    May 2002
    Posts
    7
    Hi,

    Try this

    use master
    go
    select rolename = r.name, username = l.name, l.suid
    from syssrvroles r, syslogins l, sysloginroles lr
    where r.srid = lr.srid
    and l.suid = lr.suid
    group by r.name
    having r.srid = lr.srid
    and l.suid = lr.suid
    go

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •