-
How to Restore a Database in SQL Server
Restoring a database in SQL Server is an essential task for any Database Administrator. Whether it’s part of a disaster recovery plan, setting up a test environment, or moving data between servers, you’ll likely restore databases countless times in your career. You can restore databases through the SQL…
-
How To Install Windows Subsystem for Linux (WSL)
Want to run Linux directly on your Windows machine? WSL makes it easy! This guide provides a quick demo on how to get WSL enabled with a Linux distribution installed within minutes. We’ll cover the simplest methods to install WSL by using the <wsl –install> command, and we…
-
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…
-
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…
-
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. Windows Subsystem for Linux (WSL) supports two versions:> WSL2: The latest version with full Linux kernel support, offering better compatibility and performance. > WSL1: The…
-
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…
-
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…
-
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…
-
Managing Old Files with PowerShell
Managing disk space is a common task for IT professionals, especially when dealing with folders that accumulate temporary or outdated files. Using simple PowerShell Script, we can quickly check and delete files older than a given date. In this post, I’ll cover: Reviewing Files for Cleanup: Generate a…
-
Using Get-EventLog in PowerShell
The Get-EventLog cmdlet allows you to view event logs directly in your PowerShell terminal, similar to using Event Viewer. Below are some quick examples to get started:1. List Available Event Log Types2. Show Events by Count3. Filter Events by Message4. View Full Message of an Event 1. List…
Useful SQL DBA Posts
SQL Server Performance
– Get Full SQL Server System Info Fast
– Quick Performance Troubleshooting Scripts
– Identify Missing & Unused Indexes
– Get Wait Stats & Top Consuming Queries
– Get Exclusive Locks on Tables
– Get Last Node Blip in SQL Server FCI
Security & Maintenance
– Get Estimated Database Backup/Restore Time
– Get Last Database Backup Dates/Times
– Get Database Sizes & Space Used
– How to Get Table Sizes
– Get Index & Heap Fragmentation Levels
– Get SQL User Permissions and Roles
– Creating SQL Users on Availability Groups
– Audit Failed Login Attempts
Categories
– Microsoft SQL Server
– Windows Server
– PowerShell
– Linux & WSL
– Other
Tags
Always On Availability Groups (AAG) (4) Certificates & Encryption (3) Change Data Capture (CDC) (2) Database Admin (77) Database Backups & Recovery (14) Database Mirroring (2) Deleting Data (1) Error Messages (5) 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 (5) SQL Server Database Files (1) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (15) SQL Server Network Connectivity (3) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance (6) SQL Server Permissions (2) SQL Server Processes (6) SQL Server Replication (2) SQL Server Scripts (13) Windows Admin (21) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (19)