Posts by Brent Ozar

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

Videos
4 Comments
Off the coast of Costa Rica, I went through your top-voted questions from https://pollgab.com/room/brento. Office Hours: Ask Me Anything in Costa RicaWatch this video on YouTube Here’s what we covered: 00:00 Start 00:30 gotqn: In SQL Database we have “sp_invoke_external_rest_endpoint”, but in SQL Server 2022 still have not. Is using SQL Server Machine Learning (sp_execute_external_script)…
Read More

This is the Last Week of Free PowerShell Training.

PowerShell
11 Comments
You’ve been working hard all month to get through our newest class, Fundamentals of PowerShell for DBAs. This week, it all starts to come together as you put together PowerShell plus SQL Server to automate tasks on a regular basis: March 27, Mon: Objects and Namespaces March 28, Tues: PowerShell and the SQL Server Agent March…
Read More

[Video] Office Hours in Cartagena, Colombia

Videos
1 Comment
Before heading out to Old Town for sightseeing, I went through your top-voted questions from https://pollgab.com/room/brento. Office Hours: Cartagena, ColombiaWatch this video on YouTube Here’s what we covered: 00:00 Start 00:44 Haydar: Is there a good way to suppress part of TSQL batch from showing the query plan in SSMS but having the rest of…
Read More

[Video] Office Hours at Sea: Heading to Jamaica

Videos
0
I’m on a boat! I’m on a 10-day Panama Canal cruise, and I stopped (well, not the boat) off the coast of Florida to answer questions y’all posted at https://pollgab.com/room/brento. Office Hours at Sea: Heading to JamaicaWatch this video on YouTube 00:00 Start 00:56 DBe: In several places I’ve worked, it’s been “policy” to automatically…
Read More

Can You Nest Transactions in SQL Server?

T-SQL
5 Comments
To find out, let’s set up a simple status log table: DROP TABLE IF EXISTS dbo.StatusLog; CREATE TABLE dbo.StatusLog (TimeItHappened DATETIME2 PRIMARY KEY CLUSTERED, Step VARCHAR(20)); GO 123456 DROP TABLE IF EXISTS dbo.StatusLog; CREATE TABLE dbo.StatusLog     (TimeItHappened DATETIME2 PRIMARY KEY CLUSTERED,     Step VARCHAR(20));GO And then let’s try a two-part transaction: BEGIN TRAN INSERT INTO dbo.StatusLog VALUES…
Read More
Brent Reading Book

Find 40 Problems in This Stored Procedure.

T-SQL
Aaron Bertrand posted a challenge: We’re going to use the AdventureWorks sample database (get your copy here), where the folks in marketing requested a list of users to e-mail a new promotional campaign. The customers need to meet at least one of the following criteria: last placed an order more than a year ago placed…
Read More

[Video] Office Hours Brought to You by Quest Software

Videos
2 Comments
Today’s episode of Office Hours is brought to you by Quest Software. I went through your top-voted questions from PollGab.com/room/brento, and, uh, kinda looked like I was sponsored by Fendi while doing it, hahaha: Office Hours Brought to You by Quest SoftwareWatch this video on YouTube Wow, those logos are bigger than I thought. Here’s…
Read More

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

Videos
0
Y’all post and upvote questions at https://pollgab.com/room/brento, and I stream sessions on my Twitch.tv channel where I answer ’em and chat with the audience. Office Hours: Ask Me Anything About SQL ServerWatch this video on YouTube 00:00 Start 02:09 Chad Baldwin: Hey Brent! “a friend told me” MSSQL will use an index’s stats to generate…
Read More

[Video] Office Hours: Quiet Sunday Edition

Videos
2 Comments
While waiting for the dry cleaner to open, I went live to stream a quiet session going through a bunch of y’all’s questions from https://pollgab.com/room/brento. Office Hours: Ask Me Anything About SQL ServerWatch this video on YouTube Here’s what we covered: 00:00 Start 01:45 Rollback is single threaded: Hi Brent! In microservices application architecture, Using…
Read More