Humor

  1. Home
  2. Humor
  3. (Page 2)

How To Break SQL Server’s XML Data Collection

Humor
0
Oh, XML When we first met, it was about 2011. I had to load files full of you into a table. It wasn’t so bad. Seriously. You were well-formed, and didn’t change from file to file. Even using SQL Server 2005, I could take you. Later on, we got really close when I awkwardly started…
Read More

Let’s Give The Optimizer A Name

Humor, SQL Server
69 Comments
Clunky As my favorite monkey likes to say, the hardest things do with computers are: 1. Naming things 4. Asynchronous processing 2. Cache invalidation 5. Off by one errors Things are tough for Microsoft, too. Take “the optimizer” for instance. It’s based on something called the Cascades Framework. No one wants to say “Cascades Framework”,…
Read More

How to Throttle Logins to SQL Server

Bad Idea Jeans
7 Comments
So, uh, you can use WAITFOR in a logon trigger: Transact-SQL CREATE OR ALTER TRIGGER SorryNorm ON ALL SERVER FOR LOGON AS BEGIN IF ORIGINAL_LOGIN()= 'NormTheNewGuy' WAITFOR DELAY '00:00:15'; END; GO 123456 CREATE OR ALTER TRIGGER SorryNorm ON ALL SERVER FOR LOGON ASBEGINIF ORIGINAL_LOGIN()= 'NormTheNewGuy'    WAITFOR DELAY '00:00:15';END;GO You probably don’t want it to be TOO…
Read More
Brent Ozar reading

Things I Have Not Heard Recently

Humor
17 Comments
“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.

Humor
16 Comments
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?

Humor, SQL Server
13 Comments
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

Humor, SQL Server
2 Comments
I love answering questions about SQL My forum of choice is dba.stackexchange.com because I find the voting and point system with badges for being a decent internet person addictive. If you like more traditional forums, SQLServerCentral.com 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

Humor, SQL Server
18 Comments
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?

Humor
7 Comments
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

Humor
42 Comments
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

Why Your Biggest Query Plans Don’t Show Up in Some DMVs

SQL Server has three ways to get execution plans from the plan cache: sys.dm_exec_query_plan – around since SQL Server 2005 sys.dm_exec_text_query_plan – added in 2005 SP2 sys.query_store_plan – new in SQL Server 2016 And there’s an important problem with the first one. To show it, let’s take one of my many bad ideas, building queries that take 12+…
Read More