Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007
    Location
    Holmestrand, Norway
    Posts
    332

    Unanswered: How can I retrieve domain username for group login?

    The title says it all. Given that I have created a login for a domain group, and a database user for that login. What I want to do is retrieving the domain username for the active user. USER_NAME retrieves the database username, suser_name returns (of course) NULL as this is not a sql user.

    The goal is to use domain group logins, while still allowing for logging what user performed which action.
    Ole Kristian Velstadbråten Bangås - Virinco - MSSQL.no - Facebook - Twitter

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by roac
    USER_NAME retrieves the database username, suser_name returns (of course) NULL as this is not a sql user.
    Really?

    When I query suser_sname() while logged in under a windows domain account (using a windows domain group login) I get my DOMAIN\UserName.

    Regards,

    hmscott
    Have you hugged your backup today?

Posting Permissions

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