Blog Posts

  • How to Delete Files in PowerShell

    This is a post on how to delete files in PowerShell, which will be useful when you need to delete files as part of a script in Windows. This post covers the following:# PowerShell: Delete a File# PowerShell: Delete a Folder# PowerShell: Delete Files in Subfolders Recursively PowerShell:…

    Read More


  • Add Columns to a Table in SQL Server

    Adding new columns to tables in SQL Server is a common task for anyone developing and/or maintaining databases, usually driven by the need for new features on an application/script procedure. As ever, before you get started with MSSQL changes, have a look at the relevant Microsoft Documentation –…

    Read More


  • Create a New Firewall Rule with PowerShell

    This is a short post to share a PowerShell script that will create a new Windows Firewall Rule on a your computer. We have to ensure that we run PowerShell as Administrator for this to work. The above is creating a new firewall rule so inbound SQL Server…

    Read More


  • How to Show Line Numbers in SSMS

    This post contains a quick guide on how to show line numbers in the SSMS query window. Useful if you want to see line numbers while you code. As well as general preference, enabling line numbers in SQL Server Management Studio is particularly useful when debugging an error…

    Read More


  • Add a Filegroup to a Database in SQL Server

    This post contains a demo on how to add a new Filegroup for a database in SQL Server. Most databases work well with single data/log files and do not need this. Database files in SQL Server generally operate with 2 files, data (.mdf) files and log (.ldf) files.…

    Read More


  • How to Check PowerShell Version

    This post is a guide on how to check your PowerShell version on a Windows computer. I’m using $PSVersionTable to get this info. It’s important to keep all software as up-to-date as possible, we all know it. Being on the latest PowerShell version is especially required if you…

    Read More


  • Disabling Change Data Capture in SQL Server

    This post contains a demo on how to disable CDC (Change Data Capture) in SQL Server 2022. The sp_cdc_disable_table and sp_cdc_disable_db in-built MSSQL SPs are what we should use to disable CDC in SQL Server which is explained more below. The sp_cdc_disable_table and sp_cdc_disable_db are the in-built MSSQL…

    Read More


  • 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…

    Read More


  • 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…

    Read More


  • SQL Server Default Port

    The default port for the SQL Server Engine is 1433, which is a key thing to know if you’re working as a Database Administrator (DBA), especially when managing network configurations or troubleshooting connectivity issues. In my experience, SQL Server runs on port 1433 about 95% of the time.…

    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)