Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NT Authentication

Status
Not open for further replies.

olibh

Programmer
Mar 21, 2002
13
IE
I am using NT authentication to logon to sql server and I have written an insert trigger that needs to capture the NT user name for the user that adds a new entry.

I have added a field called modifier and set the default of this field as(suser_name()).

However, this does not seem to capture the nt logon - can anyone help ?
 
WHat about...
SELECt nt_username FROM master..sysprocesses WHERE spid = @@spid

Regards,

Justin.
 
Tried this but it does not seem to work
 
try a small variation

SELECt hostname FROM master..sysprocesses WHERE spid = @@spid
 
Is this a typo (suser_name()).
or did you mean

(suser_sname())
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top