Note: I originally wrote this a few years ago but never posted it. It resurfaced when I migrated the blog so it’s being posted now.
After watching Kevin Kline’s (blog | twitter) webinar Essential Tasks to a Successful Cloud Migration, I downloaded the T-SQL scripts to run them against some of my databases. One of the included queries identifies tables with forwarded fetches and right on top of the list was a table with over 1.6 billion forwarded fetches in the roughly 3 weeks since the instance was last restarted.
Over the next couple days (weeks?), a significant change is coming to my blog (and if you’re reading this text, it’s already happened). I will be leaving Wordpress behind and my current hosting. Replacing it will be an all-new site hosted on Azure Static Sites, with the content written in Markdown and pages generated via the Hugo static site generator.
If you’d asked me 5 years ago if I would ever speak at Summit, I’d have said “no way, not possible.” I didn’t even think I was able to produce the kind of material that’s expected at an event on such a large scale. Not to mention having that many eyes on me.
But times change. Experience, skills, and knowledge change. People change. And sometimes, people get talked into doing things things by their friends.
Over the summer, I spent some (a lot of) time working on updates to a script at work which runs multiple processes in parallel. Everything seemed to work OK for a while, but then everything broke. It broke right around the time dbatools 1.1 dropped, so I started thinking that something must have changed there. As it turns out, it was entirely my fault and I hope this post will help you avoid the same trap.
Kind of a diversion into a Visual Studio Code/Azure Data Studio tip here (this works in both, as well as SQL Server Management Studio). I’m not a regular expression guru - far from it. I use them occasionally, but usually find myself fumbling around for a bit trying to figure out just the right expression to do what I need.
I’ve known for a while that VSCode/ADS had regular expression matching built into its find/replace feature, but did you know you can also replace with it? It can help remove the tedium of doing a large amount of text processing.