TechTalkz.com Logo Ask the Expert

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Microsoft SQL Server

Notices

Capturing the user's identity in a web application

Microsoft SQL Server


Reply
 
Thread Tools Display Modes
Old 15-11-2007, 08:41 AM   #1
Jane
Guest
 
Posts: n/a
Capturing the user's identity in a web application

In the SQL Server backend of an intranet web application I want to capture
the user's identity for an audit trail in the Insert and Update triggers.
However the users are coming into the application as a generic WebUser. Is
there any way to capture their name for the audit trail? (I'm more a SS
person than a web developer).
  Reply With Quote
Old 15-11-2007, 10:51 AM   #2
Uri Dimant
Guest
 
Posts: n/a
Re: Capturing the user's identity in a web application

Jane
SELECT HOST_NAME() ??

"Jane" <Jane@discussions.microsoft.com> wrote in message
news:5D815517-BB02-4CCB-BA80-E873D37148CB@microsoft.com...
> In the SQL Server backend of an intranet web application I want to capture
> the user's identity for an audit trail in the Insert and Update triggers.
> However the users are coming into the application as a generic WebUser.
> Is
> there any way to capture their name for the audit trail? (I'm more a SS
> person than a web developer).



  Reply With Quote
Old 16-11-2007, 11:33 AM   #3
Steve Troxell
Guest
 
Posts: n/a
Re: Capturing the user's identity in a web application

Jane wrote:
> In the SQL Server backend of an intranet web application I want to capture
> the user's identity for an audit trail in the Insert and Update triggers.
> However the users are coming into the application as a generic WebUser. Is
> there any way to capture their name for the audit trail? (I'm more a SS
> person than a web developer).


Your web application can use SET CONTEXT_INFO to set the username on the
connection. The triggers can then read this and pull the username out.
Lookup SET CONTEXT_INFO in Books Online.

Steve Troxell
  Reply With Quote
Reply

Thread Tools
Display Modes



< Home - Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 11:47 PM.


vBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2010, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional