Sunday, February 19, 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,
Hernán Castelo
SGA - UTN - FRBA"Hernán 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,
> Hernán 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
"Hernán 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,
> Hernán Castelo
> SGA - UTN - FRBA
>|||how i did not guess it ?!
(idiomatic matters...)
thanks
--
atte,
Hernán Castelo
SGA - UTN - FRBA
"Rick Sawtell" <quickening@.msn.com> escribió en el mensaje
news:%23UQodAkzEHA.1564@.TK2MSFTNGP09.phx.gbl...
> "Hernán 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,
> > Hernán Castelo
> > SGA - UTN - FRBA
> >
> >
>
> Take a look at the CURRENT_USER function in the Books Online.
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>

No comments:

Post a Comment