Story time. Let’s say a database server is receiving a new release that include a change to a stored procedure. All of the databases are supposed to get the changes but one way or another there are problems with the release and it has to be stopped part of the way through. Maybe some changes … Continue reading Searching a Stored Procedure for Text
This month’s T-SQL Tuesday topic comes from Andy Leonard who asks “how do you respond when technology changes under you?” Check out Andy’s invitation blog post by clicking the image below: For my contribution this month, I want to go over how I work to make the scenario of technology changing under me happen as … Continue reading T-SQL Tuesday #138: Managing Technology Changes
Deadlocks can be frustrating to troubleshoot. I’ve blogged about deadlock priority in the past but what about deadlock graphs? Let’s take a look at deadlock graphs and what I think is the best way to decipher them. Test Deadlock Setup Let’s open up two query windows in SSMS. In the first window, we’ll have these … Continue reading Viewing Deadlock Graphs
What are the top wait types that you come across on your SQL Servers? Is ASYNC_NETWORK_IO one of them? Let’s go over why you might be seeing ASYNC_NETWORK_IO waits and how to get them cleaned up. Slow Application Processing ASYNC_NETWORK_IO waits can occur when your application isn’t processing your SQL Server data fast enough and … Continue reading Why Do I See ASYNC_NETWORK_IO Waits?
Today, I want to go over what Virtual Log Files are and how to handle them if you have too many in your databases. A SQL Server log file is made up of smaller files called Virtual Log Files (VLFs). As the log file grows, so will the count of VLFs. I haven’t seen or … Continue reading Handling High Virtual Log Files (VLFs)
What are read-ahead reads and how do they impact SQL Server performance? Read-ahead reads allow SQL Server to think ahead to pull pages into the buffer cache before they are actually requested for a query. Up to 64 contiguous pages from a file can be read and the ability to read-ahead can be used for … Continue reading What is a Read-Ahead Read?
Delete and Truncate can both be used to remove data from a database but they are far from identical. They both have some differences that should be considered when being used. I’ve specifically seen confusion before about how each affects IDENTITY columns and how each is handled by the transaction log so let’s take a … Continue reading Delete vs. Truncate
CASE expressions are used to evaluate a condition or conditions and return a value. I’ve most often seen this in SELECT statements but that’s not a limit. In fact, documentation states that CASE can be used in any statement or clause that allows a valid expression. I used it differently than SELECT this week in … Continue reading CASE Expression Examples
Every SQL Server install includes the sa login as a sysadmin. This can be good for consistency; however, that also makes it a prime target for attackers trying to get into your SQL Server. That is one of many reasons why you should make the following changes to protect your sa login from being used … Continue reading Changes for sa Login Safety
You setup TDE for your database. Great! Now you need to restore that database to a different server. Maybe you’re migrating off of an older server or maybe there is testing to be completed for an upcoming release. If we try to backup/restore or attach the database on a different server we’ll get some variation … Continue reading Restoring a TDE Database to a Different Server
Something went wrong. Please refresh the page and/or try again.
Follow My Blog
Get new content delivered directly to your inbox.