Within a trigger I need to identify a user via his NT User id but there is no system variable that provides this and instead provide the SQL Server logon.
If the current user is logged in to Microsoft® SQL Server™ using Microsoft Windows NT® Authentication, SYSTEM_USER returns the Windows NT login identification name, for example, DOMAIN\user_login_name. However, if the current user is logged in to SQL Server using SQL Server Authentication, SYSTEM_USER returns the SQL Server login identification name, for example, sa for a user logged in as sa.
You might also give HOST_NAME() a spin. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.