Get notified when a user with administrative privileges logs into your SQL Server

I was helping someone set up some monitoring in their database and they were asking about being notified when someone with administrative privileges logs into SQL Server. While many of you know that I try to use the right tool for the right job, some may cringe when I say triggers can help out in this scenario.

Continue reading “Get notified when a user with administrative privileges logs into your SQL Server”

T-SQL Tuesday #106 Trigger headaches or happiness?

Triggers are both a useful tool with a specific niche… and the devil. Thank you Steve Jones for hosting this week’s topic on triggers!

On the left we have triggers and on the right we have constraints.
On the left we have triggers and on the right we have constraints.

When used appropriately, it’s a great skill to have in your repertoire. When used inappropriately, you will probably ruin someone’s day. Continue reading “T-SQL Tuesday #106 Trigger headaches or happiness?”

Featured Stack Exchange answer!

As many people I talk to about the pursuit of knowledge know, I advocate for a minimum of learning three new things per day. So typically I’ll subscribe to SQL newsletters, podcasts, blogs, and any other medium of information I can find to learn as much as possible. Well, I was really surprised when I found out an answer I posted on Stack Exchange was featured in Brent Ozar’s newsletter!

Here below is the newsletter: (I have a feeling the link may break in the future though!)
Ozar Newsletter

So here’s a screenshot of the page:

And here’s the answer I had posted!

I just thought it was really interesting and neat to pop up randomly in a newsletter I’ve been reading for 7+ years and I had to share it.