Thursday, March 22, 2012

CURRENT_USER returns dbo instead of NT Username

Is there any way to avoid this?"David J Rose" <david.rose@.newsgroup.reply.only.com> wrote in message
news:IJGdnRrxGboYgsnfRVn-rQ@.mycybernet.net...
> Is there any way to avoid this?
>
I guess you could modify the calling application so that it logs in using
Windows authentication rather than SQL Server authentication. You can also
enforce "Windows Authentication only" at the server level.
Regards,
Simon|||SQL Server is using "Windows Authentication only". It works fine for normal
users, but for symins, I get "dbo". Any ideas?
"Simon Shearn" <simon@.sgurr.theredwire.co.uk> wrote in message
news:4254208f$0$38043$bed64819@.news.gradwell.net...
> "David J Rose" <david.rose@.newsgroup.reply.only.com> wrote in message
> news:IJGdnRrxGboYgsnfRVn-rQ@.mycybernet.net...
> I guess you could modify the calling application so that it logs in using
> Windows authentication rather than SQL Server authentication. You can also
> enforce "Windows Authentication only" at the server level.
> Regards,
> Simon
>|||Try SUSER_SNAME.
AMB
"David J Rose" wrote:

> Is there any way to avoid this?
>
>|||Take a look at USER_NAME() and SUSER_SNAME().
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"David J Rose" <david.rose@.newsgroup.reply.only.com> wrote in message
news:iZqdnWK4aJwDvMnfRVn-3w@.mycybernet.net...
> SQL Server is using "Windows Authentication only". It works fine for
normal
> users, but for symins, I get "dbo". Any ideas?
> "Simon Shearn" <simon@.sgurr.theredwire.co.uk> wrote in message
> news:4254208f$0$38043$bed64819@.news.gradwell.net...
using
also
>sql

No comments:

Post a Comment