1. Home
  2. Humor
  3. (Page 2)
Brent Ozar reading

Things I Have Not Heard Recently

“No, don’t bother the DBA. It’s probably not a database problem.” “But it says right here that it worked on my machine.” “Solid state storage sure is overrated.” “Thank God for auto-shrink, really saved the day again.” “We’re not picky – you can apply updates whenever you want, whenever’s convenient.” “The VM admin said to…
Read More

French makes everything sound so sexy.

Even error messages: Transact-SQL SELECT * FROM sys.messages WHERE language_id = 1036; 12 SELECT * FROM sys.messagesWHERE language_id = 1036; Produces: Talk dirty reads to me These sound better than anything I would ever write in a romantic letter: “SQL Server a détecté une corruption de mémoire matérielle dans la base de données « %1! », à l’ID…
Read More

Do Variables Exist?

I know, I know I swore I’d never talk about variables again. Then I ran into some funny business. Maybe it was quite as funny as the Temp Table Ghosts, but hey. What’s as funny as temp tables? It’s in your heaaaaaaaad If I run this, what do you think will come back? Transact-SQL IF…
Read More

Answering Questions For Fun And No Profit

I love answering questions about SQL My forum of choice is because I find the voting and point system with badges for being a decent internet person addictive. If you like more traditional forums, has a lot of really smart people on it as well. When I post questions or answers, I try…
Read More

The Ghosts of Temp Tables Past

True story You may find it hard to believe, but I recently had to fix a small bug in sp_BlitzCache and sp_BlitzQueryStore. Since both stored procedures have similar functions, they also share some temp table names (mainly the ones for parsing down XML nodes to more manageable chunks). In the window where I was making…
Read More
Brent Ozar attacked by bear

What If Week: What Would You Look At First?

For this week’s What If series, we’re exploring what would happen if you had access to SQL Server’s source code – like if you got a job at Microsoft, signed a partner NDA, if the code leaked, or if it went open source. Today’s question is, “What would you look at first?” Brent says: I’d…
Read More

How to Drop All Your Indexes – Fast

Sometimes I need to reset stuff during performance training classes. I know some of you teach classes, too, and some of you just like doing crazy stuff. So here you go, a stored procedure to lose weight fast: DropIndexes for SQL Server 2016 & Newer Transact-SQL CREATE OR ALTER PROCEDURE dbo.DropIndexes @SchemaName NVARCHAR(255) = 'dbo',…
Read More

Live Blogging: Erik vs. PowerShell

Oh, hey, happy Saturday First, I’d like to apologize to Conor Cunningham for the blatant theft of a blog title. That’s what you get for not posting in three years (like the desert miss the rain~). Why am I here? Why am I writing PowerShell, my sworn enemy? I do it for you. I’m trying…
Read More

There’s Something Funny About Variable Assignment

Guess who I’m going to give you three queries, and you have to guess what the output will be before you run them. Here they are: Transact-SQL DECLARE @DatabaseName NVARCHAR(256) = N'' SELECT @DatabaseName = FROM sys.databases d WHERE = 'master' AND compatibility_level = 130 ORDER BY d.database_id PRINT @DatabaseName SELECT @DatabaseName =…
Read More