TSQL logging inside transaction using CLR stored procedure
问题 I'm trying to write a log into another database inside a transaction so that the log will survive even if the transaction is rolled back. I've read this answer which says: One possibility is to use a CLR stored procedure to do the logging. This can open its own connection to the database outside the transaction and enter and commit the log data. So I created CLR stored procedure using this article: [SqlProcedure] public static void Voice(SqlString procedureName, SqlInt32 id) { Connection =