Error 845 Time-out occurred while waiting for buffer latch type 4 during DBCC CHECK
How could different unrelated tables fail with a latch timeout on the exact same page?
And aren’t latches supposed to be, like, super-quick?
How could different unrelated tables fail with a latch timeout on the exact same page?
And aren’t latches supposed to be, like, super-quick?
In many SQL Server environments, DBAs configure SQL Agent jobs with retry attempts (which is a smart move to handle transient issues gracefully). But with it comes a hidden pitfall that often goes unnoticed:
Retry-enabled job steps can silently overwrite logs.
And improper output file settings can cause runaway file growth.
The culprit? Improper use of append settings and missing time-based tokens in output file paths.
Read More »Hidden Risks in SQL Agent Job Logging: How Retry and Output Settings Can Compromise Your LogsDeadlocks in SQL Server can be frustrating and can cause significant performance and reliability issues. A deadlock occurs when two or more transactions are waiting for each other to release a lock on a resource, resulting in a situation where no transaction can proceed, and eventually, one of them is automatically killed and rolled back. This can happen when two transactions try to access the same data in a different order or when one transaction holds a lock on a resource while waiting for a lock held by another transaction. In this blog post, we’ll discuss how to troubleshoot and prevent deadlocks in SQL Server.
Read More »Resolving and Preventing Deadlocks in SQL ServerTraditional database integrity checks in SQL Server can be time-consuming and resource-intensive, especially for large databases, even when using super cool tools like Ola Hallengren’s maintenance solution.
To address this challenge, I developed a TSQL script for performing incremental integrity checks, which significantly optimizes the process and reduces its impact on the server.
Read More »Incremental Integrity Check for Large DatabasesIt’s been a while since my last post about SQL Server performance optimization. This one focuses on index design and how the order of columns in your indexes can make or break your database queries. Using my insights from real-world consulting experience, this guide should help you understand the critical decisions that would impact your database performance.
How does SQL Server decide where to look first when executing a query? The answer lies in the structure of your indexes. Learn how the sequence of key columns can optimize your data retrieval, making your database faster and more responsive.
Read More »SQL Server Index Mastery: Choosing the Right Column OrderAlwaysOn Availability Groups can be tricky when it comes to cluster configurations. Learn from a real-life scenario involving DR exercises and quorum failures.
Recently we’ve encountered an interesting use case for a customer.
They had a table with partitioning that they needed to be archived (with the help of said partitioning), but the ALTER TABLE SWITCH commands were failing with a peculiar error:
Error 4907, ‘ALTER TABLE SWITCH’ statement failed. The table ‘MyDB.dbo.PrtTable1’ has 4 partitions while index ‘IX1’ has 6 partitions.
This prompted some insightful research into some of the validations done by SQL Server behind the scenes when executing an ALTER TABLE SWITCH command.
Read More »Understanding ‘ALTER TABLE SWITCH statement failed’ errors 4907, 4908, and 4912As a SQL Server DBA, you are responsible for securing your organization’s critical data stored in SQL Server. However, there are many myths surrounding SQL Server security 🔒 that can lead to a false sense of security or even leave you vulnerable to attacks. In this blog post, I’ll be debunking the 15 most common security-related myths in SQL Server that every DBA should be aware of. So, grab a cup of coffee, and let’s get started! ☕
Read More »The Top 15 SQL Server Security MythsOn May 10th, all Israeli experts who participated in the conference will share their experience with the Israeli community and convey the best sessions they attended in #SQLBits 2023! I will also be one of them and deliver my favorite session!
Read More »I’m speaking – The best of SQLbits 2023Learn how I resolved an interesting use case of a database stuck in Single-User mode after restoring from a backup. Read my latest blog post to find out more!
Read More »Resolved: Database Stuck in Single-User Mode