Assume you have some kind of process outside the SQL Server which is supposed to record some kind of database activity. There are many ways to do it, most of which require constant and/or stable connection to the database. But what if that’s not good enough? Let’s consider our options.Read More »Using Extended Events as a Buffer
In one of my previous blog posts, Automatically Enable or Disable Jobs based on HADR Role, I provided a solution for automatically enabling or disabling scheduled jobs in combination with Availability Groups and Database Mirroring. In this blog post, I’m going to build upon my previous solution and improve it even further – taking it to the next level of automation!Read More »Control SQL Jobs based on HADR Role – Taking it to the Next Level
Ever had your SHRINK operation “stuck” and didn’t know why, or how to solve it? It’s more common than you think. Check out this post for more info, tricks and tips.Read More »Troubleshooting Long-Running SHRINK Operations
We all know the error log used by SQL Server to audit failed logins by default. But is it good enough? For many scenarios, it isn’t. It’s actually missing a lot of important information. But, worry not, for there are better solutions!Read More »Finding the Details Missing from the SQL Server Failed Logins Audit
Data compression in SQL Server can definitely go a long way in saving storage space, as well as improve performance. It can especially be significant in very large databases. But in certain scenarios it can actually cause more harm than good, and it’s important to identify these scenarios.
I wrote this script which performs compression savings estimation checks for an ENTIRE database. Yeah there are plenty such scripts out there already, but there’s something in particular that they all seem to be missing, and that is the ability to actually generate the relevant remediation commands for you. After all, ain’t nobody got time for writing all those “ALTER TABLE/INDEX” commands themselves!
This is why I created the T-SQL script below. Check out the “messages” tab once the script completes execution, to find the resulting remediation commands. In addition, you will also get a query result with full details.
The script also performs various checks to determine whether PAGE or ROW compression type would be more beneficial (based on stuff such as range scans vs. updates percentage, difference in compression savings, etc.). It has several parameters at the top to control various thresholds and behaviors, so that you could fine tune it for your specific database.Read More »The Ultimate Compression Savings Estimation Script for an Entire Database
I never managed to find an online reference page for the rules run by the SQL Vulnerability Assessment tool. So I figured “why not do it myself?”. Cool script attached!Read More »SQL Vulnerability Assessment Tool – Rules Reference List
Looking for a way to send calendar event invitations from within SQL Server?
Then fret no more, my friends, because I’ve been there, and out of sheer desperation of not being able to find a properly working solution, I’ve decided to build one myself. And now it’s available for your wide consumption as an open source project!Read More »New open source project: Send calendar invites from within SQL Server
I know this has little to do with SQL Server (and therefore, not quite like me to post this), but it’s a nifty little script in Powershell which I’ve been working on recently, and I believe other people may find use for it as well (someone, somewhere, maybe?).
This script basically takes a Trello JSON file (created using their Export feature), connects to a GitHub repository, and creates one GitHub issue per each Trello card. Any labels are copied over, any checklists in the Trello card will be added into the issue body as checklists, and any attachments in the Trello card will be added into the issue body as an unordered list of links. Finally, at the bottom of the issue’s body there would be a link back to the original Trello card.Read More »Import GitHub Issues from Trello Cards using Powershell