how to identify windows authentification logon username

  • I want to create a trigger on table which reads username who accesses table.

    select user_name() returns only SQL Server username. Is it possible to get windows username for users who use windows authentification?

    thanks

    RB

  • select

    suser_sname()

    Returns <Domain>\<Loginname>

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 2 (of 2 total)

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