Author: Peter Whyte
-
How to Upgrade WSL from Version 1 to Version 2
This is a post on how to upgrade to WSL 2. The demo below will explain the process of upgrading an installed Windows Subsystem for Linux distribution from running WSL version 1 to WSL version 2. WSL has two versions, the latest (WSL 2), and the original version…
-
How to Downgrade from WSL Version 2 to WSL Version 1
In certain development or system administration scenarios, you may need to downgrade your Windows Subsystem for Linux (WSL) distribution from WSL version 2 (WSL 2) to version 1 (WSL 1). While WSL 2 brings many enhancements, such as a real Linux kernel and better performance, there are times…
-
How to Check Linux Version in Ubuntu
To check the Linux version running on an Ubuntu system, you can use the lsb_release -a or cat /etc/os-release commands. This is especially useful when accessing a host for the first time or verifying the installed Linux distribution and version. In this post, I’ll demo two ways to…
-
How to Open WSL Projects in Windows File Explorer
This is a guide on how to open WSL files in Windows File Explorer, with added descriptions. The best practice for managing project files in WSL is to store your files on the same Operating System as the tools your plan to use. So if the reason you’re…
-
Drop Table if Exists in SQL Server
The DROP TABLE command in SQL Server will do as it suggests and drops a table. This post is to show an example of using this command, including the IF EXISTS argument. DROP TABLE IF EXISTS in MS SQL allows us to conditionally drop the table, meaning it…
-
How to Change Your Default Distro in WSL
This post is a quick note on how to set your default Windows Subsystem for Linux Distro, which is useful for when managing multiple WSL installations on a computer. Setting Default WSL Distro First,we can list our installed WSL distributions by running wsl -l -v, note the name…
-
Get Last Database Restore Date and Time in SQL Server
This guide provides a script to retrieve the last restore date and time for each database in SQL Server. It’s particularly helpful for tracking restore operations or verifying backups during disaster recovery scenarios. The script below queries the sys.databases and dbo.restorehistory system tables to get the most recent…
-
How to Install Postgres on Ubuntu 20.04 in WSL
This is a post on how to install Postgres on Ubuntu 20.04, on Windows Subsystem for Linux (WSL). This should hopefully be a straightforward installation for you, which is done by following these 2 steps: # Update Local Packages on Ubuntu in WSL# Install Postgres on Ubuntu Update…
-
List All SQL Agent Jobs on a SQL Server Instance
This post contains a SQL script that will return a list of all SQL Server Agent Jobs on a Microsoft SQL Server instance. The sysjobs and sysjobsteps tables we are querying are in the M-S-D-B database. Interesting fact, I am unable to publish a post with this actual…
-
How to Check WSL Distro Versions
This is a quick post on how to check your Windows Subsystem for Linux (WSL) distribution versions, with added info on what being on a different WSL version means. To check your WSL version we can simply run wsl -l -v in our PowerShell terminal window. This will…
Recent Posts
- Quick Performance Troubleshooting Script for SQL Server
- Checking SQL Server Mirroring Health & Latency
- SQL Server Replication Monitoring Scripts
- Get Last Node Blip in SQL Server FCI
- SQL Script to Get AAG Latency
Categories
– AWS
– DBA Stories
– Linux
– MySQL
– Other
– Postgres
– PowerShell
– Redshift
– SQL Server
– Windows Server
Tags
Always On Availability Groups (AAG) Certificates & Encryption Change Data Capture (CDC) Database Admin Database Backups & Recovery Database Mirroring Deleting Data Error Messages Git Commands Importing & Exporting Data Linked Servers Linux Admin Logging & Monitoring Measuring Databases Microsoft Patching PowerShell Scripts SQL Server Agent SQL Server Database Files SQL Server Data Types SQL Server Management Studio (SSMS) SQL Server Network Connectivity SQL Server on Linux SQL Server Patching SQL Server Performance SQL Server Permissions SQL Server Processes SQL Server Replication SQL Server Scripts Windows Admin Windows Authentication Windows Automation Windows Events Windows Firewall Windows Subsystem for Linux (WSL)