Author: Peter Whyte
-
DBA Scripts: Generate Test Databases
Related Pillar Post: Backups and Recovery When you’re validating migrations, failover, or automation at scale, you need realistic volume: hundreds or thousands of databases to stress-test backups, restores, log shipping, and copy operations. This helper automates that setup, it creates batches of small, randomized databases with configurable sizes and naming, so you can reproduce large-scale…
Written by
-
Installing Windows Terminal on Windows
Windows Terminal is the modern command-line application for Windows and supports PowerShell, Command Prompt, and WSL in a single interface. On recent versions of Windows (Windows 11 and newer), Windows Terminal is installed by default. If it’s already available on your system, no installation is required. If it isn’t installed, or you’re working on older…
Written by
-
How to Enable Change Data Capture (CDC) in SQL Server
Change Data Capture (CDC) allows SQL Server to track inserts, updates, and deletes on selected tables by reading the transaction log and storing changes in system tables. From a DBA point of view, CDC is easy to enable but easy to underestimate. It adds background jobs, ongoing storage growth, and operational overhead that needs to…
Written by
-
Database Cannot Be Opened Due to Inaccessible Files (Error 945)
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them. Msg 945 · Level 14 · State 2 Database ‘t945’ cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details. ⚡Check state_desc in sys.databases first, then compare sys.master_files paths against…
Written by
-
CREATE DATABASE Permission Denied (Error 262)
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them. Msg 262 · Level 14 · State 1 CREATE DATABASE permission denied in database 'master'. ⚡Grant the login CREATE ANY DATABASE, or add it to dbcreator if it should also manage what it creates. Nothing is broken and nothing is…
Written by
-
DBA Scripts: Get Service Broker Health and Database Mail Queue
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration Two Messaging Systems That Run Quietly Until They Don’t Service Broker and Database Mail are both messaging infrastructure, and both are easy to forget are even active, since SQL Server uses Service Broker internally for things like Availability Group health…
Written by
-
DBA Scripts: Get Collation Conflicts and Cross-Database Dependencies
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration Two Things That Break Silently at Migration or Decommission Time Two checks that rarely matter until the exact moment they do: does this database’s collation match the server’s (and every other database it might join against), and does anything in…
Written by
-
DBA Scripts: Get Compression Candidates
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity Where Compression Actually Pays Off Row and page compression trade CPU for storage and I/O, and that trade is worth making on some tables and not others. The biggest, least-frequently-updated tables are usually the best candidates: maximum space and I/O…
Written by
-
DBA Scripts: Get Schema Change History
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration “What Changed on This Server Recently?” That question comes up after almost every unexpected behavior change: a query that used to work now errors, a report that used to return data now doesn’t, a job that used to succeed now…
Written by
-
DBA Scripts: Get Active Connections by Database
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting The Check Before You Take Anything Offline Taking a database offline, whether for a decommission, a restore, or a maintenance operation that needs exclusive access, starts with the same question: is anyone actually using it right now? Guessing wrong means…
Written by
Start Here
- DBA Scripts: The Complete Guide
- Run a Full Health Check
- DBA Scripts & Tools
- SSMS: The Complete Guide
- SQL Server Errors: The Complete Guide
- Wait Types Library
The Pillars
Blog Categories
- Backups & Recovery (16)
- DBA Scripts (151)
- High Availability (HA) (12)
- Installation & Configuration (38)
- Maintenance (24)
- Migration & Upgrades (14)
- Monitoring (7)
- Performance Tuning (35)
- Security (Encryption & Permissions) (20)
- Storage & Capacity (14)
- T-SQL Fundamentals (11)
- Troubleshooting (54)
- Wait Types (235)
Latest Posts
- Silent Failures: The SQL Server Problems That Never Raise an Error
- SQL Server Login Migration: What Gets Silently Left Behind
- CREATE USER WITHOUT LOGIN vs Contained Database Users
- The sqldba MCP Server: Give Your AI Assistant a Verified SQL Server Reference
- Cannot Resolve the Collation Conflict (Error 468)
- Logical Consistency-Based I/O Error in SQL Server (Errors 823 and 824)
Blog Tags
Access (4) Always On Availability Groups (4) Auditing (7) Backups (6) Blocking (4) Blocking Locking (6) Collectors (7) Database Backups & Recovery (8) Database Backups and Recovery (5) Database Maintenance (7) DBA Tools (24) Disk Space (5) Error Log (3) Extended Events (8) Features (6) High Availability (6) Indexes (7) Installation (7) Inventory (8) Maintenance (6) Migration (14) Monitoring (27) Performance (21) Performance Troubleshooting (9) PowerShell (4) Query Behaviour (5) Security (10) SQL Agent (5) SQL Scripts (17) SQL Server Administration (10) SQL Server Configuration (7) SQL Server Errors (5) SQL Server High Availability (4) SQL Server Internals (3) SQL Server Management Studio (SSMS) (6) SQL Server Monitoring (7) SQL Server Networking (9) SQL Server Security (7) Storage and Capacity (7) T-SQL (10) Temp DB (3) Tracing (7) Transaction Logs (4) Troubleshooting (24) Windows Server (4)