Tuesday, May 2, 2023

Monitoring Deadlocks in Azure SQL Managed Instance

 Hello Dear Reader!  My lastest blog on our Azure FastTrack blog for Microsoft is live, Monitoring Deadlocks in Azure SQL Managed Instance. 

Here's a little from the blog:

To paraphrase Annie, Deadlocks ARE JUST AWFUL!  When they occur, it means one transaction was the victim and rolled back, the other succeeded.  You have a couple different ways to monitor them in Azure SQL Managed Instance.  Let's review those together. 

 

What is a deadlock?  To quote our MS Learn Documentation, "Deadlocks occur when two or more processes or transactions block each other from continuing because each has locked a database resource that the other transaction needs".  

In layman's terms a deadlock occurs when two queries are blocking one another and neither could ever complete its transaction.  Pretend two people need to use the same door.  They cannot fit through at the same time.  One must stop and let the other proceeded first.  Now add on top of that they both reached for the door knob and grabbed it at the same time, both pulling the door in an opposite direction.   

 

Instead of simply waiting, one must let go of the door knob.  In this case the door knob is a table, the hands reaching out are attempting to gain a lock.   In SQL Server, all versions of the database engine, this is accomplished by the Lock Manager it uses a process called FIFO, first in first out, to determine who has to let go.

 

In the case of SQL one transaction is a deadlock victim, it is killed and the transaction is rolled back.  So if this is occurring on your system fixing it is very important.  First you have to find out if they are occurring, and that's what we will cover in this blog post today!


To read the rest here is the link: Monitoring Deadlocks in Azure SQL Managed Instance


As always Dear Reader, Thank You for stopping by.


Thanks,


Brad




Monday, May 1, 2023

Tales From The Field Weekly Wrap Up for the Week of 04-24-2023 Steve Martin, Martin Short, & Tacos

 Hello Dear Reader!  I've realized something writting this blog.  I don't like to sit still.  It is very rare that I have a down weekend, and this weekend was no different.  My amazing wife did something really cool for me for Christmas.

You see I'm hard to shop for, or at least that's what I've been told.  I don't mean to be, but I am.  My birthday is in January.  When I was a kid you got presents on your bithrday and on Christmas.  Even though they are in different years, mine are so close together that for 10 months of the year there is nadda, then 2 months PRESENTS!

So with that in mind, if I want something I tend to buy it.  At this point in my adult life I'm just used to
that.  So Sue came up with something cool.  I love giving people experiences be it with food, giving advice or tips on Orlando, Disney, or Universal Studios or even when peoplke come over playing bartender, setting up events with friends (see last week).

Sue got me experiences, and what a time we've had.  That included this Saturday seeing Steve Martin & Martin Short live.  I was laughing so hard throughout the event, but it wasn't just comedy.  They are story tellers, showmen, and presetors. I couldn't help of people I know like Buck Woody (@Twitter | @BuckWoodyMSFT ), Patrick LeBlanc (Twitter | @PatrickDBA), or so many other amazing people in our community.  

The timing and the comfort of doing a show with someone you know well.  That made me think of Josh Ludeman (Twitter | @JoshLuedeman).  There is no one in this world that I've presented with as much as
Josh.  As I enjoyed the banter back and forth you could see the comfort that comes from time and practice.

It was a great time and a great day.  On Sunday we had that unusual down day.  I did some work in the office, getting ready for our soon to be move, and when it came to dinner I wanted out of the house. I snapped a picture while we were out at bartaco.  It has be come more and more rare to have all five of us at dinner together.  Looking at the picture afterwards I realized something importiant.  Serenity is now at the teenage point of making goofy faces in every family photo.

....it'll be a long two years, but I have plenty of her brother's from that period in time.  As the youngest this is the last time I'll have to go through this.  That acknowledgement came with a bittersweet feeling.

All right enough about the weekend, let's get to the round up!


MONDAY 4-24-2023

On Monday Daniel Taylor (Twitter | @DBABulldog) dropped his first video on the channel.  Congratulations Dan!  He had a really great point of view, working with a customer he needed to solve the problem of teaching them how to backup SQL Server via URL.  The twist is the DBA's do not have rights to get SAS tokens, and so he had to teach the Azure Admins how to do that portion. 


 Dan walks through both tasks in this video to break down Backup to URL Seperation of duties.

WEDNESDAY 4-26-2023

