I know that SqlContext.WindowsIdentity returns the current user that is executing the command (in a CLR trigger), however, this only works for windows authenticated users. How do I get the username if it's a sql server user instead? Any help is appreciated.
views:
1488answers:
2
                +1 
                A: 
                
                
              
            Try using SUSER_NAME() function in SQL server. This will return the current user.
Raj
                  Raj
                   2009-06-29 18:07:05