Blog Posts
-
Forcing Encryption in SQL Server
If you’re ever planning to allow external connections to a SQL Server, one of the first things to ensure is that the data is encrypted at rest and in transit. SQL Server has an option where we can force all connections on a SQL Server to be encrypted,…
-
Include Execution Trace Messages in SQL Server Error Logs
Logs are always important if you’re supporting systems. The SQL Server Agent has always been a heavily used tool in my experience, so writing execution trace messages to the logs might help investigate an issue one day. This guide follows the Microsoft Docs page – Write Execution Trace…
-
Backing up a SQL Server Database with Encryption
Backing up a SQL Server database with encryption is an essential practice when dealing with sensitive data, particularly if backups are stored off-site or include private customer information. SQL Server provides a secure method to back up databases using encryption by specifying an encryption certificate with the BACKUP…
-
How to Backup a SQL Server Certificate
Backing up SQL Server certificates is essential if you use them, especially for encrypted database backups that may need restoration on another server. This guide explains how to securely back up a SQL Server certificate and its private key. Backing up a SQL Server Certificate 1. Check Existing…
-
Running PowerShell Scripts as Scheduled Tasks in Windows
When you need something scheduled in Windows, the Task Scheduler is the tool at-hand. Running PowerShell (.ps1) scripts as Scheduled Tasks is done differently than differently than running regular .bat scripts. Sometimes I forget how it’s done, so a worthy enough post. Below I’m creating a daily reboot…
-
How to Check What Features are Installed in SQL Server
This is a quick guide on how to check which features are installed on a SQL Server. Open your SQL Server installation files. You may find them within the Setup Bootstrap folder (“C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\SQL2019”) or you might already have the ISO handy. We can open…
-
Installing SQL Server on Linux
A post on installing SQL Server on Linux, following the Microsoft SQL Server 2019 Guide (Red Hat). > 1. Install SQL Server.> 2. Install the SQL Server Command-Line Tools.> 3. Connect to SQL Server Locally.> 4. Connect to SQL Server Remotely. 1. Install SQL Server 1. Get connected…
-
Installing Firewalld on Linux
This post contains installation notes for installing Firewalld on an Amazon Linux 2 EC2 instance. Firewalld is a Linux firewall tool that makes it easy to create custom firewall rules. It acts as a frontend for iptables, the packet filtering system, and lets you apply rules dynamically. This…
-
How to Enable TCP/IP Connections in SQL Server
Some network protocols, like TCP/IP, are disabled by default in SQL Server. To allow TCP connections, you need to enable them and restart the SQL Server service. Here’s a simple guide to do this via GUI & command: :# Option 1: Enable TCP/IP via SQL Server Configuration Manager.…
-
What’s New in the SQL Server 2019 Installation Wizard
SQL Server 2019 was released on November 4, 2019, at Microsoft Ignite, following months of testing with release candidates. In this post, I’ll share my experience with the SQL Server 2019 installation wizard, highlighting key features and improvements that will be useful for DBAs. Key Features of SQL…
Useful SQL DBA Scripts
Performance
– Quick Performance Troubleshooting Scripts
– Get Current User Activity & Blocking
– Get Wait Stats & Top Consuming Queries
– Get Database Sizes & Space Used
– Identify Missing & Unused Indexes
High Availability
– Get Always On Availability Group (AAG) Latency
– Get Mirroring Status & Latency
– Get Replication Latency
– Get Last Node Blip in SQL Server FCI
Maintenance
– Get Estimated Database Backup/Restore Time
– Get Last Database Backup Dates/Times
– Get Index & Heap Fragmentation Levels
– Get Table Sizes in SQL
Security & Auditing
– Get SQL User Permissions and Roles
– Creating SQL Users on Availability Groups
– Audit Failed Login Attempts
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)