Blog Posts

  • Git Log Oneline Command Examples

    To check our commit history on a Repository within Git, we use the git log command. When using this command we scroll through the commit log within our Terminal by hitting the Enter key, and then we need to hit q on our keyboard to exit reading the…

    Read More


  • What’s New in the SQL Server 2022 Install

    SQL Server 2022 was officially unveiled at Microsoft Build 2022, an annual event aimed at software developers passionate about Microsoft technologies. The conference, which focuses on Microsoft Azure updates and other key tools, is a fantastic opportunity for professionals to stay informed, learn, and network. It includes a…

    Read More


  • How To Change From WSL2 to WSL1

    This is a post on how to change a Windows Subsystem for Linux (WSL) Distribution from running on Version 2 to Version 1. WSL has two versions, the latest (2), and the original version (1). You can have many different Linux Distributions installed on your machine, and you…

    Read More


  • Why Use WHERE 1=2 in SQL

    In a previous blog post, I explained why WHERE 1=1 is often used in SQL queries. This time, let’s discuss WHERE 1=2 — or any condition that results in a FALSE value, such as WHERE 1=9. Essentially, the point is to use a condition that is guaranteed to…

    Read More


  • How to Install Postgres on Ubuntu 20.04

    This post is a short note on how to install Postgres on Ubuntu 20.04. I’m doing this in WSL, however this shouldn’t make any difference if you’re on the same Ubuntu version. First, lets update our local packages by running the following apt command – This Postgres installation…

    Read More


  • How to Manage S3 Buckets with AWS CLI

    This is a post on how to help manage S3 Buckets with AWS CLI, and to help explain some local Operating System (OS) considerations when running such commands. First of all, you will need to be authenticated to your AWS Account and have AWS CLI installed. I cover…

    Read More


  • Delete Files Older Than in PowerShell

    Here is an example of how to use PowerShell to delete files older than a specified date: This script will delete all files in the specified folder that have the last write time older than 30 days from the current date. You can adjust the $maxAge and $folder…

    Read More


  • Get-EventLog in PowerShell

    The Get-EventLog cmdlet in PowerShell can help you view events as you would in Event Viewer, but within your PowerShell Terminal. In this post I’ll share a few examples of use: # Get List of Event Logs Available# Show Events by Count# Show Events by Message Name# Show…

    Read More


  • Get-Command in PowerShell

    Get-Command is a cmdlet in PowerShell that lets you retrieve a list of all available commands in your current session. It’s a go to tool for discovering new commands and understanding their usage and capabilities. You can use Get-Command with wildcards to filter results based on patterns. This…

    Read More


  • Create Folder If Not Exists in PowerShell

    The PowerShell script included in this blog post checks if a specific folder exists and then creates it if it does not already exist. It does this by using the Test-Path command to check for the existence of the folder and the New-Item command to create it if…

    Read More


Categories

AWS
DBA Stories
Linux
MySQL
Other
Postgres
PowerShell
Redshift
SQL Server
Windows Server

Tags

Always On Availability Groups (AAG) (3) Certificates & Encryption (3) Change Data Capture (CDC) (2) Database Admin (71) Database Backups & Recovery (12) Database Mirroring (2) Deleting Data (1) Error Messages (4) Git Commands (5) Importing & Exporting Data (2) Linked Servers (3) Linux Admin (2) Logging & Monitoring (1) Measuring Databases (10) Microsoft Patching (2) PowerShell Scripts (1) SQL Server Agent (4) SQL Server Database Files (1) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (14) SQL Server Network Connectivity (2) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance (5) SQL Server Permissions (1) SQL Server Processes (5) SQL Server Replication (1) SQL Server Scripts (12) Windows Admin (21) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (20)