Latest Posts

It is 10 PM, do you know where your pages are?

Back in April 2020, I created an open-source project called “SQL Server Page Allocation Reports“. It consisted of a set of SQL queries and some Power BI reports that can be used for visualizing the size and locations of your data and transaction log pages. Well, recently I also added SSMS Custom Reports into the […]

The Simplest Alternative to sp_MSforeachdb

Which drawbacks are there to using the built-in sp_MSforeachdb stored procedure? What other alternatives are out there? Is there a simpler solution? Find out all this and more in this short post.

Finding a use for Extended Properties in SQL Server

“Extended properties allow you to add custom properties to database objects”, so says the official Microsoft documentation. However, very few DBAs make use of them, if at all. This is actually a good thing, because indeed the scenarios in which this feature could be useful are relatively few and rare. On the other hand, I […]

Even more fun with DATETIME arithmetics!

In one of my previous posts, Fun with DATETIME Arithmetics, I introduced a way to use “math” to manipulate datetime values for effectively generating, calculating, and displaying intervals (i.e. difference between two datetime values). These mostly work with the addition and subtraction operators (+, -). In one of the paragraphs, I mentioned multiplication and division, […]

One handy Powershell script template to rule them all

If you know me, you already know that I’m a huge fan of automation. Therefore, it’s natural to assume that I would dabble in Powershell at least once or twice or a few dozen, as a method to implement useful automations. After all, automation is pretty much the whole essence of Powershell in the first […]

Fun with DATETIME Arithmetics

Did you know that we can have basic datetime arithmetics in SQL server? We can use subtraction to find an accurate difference between two dates, and use addition to add an accurate interval to a datetime column or variable.

Read this post to learn more.


Something went wrong. Please refresh the page and/or try again.

Follow My Blog

Get new content delivered directly to your inbox.

Other ways to find me: