Tag: Database Admin

  • 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…

    read more


  • 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…

    read more


  • 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…

    read more


  • Backup & Restore (WITH FILE)

    In this post I’m going to show what the WITH FILE = X option does when backing-up or restoring a SQL Server database. microsoft_documentation The first thing we need to know is that a backup file can contain multiple databases, and even multiples of the same database. If you run a quick backup command on a…

    read more


  • How to Check Table Sizes in SQL Server

    There are many ways to check the size of a table in SQL Server. The way you will do it will likely depend on what your 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…

    read more


  • Backing Up a SQL Server Database

    Backing up a database is something I’ve always found easier done within a query window. There’s not much to it; That’s what I’m used to writing. I’ve no need to worry about the copy_only option these days, or check SQL Server Editions to see if I can use compression. Good times that was. Measuring available…

    read more


  • Restoring a SQL Server Database

    This is a simple guide to restoring a full backup file in SQL Server, providing an overview of a few options that are available during the process. It is always a good idea to read through Microsoft’s documentation on database restores before proceeding. This will ensure that you have the most up-to-date and accurate information.…

    read more


  • Get Database Growth Events in SQL Server

    This post contains a script to get database and log file growth events on a SQL Server instance. I often find a need to use this script to check what databases have been growing on unmonitored SQL Servers. You know, those SQL Servers that you only need to touch when something breaks. It’s not your…

    read more


  • Reset Default PostgreSQL User Password

    A common scenario working with Postgres is when you have forgotten your default Postgres user password. This is the password you will have entered during your Postgres installation. This is a guide on how to reset the default Postgres user password. This should hopefully help you resolve this issue on your test Postgres environment. Resetting…

    read more


  • How To Install PostgreSQL on Windows

    PostgreSQL is a free open-source RDMS that is widely used and forked. Other than PostgreSQL itself, Redshift is the only other forked database I’ve ever touched. This blog post is a very simple wizard run-through of installing PostgreSQL and Stack Builder on Windows for testing. # Install PostgreSQL on Windows# Install Stack Builder on Windows…

    read more