J
Jose Perdigao
Good afternoon
I using the following function to get the login from Windows XP
ALTER FUNCTION dbo.iLogin ()
RETURNS varchar(30)
AS
BEGIN
/* Sql Server autentication mode */
IF CharIndex('\',system_user)=0
RETURN system_user
/* Windows Autentication mode */
RETURN SUBSTRING(system_user,CharIndex('\',system_user)+1,30)
ENDALTER FUNCTION dbo.iLogin ()
RETURNS varchar(30)
AS
BEGIN
/* Sql Server autentication mode */
IF CharIndex('\',system_user)=0
RETURN system_user
/* Windows Autentication mode */
RETURN SUBSTRING(system_user,CharIndex('\',system_user)+1,30)
END
I connect to sql server with - Use windows NT INtegrated security. The
function return the login of win XP, it works fine.
From remote connection, I can't connect using Windows NT INtegrated security
and then I must connect with SQL Server Authentication.
When I run the function, return the SQL Sever login and not Windows XP
login.
Question.
Is it possible create a funtion using Sql Server Autehntication connection
and return Windows XP login?
Any Suggestions?
Thanks,
José Perdigão
I using the following function to get the login from Windows XP
ALTER FUNCTION dbo.iLogin ()
RETURNS varchar(30)
AS
BEGIN
/* Sql Server autentication mode */
IF CharIndex('\',system_user)=0
RETURN system_user
/* Windows Autentication mode */
RETURN SUBSTRING(system_user,CharIndex('\',system_user)+1,30)
ENDALTER FUNCTION dbo.iLogin ()
RETURNS varchar(30)
AS
BEGIN
/* Sql Server autentication mode */
IF CharIndex('\',system_user)=0
RETURN system_user
/* Windows Autentication mode */
RETURN SUBSTRING(system_user,CharIndex('\',system_user)+1,30)
END
I connect to sql server with - Use windows NT INtegrated security. The
function return the login of win XP, it works fine.
From remote connection, I can't connect using Windows NT INtegrated security
and then I must connect with SQL Server Authentication.
When I run the function, return the SQL Sever login and not Windows XP
login.
Question.
Is it possible create a funtion using Sql Server Autehntication connection
and return Windows XP login?
Any Suggestions?
Thanks,
José Perdigão