Hello everybody,

I have a SQL Server 2005 database and I have created a table to maintain audit trail. I am planning to create trigger with table that need to be logged, but I also need current user's ID that is in session to insert in the audit trail table so that I can save who did what. What is the best way to transfer the session variable in the trigger? Is there a way we can directly get it at the database level or we need to provide it as parameter?

Thanks.