Passing extended parameter into Sql 2008 connection string

Posted by Pita.O on Stack Overflow See other posts from Stack Overflow or by Pita.O
Published on 2010-04-30T15:38:28Z Indexed on 2010/04/30 15:57 UTC
Read the original article Hit count: 238

Hi, I have a need to support extensive auditing capabilities for a system backing into Sql Server 2008. Since I plan to use LINQ (with no Stored Procs), the database would be a clean, zero contact data repository.

However, I need to pratically record a snapshot of every change that happens in the db. So, I thought I should use triggers. But then, I need a user id for the particular user (not the connection string user id) to flow through into the database.

In oracle, I should have been able to set up a PROXY USER and the trigger would be able to pick that up. Last I checked, there was no proxy user concept in Sql Server.

Does anyone know if there's any extender property I can use to flow through my authenticated user name?

ps: I don't mind the impact on connection pooling (if any).

Thanks. P

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about connection-string