Author: Peter Whyte
-
How to Enable CDC in SQL Server
This is a post on how to enable Change Data Capture (CDC) in SQL Server. Enabling this on a database and table will allow the recording of activity when tables and rows have been modified. This is a feature available for us to configure within SQL Server and…
-
How to Automate PowerShell Scripts with Task Scheduler
Running PowerShell scripts on a schedule is a common requirement for Windows Admins. This guide will show you how to automate your scripts using Task Scheduler, covering both the GUI and PowerShell methods. Task Scheduler allows you to run programs, scripts, or other tasks based on a schedule…
-
SQL Server Default Port
The default port for the SQL Server Engine is 1433, which is a useful thing to know if you’re working as a Database Administrator (DBA) or Database Reliability Engineering (DBRE) type role. Though-out my career I’ve seen SQL Server run on the default 1433 port 99% of the…
-
Connecting to SQL Server on Another Domain
This post contains a guide on how to connect to SQL Server with Windows Authentication, but using a different Domain User other than your own. The regular Windows SQL Server User connects & runs their queries via SQL Server Management Studio (SSMS). If you’re in a corporate environment,…
-
Restart Services on Multiple Hosts using PowerShell
In this post, we’ll walk through a script that restarts services on multiple remote hosts using PowerShell. A single PowerShell command will be run on several computers at the same time. If you need to run a command on multiple remote machines, the PowerShell Invoke-Command cmdlet is a…
-
How to Rename a Computer that Hosts SQL Server
When changing the hostname of a computer that is running SQL Server, we have to update system metadata so that remote connections and applications do not lose connectivity. The hostname system metadata is stored in sys.servers and reported by @@SERVERNAME. This post is a guide on how to update…
-
PowerShell ForEach Loop Tutorial
Looping is a fundamental concept in PowerShell, and in programming in general. It’s needed for various situations where we need to work with one object at a time within an array/collection of objects. Microsoft’s documentation on this, about Foreach : Microsoft Documentation, describes Foreach to be for ‘stepping…
-
How to Check Listening Ports on Windows
This guide will show you how to check which service is running on a specific TCP or UDP port on a Windows computer. This can be useful for verifying which service is tied to a port or proactively checking for any dodgy (suspicious) open ports. In this post,…
-
Get All Database Sizes in SQL Server
Measuring databases is important for knowing how much disk space a SQL Server requires today, as well as the future growth of the database files. It takes more than one run of a script to know all your disk provisioning needs. The script below in this post helps…
-
How to Backup a SQL Server Database
This guide provides a simple demo on how to back up a SQL Server database and explains three main types of backups in MS SQL: > SQL Server Full Backup > SQL Server Transaction Log Backup > SQL Server Differential Backup > Additional Notes on SQL Server Backups…
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)