Hi. First, I'd like to thank you for this excellent tutorial.
I've been reading the tutorial, and I've seen that the USERNAME that SQLAudit uses to log the changes to tables is the database login, however I'm interested in using SQLAudit with an ASP web application, so the user will always be ASP.Net user, so, I'd like to know if there is any means to send the username from the application's code. Similar needing exits to specify the application name.
Thanks in advance.
Hi Gustavo,
you can use two methods to do this:
1) Every time you open a connection from ASP.NET to your DB write the "real" username into a #temptable, then customize SQLAudit settings to log this username into the man transactions table instead of ASP.NET application pool username.
2) Use "Workstation ID=xxxx" parameter into the connection string where xxxx is "real" web username.
Regards,
Andrea.
damar3Posted Nov 26, 2007, 9:37 AM
is it possibile to save Audit table on a different database? thanks a lot. Yours is a very interesting project.
Gustavo ValdesPosted May 16, 2007, 1:11 PM
Hi. First, I'd like to thank you for this excellent tutorial. I've been reading the tutorial, and I've seen that the USERNAME that SQLAudit uses to log the changes to tables is the database login, however I'm interested in using SQLAudit with an ASP web application, so the user will always be ASP.Net user, so, I'd like to know if there is any means to send the username from the application's code. Similar needing exits to specify the application name. Thanks in advance.