You may see the following error when attempting to access a database during or after a restore operation: Database “[DatabaseName]” cannot be opened. It is in the middle of a restore. This message is easy to misinterpret, especially during incidents or maintenance windows.It does not indicate corruption or failure by itself. This error means the…
Part of the DBA-Tools Project. Is Every Replica Actually Ready to Take Over An Availability Group only protects you if every secondary replica is actually connected, synchronized, and healthy at the moment you need it. A replica that quietly dropped its connection hours ago looks identical to a healthy one until you check, and the…
When you need to drop, restore, or change database settings, active user sessions often get in the way. SQL Server will block these operations until all connections are cleared. In busy environments, waiting is rarely practical. This post shows a safe, deliberate, and review-first way to identify and kill all user sessions connected to a…
Part of the DBA-Tools Project. How Far Behind Is Each Database, Really Availability Group Replica State answers whether a replica is connected and generally healthy. It doesn’t answer the database-level question that actually matters during an incident: how much data is sitting in the send queue right now, how fast is it draining, and how…
Part of the DBA-Tools Project. Checking the last backup times is one of the first things worth doing when you sit down at a SQL Server instance, whether it’s one you’ve owned for years or one you inherited an hour ago. Before making changes, running maintenance, or troubleshooting an issue, you need to know whether…
Part of the DBA-Tools Project. A SQL Server that runs out of disk stops taking writes, and depending on which volume filled up, that can mean suspended databases, a frozen transaction log, or failed backups at exactly the wrong moment. Disk space is the least glamorous thing a DBA monitors and the single most common…
Testing connectivity to remote server ports is a basic skill every DBA should have. Not just DBAs either — anyone running production systems needs to be able to answer one simple question quickly: Can this server actually reach that server on this port? This post shows two reliable ways to test whether a remote port…
Part of the DBA-Tools Project. When users report the application is slow, the first question is always the same: what is actually running right now? Not what ran an hour ago, not what the plan cache thinks is expensive on average, but what is executing on the instance at this moment and how long it…
When troubleshooting connectivity issues, it’s often not enough to test whether a remote port is reachable. You also need to know what is actually listening on a port locally, or whether anything is listening at all. This post focuses on the local side of the equation, what is listening on the machine itself and which…
Part of the DBA-Tools Project. Every time SQL Server builds an execution plan that could have been improved with a better index, it makes a note of it. Those notes accumulate in memory and are queryable through the sys.dm_db_missing_index_* DMVs, and combined into a single ranked list they are one of the fastest wins in…
Always On Availability Groups (4) Auditing (7) Backups (5) Blocking Locking (6) Collectors (7) Database Backups & Recovery (8) Database Backups and Recovery (5) Database Maintenance (7) DBA Tools (24) Disk Space (5) Extended Events (8) Features (6) High Availability (6) Indexes (7) Installation (7) Instance (3) Inventory (6) Jobs (3) Maintenance (6) Migration (13) Monitoring (24) Performance (21) Performance Troubleshooting (9) PowerShell (4) Queries (3) Query Behaviour (5) Security (7) 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 (9) Temp DB (3) Tracing (7) Transaction Logs (4) Troubleshooting (14) Windows Server (4)