What is the best way to audit a DELETE journal?

The user ID in the connection string is not a variable and is different from the user ID (for example, GUID) of your program. How do you delete the audit log if your connection string user id is static?

The best place to insert / update / delete a log is through triggers. But with a static connection string, it's hard to register who is deleting something. Which alternative?

+1
source share
2 answers

With SQL Server, you can use CONTEXT_INFO to pass information to a trigger.

( -), (, ). .

+1

. - , , .

. , , LastChgID LastChgDate. , ( ), , , LastChgID , .

0

Source: https://habr.com/ru/post/1705552/


All Articles