On Wednesday I went in a different direction.  I had read a blog recently on how to pass a data frame to an Azure OpenAI model so you could ask questions about the data frame.  We had featured it in our Azure Data Community Round Table two weeks ago.  The blog was Make data more human with Azure OpenAI and Azure SQL by Valentina Alto (Twitter | @AltoValentina)


In this video Use OpenAI, SQL Managed Instance, Python, and VSCode to UNLOCK INSIGHTS About YOUR Data!!!, I walked through how to make this work using a data fram from a Domestic Box Office movie data table I had in a database. This was a lot of fun to walk through and the reception to this video has been really nice.


TUESDAY 4-252023

Of courese on Tuesday we had our Azure Data Community Round Table where we feature your content and it is always the star of the show. 


Here is the content coverd on the show in order of appearance:


Dan

One Way to Provision an Azure Key Vault by Andy Leonard Twitter @AndyLeonard

Bradley

Moving the SSISDB Catalog on a new SQL Server instance by Rajendra Gupta via SQLShack Twitter    @rajendragupta16 via @SQLShack

Andres

Analysing Data with ChatGPT (Data Analysis and ML )  by Jesiel (JCharis) Emmanuel Agbemabiase  Twitter @JCharisTech

Josh

Use ChatGPT to see multiple perspectives. An example: ORMs and database code  by Kendra Little  Twitter @Kendra_Little

Dan

Troubleshooting Azure Data Studio by Deborah Melkin Twitter @dgmelkin

Andres

MLOps on Databricks: A How-To Guide  by Rafi Kurlansik Twitter @kurlare

Bradley

Data API builder – Introduction by Davide Mauri Twitter  @mauridb

Josh

How to use the new dynamic format strings for measures in Power BI  by Meagan Longoria Twitter @MMarie

Dan

PostgreSQL for the SQL Server DBA: The First Four Settings to Check  by Ryan Booz Twitter @ryanbooz

Bradley

ChatGPT blew my mind with this Power BI scenario by Adam Saxton via Guy in a Cube Twitter  @awsaxton & @patrickdba via @GuyinaCube w @StephTBruno @shan_gsd

Call back to Power BI datasets CI/CD (the easy-ish way)  by @StephTBruno & @shan_gsd

Andres

AutoML Comparison in Databricks VS Azure Machine Learning by Mohammadsaleh Gharehdaghi Twitter @MG_cafe01

Josh

The Top 10 Features of PostgreSQL Every Developer Should Know by Ajay Patel Twitter @Bond_AJ


WRAP IT UP

Ok Dear Reader!  We have a BIG BIG WEEK!  Not only do we have a video by Josh Luedeman this Monday on how to Set up Windows with Chocolatey for Data Developers in SECONDS!! GIT, WSL 2, PowerShell! and another video by yours truly coming up on Wednesday, but this week is SQL SATURDAY JACKSONVILLE!!

On Friday Neeraj Jhaveri, Daniel Taylor, and myself will be teaching our DBA 101: A Full Day of Fundamentals, but Andres Padilla & Josh Luedeman will be presenting at the event as well.  The whole Tales from the Field crew is together live for the first time at a conference.

This is going to be a lot of fun.  We have 8 sessions on the agenda so come and attend, have a conversation with us, or grab a sticker while we have them!

We hope to see you in Jacksonville, but more than anything Dear Reader thank you for stopping by!

Thansk,


Brad




Monday, April 24, 2023

Tales From The Field Weekly Wrap Up for the Week of 04-17-2023 Jorge, Wrexham AFC, & Guys Night Out

 Hello Dear Reader!  This past week was one I had been looking forward to for quite some time.  A couple of months ago I had started reaching out to my other guy friends.  We all  have busy lives, but we need to take time to spend with one another outside of dinner's with spouses, game nights, or Marvel movies.

Not that those things aren't great, but something that allowed us to just relax.  

Let me back up a bit, I love the podcast The Armchair Expert with Dax Sheppard.  On it they refrenced a study that lead me to this article on How loneliness is killing men.  Which shocked me.

I have this really cool Uncle we all idolized.  He was always taking trips to go golfing, hunting, or fishing with his buddies.  Growing up I thought that was really amazing.  As I got older and had kids, amazing turned into questions.  

How did he find the time to do this?  Shouldn't he be spending this time with his family and kids?  He was a really great Dad and family man, was his life out of balance or did these things matter?


I should have picked up the phone and called him.  I should have asked.  But I never have.  Then my kids got older, and getting their attention and even time with them became more and more scarce.

