SQL Audit

Technical Article

Generic trigger for maintaining the Audit Log

  • Script

This trigger will work even if you don't have the primary key on any table. Mechanism to configure the primary key in config table has been provided. This can be very helpful to solve the system audit requirements without much efforts.

Disclaimer : Audit Log trigger has performance overhead. It’s meant for table which is not frequently updated, deleted or inserted. Please take precaution when creating the trigger on the table having too many columns.

(3)

You rated this post out of 5. Change rating

2019-10-15 (first published: )

3,091 reads

Blogs

Why Optimize CPU for RDS SQL Server is a game changer

By

One feature that I have been waiting for years! The new announcement around optimize...

Performance tuning KubeVirt for SQL Server

By

Following on from my last post about Getting Started With KubeVirt & SQL Server,...

T-SQL Tuesday #193 – A Note to Your Past, and a Warning from Your Future

By

I haven’t posted in a while (well, not here at least since I’ve been...

Read the latest Blogs

Forums

Change Tracking – Troubleshooting

By Phil Parkin

I have change tracking configured in several databases, in QA and production environments, and...

is there a no code way to limit an ssis extract from excel to the 1st 21 rows?

By stan

is there a no code way to limit an ssis extract from excel to...

Pivot but preserve all rows on Aggregate column

By getsaby

Hello Need help in pivoting this data set, the Pivot takes MIN/MAX on a...

Visit the forum

Question of the Day

What is the PRODUCT

In SQL Server 2025, what does this return?

CREATE TABLE Numbers
( n INT)
GO
INSERT dbo.Numbers
(
n
)
VALUES
(1), (2), (3)
GO
SELECT PRODUCT(n)
FROM dbo.Numbers

See possible answers