Posts by Brent Ozar

[Video] Office Hours: 22 Good Questions and a Stinker

Videos
4 Comments
Lots of good questions on today’s broadcast! If you’d like to submit one, go to https://pollgab.com/room/brento and upvote the ones you’d like to see me cover. Here’s what we covered today: 00:00 Start 01:05 Testing123: When inserting or updating data into a table, from a concurrency perspective, does it make sense to break up the…
Read More

[Video] Office Hours: Quickie Before Dinner

Videos
0
Before heading out to dinner, I went through your highly-upvoted questions from https://pollgab.com/room/brento. Here’s what we covered in this episode: 00:00 Start 00:20 Mert: Hi Brent, what is the relation between AlwaysOn and Windows Failover Cluster? Is WFC an obligation or a choice for creating an Always On availability group? It will be nice if…
Read More

Office Hours, ChatGPT Edition: AI Answers 4 of Your Questions

In a recent Office Hours post, David Reabow suggested letting ChatGPT answer a few of the questions y’all posted at http://pollgab.com/room/brento/. Brilliant! Let’s see how it does. I purposely cherry-picked the questions that I thought ChatGPT would have the easiest time answering. Rollback is single threaded asks: Hi Brent! An update statement has blocked all…
Read More

[Video] Office Hours: Ten Minutes of SQL Server Answers

Videos
2 Comments
ChatGPT, Resource Governor, manually created stats, Always Encrypted, and as always, fragmentation: let’s answer your questions from https://pollgab.com/room/brento. Here’s what we covered today: 00:00 Start 01:13 Timbalero: Hi Brent. my friend knows your view on rebuilding indexes. He also thinks that external index fragmentation affects pretty much only readahead scans. For scientific purposes, what metrics…
Read More

Bite-Sized Office Hours: Q&A on TikTok

Company News
9 Comments
Wanna learn about SQL Server and the Microsoft data platform, but you don’t wanna sit through long videos? Enjoy short videos on TikTok? I’ve got just the thing: I’m taking the best Q&A from Office Hours and putting ’em out as individual videos. That way, as you’re swiping through practical jokes, friendship goals, candid idiocy, music…
Read More
Office Hours - ask me anything.

[Video] Office Hours: Ask Me Anything About SQL Server

Videos
3 Comments
Y’all just never run out of interesting questions at https://pollgab.com/room/brento! I’m impressed, got another great round today. Here’s what we covered: 00:00 Start 00:25 Chrisbell: Recently we’ve been facing thread starvation issues. How can we troubleshoot it when even sp_whoisactive ( even with DAC ) is unresponsive and takes forever to return a result set…
Read More

The 20th Anniversary of the SQL Slammer Worm

SQL Server
8 Comments
Twenty years ago this month (next Wednesday to be exact), sysadmins and database administrators started noticing extremely high network traffic related to problems with their SQL Servers. The SQL Slammer worm was infecting Microsoft SQL Servers. Microsoft had known about it and patched the problem 6 months earlier, but people just weren’t patching SQL Server. There…
Read More

[Video] Office Hours: Back Live on Twitch Again

Videos
3 Comments
After I stopped selling live classes, I took some time off all live broadcasting period. It was a nice couple of months over the holidays, had a good time with the family, and now I’m starting to fire up my Twitch channel again. I’m not setting a schedule yet, just broadcasting when I have time…
Read More

[Video] Office Hours: Bad Hair Edition

Videos
8 Comments
I am waaaay overdue for a haircut, but instead of being a responsible adult, I stopped to take your questions from https://pollgab.com/room/brento. 00:00 Start 00:43 Mike: We have 3 Dell PowerEdge R630 servers with SQL Server installed. Everything functions for 3.5 years straight. How long is it expected to work? 01:30 Shalom: What are the…
Read More

Office Hours: Bad Questions Edition

Videos
4 Comments
Normally, y’all post and upvote great questions at https://pollgab.com/room/brento, but in today’s episode, y’all upvoted some stinkers. Buckle up. 00:00 Start 00:47 SQLKB: Hi, according to sp_BlitzCache I usually have more than 260k plans in cache, created in the past 1 hour, is it a big number? Comparing number of plans from exec_query_stats vs exec_cached_plans…
Read More

3 Ways to Debug T-SQL Code

T-SQL
37 Comments
Writing new code = bugging. That part’s easy. Taking those bugs back out, that’s the hard part. Developers are used to their tools having built-in ways to show what line of code is running now, output the current content of variables, echo back progress messages, etc. For a while, SQL Server Management Studio also had…
Read More

How to Find Missing Rows in a Table

T-SQL
21 Comments
When someone says, “Find all the rows that have been deleted,” it’s a lot easier when the table has an Id/Identity column. Let’s take the Stack Overflow Users table: It has Ids -1, 1, 2, 3, 4, 5 … but no 6 or 7. (Or 0.) If someone asks you to find all the Ids…
Read More

The SQL Server Posts You Read the Most in 2022

Company News
3 Comments
Here’s what I wrote in 2022 that gathered the most views: #10: Who’s Hiring in the Database Community? February 2022 Edition – I saw the success of Hacker News’ “Who’s Hiring” monthly posts, and I blatantly stole the idea for the Microsoft data platform community. It works out well, very popular, very popular. #9: PSPO:…
Read More

[Video] Office Hours: Holiday Speed Round

Videos
0
Beep beep! Here’s a speed round of Office Hours where I rip through a dozen questions in under ten minutes. Want to see your own questions answered? Post ’em and upvote the ones you like at https://pollgab.com/room/brento. 00:00 Start 00:22 DB-A-Team: Love and appreciate your work and please don’t make fun of my question. I…
Read More
Brent Ozar Webcast

[Video] Office Hours: Ham Pillow Edition

Videos
2 Comments
Y’all post questions at https://pollgab.com/room/brento and upvote the ones you’d like to see me discuss, and then I artfully dodge giving you answers. At least, that’s how it feels sometimes, hahaha: Here’s what we discussed in today’s episode: 00:00 Start 00:20 Piotr: Do many of your clients disable SA account for security? What are your…
Read More

Should You Use SQL Server 2022’s GREATEST and LEAST?

SQL Server
2 Comments
If you’ve been following along with this week’s posts on DATETRUNC and STRING_SPLIT, you’re probably going to think the answer is no, but bear with me. It’s Christmas week, right? The news can’t all be bad. GREATEST and LEAST are kinda like MAX and MIN, but instead of taking multiple rows as input, they take multiple columns.…
Read More