This lead to another realization.  My buddy Jorge Segarra (Twitter | @SQLChicken) and I were talking.  Jorge is doing the beautiful work of being a stay at home Dad and taking care of his kids.  We were having a great conversation, he was picking up kids from school, they got in the car like a chaos bomb and he said, "I should probably let you go this is going to be too noisy for you".

"I'm good", I replied and we kept the call going.  I've been a single Dad, a divorced single Dad, and a very lucky married man with a great partner.  The chaos of the call reminded me of picking my kids up from school about a decade ago.  We also realized that not many men could talk about some of the issues I faced and he was facing.  We also talked about how men don't talk about these things.  I brought up the podcast and the article.

We talked about the need of having time to go out with friends, re-engergize, and come back in a better head space to be father's and husbands.  For the first time, I understood my Uncle.

That was January.  We started planning.  We would talk more regularly, it had been months since our last phone call.  That needed to change. 

We found a weekend that worked, it took a while.  We set the date.  There were other gentlemen invited who could not make it, but hopefully next time.  It was this past Saturday.  Jorge, Daniel Taylor (Twitter | @DBABulldog), Josh Luedeman (Twitter | @JoshLuedeman), and myself planned a day.

It involved a spa visit for Jorge and myself, a cabbana by the pool for all of us to relax, a nice steak dinner, and watching John Wick 4.  Along the way we listened to Wrexham AFC win PROMOTION and toasted them from afar!!!

The day was perfect and we are all looking forward to the next time.  Long way of saying this, but if you are reading this think of your friends and reach out to them.  It is litterally the best thing you can do for your health.... and theirs.

All right, on to the recap!

MONDAY  4-17-2023

On Monday Neeraj Jhaveri (Twitter | @Neeraj_Jhaveri) and Andres Padilla (Twitter | @nodestreamio) delivered a video on Azure Cost Management!  They have a discussion about different options to save money on a subscription.


They also show you how to use the Azure Price Calculator, Cost management and billing in the Azure Portal, how to set a budget, and how to set cost alearts!  Great stuff!


WEDNESDAY 4-19-2023

On Wednesday my video on Azure SQL Space Management for Azure SQL Database came online.  

This was a really fun video to make based off of a customer conversation and our amazing documentation on the subject.

TUESDAY 4-18-2023

The highlight of the week is always the Azure Data Community Round Table.  Josh, Neeraj, Andres, and myself kicked off a review of those articles that we found to be super helpful from the last week.


Here is the star of the show, the content in the order of appearence on the show:


Neeraj

The Power of AI for Medical Imaging: 5 Key Applications & Use Cases by Katarzyna Rojewska Twitter @k_rojewska, @DLabsAI

Bradley

Make data more human with Azure OpenAI and Azure SQL by Valentina Alto Twitter   @AltoValentina

Andres

Integrating Azure OpenAI and Azure Speech Services to Create a Voice-Enabled Chatbot with Python  by Jiadong Chen Twitter @chen_jd

Josh

Back home, but still a long way to go by Hugo Kornelis Twitter @hugo_kornelis

Neeraj

How does AI actually work? by Kristina Bravo Twitter @BravoKristina 

Bradley

T-SQL STUFF – Taking it to the limit by  John McCormack Twitter @actualjohn


Andres

Using  MLFlow Recipes to refactor messy notebooks by Jeanne Choo  


Josh

Master Databricks and Apache Spark Step by Step Video Series by Bryan Cafferky Twitter @BryanCafferky

Neeraj

Can Data and Analytics Help Save the World? by Troy Hiltbrand Twitter @trohil

Bradley

Using SQL Alerts to Spot Suspicious Activity in SQL by David Fowler via SQL Server Central Twitter @SQL_Undercover  @SQLServerCentrl


Andres

Next-Generation Computer Vision Capabilities with Project Florence by Adina Trufinescu Twitter @abiramivina


Josh

Citus Con Reminder (Keynote was at 12-330 ET/9-1230 PT, EMEA tomorrow 9-1230 CEST) by Citus Con Twitter @CitusCon



WRAP IT UP

We've got another great week planned for you, and we hope you can make the time to join us.  On Monday Daniel Taylor is dropping his first ever MS Tech Bits on how seperation of duties requires Azure Administrators and DBA's to work together in order to backup to utilize backup to URL.

On Tuesday at 1 pm EST we have our Azure Data Community Round Table and on Wednesday I will be droping a video utilizing Azure Open AI to read and collect insights on my Azure SQL Data.

Take care of yourself Dear Reader, and as always Thank You for stopping by.

Thanks,


Brad