Database Growth Events in SQL Server
February 23, 2019
Database Growth Events in SQL Server

When a database file gets full and it needs more space, a growth event will happen. The size of said database growth can be set within the database options, or can be done using the ALTER DATABASE statement as shown below. When considering growth event sizes for log (.ldf) files, you may want to have […]

Set Max Database Size in SQL Server
February 21, 2019
Setting Maximum Database File Sizes in SQL Server

Setting maximum database file sizes in SQL Server is something you’d ideally not have to set, but it’s a good last resort option available if you need it. The reason I say this is because, you never want a production database to stop updating/inserting data due to a size cap on the database. However, if […]

Moving TempDB Files in SQL Server
February 17, 2019
Moving TempDB Files in SQL Server

It’s a solid best practise to have TempDB files stored in separate drive, away from your C: drive. This is because TempDB can grow very large, very quickly (within minutes); depending on workloads of course, and this can happen on both the TempDB data (.ndf) and log (.ldf) files. This post is a quick tutorial […]

October 1, 2018
Checking Table Sizes in SQL Server

There are many ways to check the size of a table in SQL Server. The way you'll do it will likely depend on what you're task at hand is. For example, a quick look at the Disk Usage by Top Tables report on a database you've never seen before would instantly show you the heavy […]

SQL Script Case When
May 13, 2018
Get Disk Space of a SQL Server

You can quickly check disk space info on a SQL Server host by running the query below. I sometimes find this the quickest way to check available space rather than using PowerShell or the Windows GUI. This SQL Script only work on SQL Server 2008 R2 and above. [crayon-5c913afd10038128436860/] The query result will be returned […]