How can get the current user name/id of the connected user in Sql
Server 2005? I am using windows authentication. If I use USER or
CURRENT_USER function it always returns DBO and I am looking for the
network sign on which in my case would be URSC. Thanks.Try the ORIGINAL_LOGIN() function.
Hope this helps.
Dan Guzman
SQL Server MVP
"S Chapman" <s_chapman47@.hotmail.co.uk> wrote in message
news:1150200242.086128.219900@.p79g2000cwp.googlegroups.com...
> How can get the current user name/id of the connected user in Sql
> Server 2005? I am using windows authentication. If I use USER or
> CURRENT_USER function it always returns DBO and I am looking for the
> network sign on which in my case would be URSC. Thanks.
>|||Try using SUSER_SNAME. See BOL for more info.
AMB
"S Chapman" wrote:
> How can get the current user name/id of the connected user in Sql
> Server 2005? I am using windows authentication. If I use USER or
> CURRENT_USER function it always returns DBO and I am looking for the
> network sign on which in my case would be URSC. Thanks.
>|||"S Chapman" <s_chapman47@.hotmail.co.uk> escribi en el mensaje
news:1150200242.086128.219900@.p79g2000cwp.googlegroups.com...
> How can get the current user name/id of the connected user in Sql
> Server 2005? I am using windows authentication. If I use USER or
> CURRENT_USER function it always returns DBO
If the user is admin, you will get dbo
Peter
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment