Author: Peter Whyte

  • Removing Quotes from all CSV Files in a Directory

    Managing CSV files often involves cleaning up data before processing. A common task is removing unwanted quotation marks from the contents of CSV files. I wrote a blog post on how to remove quotes from a single CSV file using PowerShell some years ago, which I have just…

    Read More


  • Keeping SQL Server and Critical Systems Up to Date

    Applying the latest patches to SQL Server, Windows OS, and underlying hardware is a vital part of maintaining secure, high-performing systems. For many organizations, this is done on a regular schedule—monthly, quarterly, or aligned with specific maintenance windows. However, for business-critical, 24/7 systems, patching takes extra planning and…

    Read More


  • How to Set the Default Database for SQL Server Users

    This blog post contains a quick guide on how to set your default database in SQL Server using SQL Management Studio. When you log into SQL Server using SSMS and open a new query window, you will automatically be set to use your logins default database which was…

    Read More


  • How to Open SSMS as a Different Domain User

    If you’re working with SQL Server in a corporate environment, you might need to connect to the server using a different Domain User account, opening SQL Server Management Studio (SSMS) as a another user. This may be required if your computer is joined to a different Domain than…

    Read More


  • Troubleshooting Database Mirroring Issues in SQL Server

    This article contains various ways for resolving database Mirroring issues in SQL Server, guiding you through the troubleshooting process. Maintaining high availability and data integrity in a SQL Server environment is one of the main priorities as a SQL DBA. One issue we may encounter is Mirrored databases…

    Read More


  • What’s New in SQL Server 2025

    Microsoft announced SQL Server 2025 at Microsoft Ignite, with major new features focused on AI and integrating Azure SQL DB capabilities into on-premises servers. Check out this Microsoft Announcement post for more information: Announcing Microsoft SQL Server 2025: Enterprise AI-ready database from ground to cloud Key Features –…

    Read More


  • Time To Revive This Blog

    As per title, I’m keen to revive this blog here at https://peter-whyte.com. I haven’t been publishing regularly for over a year, and it’s been many years since I changed the theme/design. So here we go, a new theme is in-place, updates are underway to improve the overall design,…

    Read More


  • How to Set Environment Variables in PowerShell

    Environment variables store key information on your system that programs can use to influence their behavior. For example, the AWS CLI uses the AWS_REGION variable to determine the region for API requests. This guide will cover:– Listing all environment variables– Retrieving the value of a specific environment variable–…

    Read More


  • How to Kill SPIDs in SQL Server

    In SQL Server, Session Process IDs (SPIDs) play a crucial role in identifying and managing SQL connections. The KILL (SPID) command serves as a tool for terminating troublesome sessions. This blog post provides an overview of the KILL command and its practical applications. The following is included in…

    Read More


  • How to Get Environment Variables on Windows

    Environment variables in Windows contain information about the system’s environment, such as the directories containing executables or the system’s PATH. Programs can use these variables to find resources on the computer. They can be set at the system level or for individual user accounts and can be modified…

    Read More