Re: Get Login



Hi Jose ,

What's your Authentication mode ?

In "Windows Authentication mode" the system_user returns the
DOMAIN\user_login_name.
Sql Server can't know the Windows User name if the Authentication is "SQL
Server Authentication"

--
Giorgio Rancati
[Office Access MVP]

"Jose Perdigao" <JosePerdigao@xxxxxxxxxxxxxxxxxxxxxxxxx> ha scritto nel
messaggio news:7947BD5A-9CF6-4093-91A7-FF5DCA221748@xxxxxxxxxxxxxxxx
> Good afternoon
>
> I did the folowinf function:
> ALTER FUNCTION dbo.iLogin ()
> RETURNS varchar(10)
> AS
> BEGIN
> RETURN system_user
> END
>
> The return value is SQL server user name, I mean, if I logg the computer
> with diferent windows user, the result is the same.
>
> I see, system_user is the same SUSER_SNAME(), isn't it?
> I would like a function to get windows login.
> Thanks
>


.



Relevant Pages

  • Re: ADO and Wnidows User
    ... William GS wrote: ... when the Windows user is admin or power it works fine, but, if the user is not admin/power ADO can't start, what am I doing wrong? ... Try to enable SQL authentication mode in your SQLServer and provide authentication information in the connection string. ...
    (microsoft.public.vc.database)
  • Re: Not associated with a trusted SQL connection???
    ... > When I used ADO.Net to connect to our SQL Server, I got the error saying: ... What authentication mode is your server using? ... Prev by Date: ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: security
    ... using Windows Authentication. ... SQL Server has two authentication mode: ... Server however he need to be assigned more sql server permissions to ...
    (microsoft.public.sqlserver.setup)
  • RE: How to access SQL Server from a non-privileged domain account
    ... account to be able to access the SQL Server. ... Since your SQL Server 2005 has been running with Windows Authentication ... Contact your network administrator to add your domain account to the ... Change your SQL Server 2005 authentication mode to Mix mode so that you ...
    (microsoft.public.sqlserver.setup)
  • RE: security
    ... SQL Server has two authentication mode: ... Mixed Authentication mode. ... administrator permission. ... Server however he need to be assigned more sql server permissions to ...
    (microsoft.public.sqlserver.setup)