Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250

    Question Unanswered: SYSTEM_USER not returning the correct user (SQL SERVER 2012)

    Hello All:

    The AD group, Domain\GroupName is granted access to sql server. Domain\User1 is a member of the domain, logins in to sql server and issues SELECT System_User. However the result is Domain\GroupName instead of Domain\User1.

    Could you suggest what is wrong here?


    Thanks,
    Baburaj
    Cheers....

    baburajv

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I can't reproduce or explain the behavior that you're describing in your post. When I run:
    Code:
    SELECT SYSTEM_USER, SUser_Sname()
    ...they both produce the name of the Windows user even when the user inherits their SQL access and permissions from a group. Just to get some more information, please post the output from:
    Code:
    EXECUTE xp_logininfo 'Domain\User1', ALL
    ...which may provide a hint.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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