Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 keeping the audit info intact.

Author  Topic 

venkath
Posting Yak Master

202 Posts

Posted - 2008-04-10 : 08:23:39
Hi all

I have a stored procedures with few DML stmts inside.

I need to log the success/failure of each DML statment into seperate audit table as follows

Begin
DML Stmt1
Log sucess/failure (Insert stmt to audit table)
DML Stm2
Log sucess/failure (Insert stmt to audit table)
end

when any of the above DML stmt fails, the entire transaction is getting rolled back including the audit information.

How can i keep the audit info intact when the transaction is rolled back.

Thanks.



visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-10 : 12:45:17
If the DML fails why do you still want to audit it?
Go to Top of Page
   

- Advertisement -