Friday, February 24, 2012

how to know logged user (odbc) ?

hi
inside a stored procedure :
how can i know
which user is logged on
the current odbc session ?
thanks
atte,
Hernn Castelo
SGA - UTN - FRBA"Hernn Castelo" <bajopalabra@.hotmail.com> wrote in message
news:eON6U6jzEHA.3804@.TK2MSFTNGP10.phx.gbl...
> hi
> inside a stored procedure :
> how can i know
> which user is logged on
> the current odbc session ?
> thanks
> --
> atte,
> Hernn Castelo
> SGA - UTN - FRBA
>
Take a look at the CURRENT_USER function in the Books Online.
Rick Sawtell
MCT, MCSD, MCDBA|||To add to Rick's response, you can also use SUSER_SNAME() to get the login
name.
Hope this helps.
Dan Guzman
SQL Server MVP
"Hernn Castelo" <bajopalabra@.hotmail.com> wrote in message
news:eON6U6jzEHA.3804@.TK2MSFTNGP10.phx.gbl...
> hi
> inside a stored procedure :
> how can i know
> which user is logged on
> the current odbc session ?
> thanks
> --
> atte,
> Hernn Castelo
> SGA - UTN - FRBA
>|||how i did not guess it ?!
(idiomatic matters...)
thanks
atte,
Hernn Castelo
SGA - UTN - FRBA
"Rick Sawtell" <quickening@.msn.com> escribi en el mensaje
news:%23UQodAkzEHA.1564@.TK2MSFTNGP09.phx.gbl...
> "Hernn Castelo" <bajopalabra@.hotmail.com> wrote in message
> news:eON6U6jzEHA.3804@.TK2MSFTNGP10.phx.gbl...
>
> Take a look at the CURRENT_USER function in the Books Online.
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>

No comments:

Post a Comment