Author: Peter Whyte

  • How to Install Posh-Git on Windows

    posh-git is a PowerShell module that enhances your command line experience by displaying Git status information and providing tab completion for Git commands. This guide will show you how to install Posh Git on Windows using the Chocolatey Package Manager. As an afterthought, I’ve added notes at the…

    Read More


  • Install Chocolatey on Windows

    This post is a guide on installing the Chocolatey package manager on Windows by running a PowerShell command. Chocolatey allows you to manage software packages on your system with simple ‘choco’ commands. In this post after I install Chocolatey I’m installing a GUI to view all installed packages.…

    Read More


  • Disk Usage by Top Tables Report in SQL Server

    The Disk Usage by Top Tables Report in SQL Server is a quick way to get the sizes of all tables within a database. It’ll show all tables largest to smallest tables by total size on disk. If you notice that a database is growing larger in size,…

    Read More


  • Change Git Remote URL to SSH from HTTPS

    This post is a guide on how to change Git from using SSH to HTTPS for authentication. Using SSH for your version control system is more efficient as we do not have to enter a password every time we need to contact the remote repository. You should have…

    Read More


  • List all Schemas, Tables & Columns in Redshift or Postgres

    This post contains a SQL script that will return all schemas, tables and columns in Redshift or Postgres. I’m combining the Redshift and Postgres database blog categories here. Redshift was forked from Postgres and is similar in a lot of ways. One of the feature differences between Redshift…

    Read More


  • Create a Superuser in RedShift

    Superusers in RedShift hold the permissions to perform any action in the cluster, the same access as ‘master’ or whatever you named the superuser during creation. Giving Superuser power should only really happen in local test environments, or if it’s a throw-away infrastructure as code (IaC) environment. You…

    Read More


  • Drop Users in RedShift

    Dropping users in Amazon Redshift is a simple task, but sometimes you may encounter an error message if the user you are trying to drop is an owner of an object in the database, such as a schema, table, or view. When this happens, you will see one…

    Read More


  • Create a Test AWS RedShift Cluster

    Here’s a simple guide on creating a new AWS RedShift Cluster within a personal AWS test environment. Warning, if you’re testing this AWS Service you have to be rigorous with managing the cluster for billing reasons. I delete my cluster right after I’m done with it as you’ll…

    Read More


  • Show Last Backup Times in SQL Server

    If you’re running a SQL Server and you care about the data held in it, you should already be backing up the databases. But it’s always surprising the number of times you encounter business-critical databases not being backed up as a DBA! When given the opportunity to look…

    Read More


  • Why use WHERE 1=1 in SQL Queries

    A common SQL question is, why would anyone use WHERE 1=1 in their queries? And what does it do? The WHERE 1=1 condition means WHERE TRUE. It returns the same query result as it would without the WHERE Clause. There is no impact on query execution time. This…

    Read More