I need to acquire the userid that the person signed on at their Windows
workstation. I need to do it from within a Trigger.
How?If you are using Windows Authentication then see function suser_sname in BOL
.
AMB
"Carl Perkins" wrote:
> I need to acquire the userid that the person signed on at their Windows
> workstation. I need to do it from within a Trigger.
> How?|||That does not return the login user that logged into NT - it returns the use
r
that is setup to connect to sql server from the connection string.
When I execute it in Query Analyzer it certainly does work but I need it
from within a trigger and that is a bit different.
Thanks,
Carl
"Alejandro Mesa" wrote:
> If you are using Windows Authentication then see function suser_sname in B
OL.
>
> AMB
> "Carl Perkins" wrote:
>|||If the setup runs under the loggedon account thatll work for you like
Alejandro described. if you are using SQL Server Auth. you have to go for
tha:
There is a bad hack for that if you have control over the connection string:
912257c40e693afe" target="_blank">http://groups.google.de/group/micro...12257c40e693afe
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Carl Perkins" <CarlPerkins@.discussions.microsoft.com> schrieb im
Newsbeitrag news:A899FA96-996A-44D0-ADB5-1AD165506093@.microsoft.com...
> That does not return the login user that logged into NT - it returns the
> user
> that is setup to connect to sql server from the connection string.
> When I execute it in Query Analyzer it certainly does work but I need it
> from within a trigger and that is a bit different.
> Thanks,
> Carl
> "Alejandro Mesa" wrote:
>|||suser_sname(), but that only works of course if the user logs in to SQL
Server using Windows Authentication, not if you use SQL Server
Authentication.
Jacco Schalkwijk
SQL Server MVP
"Carl Perkins" <CarlPerkins@.discussions.microsoft.com> wrote in message
news:ED6D28FE-6F36-401A-8DF6-12480EB62F51@.microsoft.com...
>I need to acquire the userid that the person signed on at their Windows
> workstation. I need to do it from within a Trigger.
> How?
No comments:
Post a Comment