Auditing

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.

2.33 (3)

You rated this post out of 5. Change rating

2019-10-15 (first published: )

2,995 reads

Technical Article

Audit Users logging in using "sa" or service accounts

  • Script

Security is probably one of a production DBA's most important tasks and if developers use application or service accounts to run queries in your production environment you need to identify then and prohibit it. I notice some unwanted activity after staring a new job and decided to create a script that notifies me via email when […]

You rated this post out of 5. Change rating

2019-07-04 (first published: )

2,107 reads

Blogs

Cool AI sites

By

As I researched and wrote my OpenAI and LLMs blogs (see Introduction to OpenAI...

A Quick Test Data Manager Eval with My Database Backup

By

I wrote about getting the Redgate Test Data Manager set up in 10 minutes...

How-To Convert Excel Date & Time to SQL

By

Hey data friends! This one comes from my personal vault (aka backlog of drafts...

Read the latest Blogs

Forums

Why you should avoid Implicit Measures in your Power BI model

By Koen Verbeeck

Comments posted to this topic are about the item Why you should avoid Implicit...

Getting below error

By sangameshms

An error occurred during recovery, preventing the database 'XXXXX' (28:0) from restarting. Diagnose the...

Why is "SELECT *" about 10 times faster than "SELECT (ALL Columns)"

By fw 10048

Dear all, I have noticed that  a "SELECT * ..."  is about 10 time...

Visit the forum

Question of the Day

Dates and Languages

The string, listopad, translates to a month name in different languages. If I were to run this code, what values are returned?

DECLARE @yourInputDate  NVARCHAR(32) = '28 listopad 2018';

SET LANGUAGE Polish;
SELECT CONVERT(DATE, @yourInputDate) AS [SL_Polish];

SET LANGUAGE Croatian;
SELECT CONVERT(DATE, @yourInputDate) AS [SL_Croatian];

SET LANGUAGE English;

See possible answers