T-SQL Tuesday #186 - Agent Job History Visualization
I’m hosting T-SQL Tuesday this month and our topic is Managing SQL Agent Jobs. In this post, we’ll be taking a look at a very handy combination of dbatools
functions for looking at agent job schedules & performance.
T-SQL Tuesday #186 Invitation - Managing Agent Jobs
Each month, a new topic is chosen, published on the first Tuesday of the month and the following month, contributors post their own takes. Anyone can participate. Please publish your post by the end of Tuesday, May 13th in your timezone and on your platform of choice, then leave a comment below or tag me on Bluesky, Mastodon, or LinkedIn with a link to your post and I’ll include it in the roundup.
Testing for End of Month in PowerShell
This is one of those blog posts you write so that 2 years later, you can look it up to remind yourself how to do something.
I found myself needing to figure out if “today” was the end of the month in PowerShell. In T-SQL, this is easy, as we have the EOMONTH()
function. But PowerShell (the .NET System.DateTime
struct) doesn’t have the same thing.
T-SQL Tuesday 185 - Produce a Video!
T-SQL Tuesday is a monthly blog party hosted by a different community member each month. This month, Erik Darling (blog) asks us to produce a video
- You can talk about whatever you want, but it has to be a video
- Non-video entries will not be televised
- You don’t have to be on camera
- You can host the video anywhere you want
- You must link back to this post so I get a pingback to find your post
- You must include the T-SQL Tuesday Logo
On the Internet, the Walls Have Ears
I received a sobering reminder this week of a lesson we all have learned or should have learned long ago. Something I said online came back around months later in a completely unexpected way.
That lesson? No matter how careful you think you are online, no matter how private you think an online place is, someone is watching.
A few weeks ago, I received an unsolicited email at work selling a software product. It was a pretty vague message, saying “hey, you should try our product to solve this problem.” Thought nothing of it, I get that sort of thing at work on occasion. I marked the email as spam and figured that was the end of it. A few hours later the same message arrived via LinkedIn from the same person. They really want to make a sale, I guess.
T-SQL Tuesday 184 - Mentorship
T-SQL Tuesday is a monthly blog party hosted by a different community member each month. This month, Deborah Melkin (blog) asks us to talk about our relationship with mentoring and sponsorship.
This can include:
- What does mentoring and sponsorship mean to you? What value do you see in mentoring and sponsoring?
- How have you benefited from mentorship and sponsors?
- What has worked for you in making these relationships successful?
- On the flip side, what obstacles have you had to work through?
- What do you do to sponsor others in the community?
- As March is Women’s Month, I’d also like to add: How are you mentoring and sponsoring women and other underrepresented groups in our community?
Read the rest of the invitation, where Deborah expands upon the question.
The Mysterious Empty Table
It seems like no matter how long you work with a system beyond a trivial size, you’ll find something new every so often. A little while ago, I found a table without about a dozen columns, no data, and was referenced in only one place across an entire database hosting nearly 1000 tables and over 8000 stored procedures. Why does this thing even exist?
To protect the innocent(ish?), obviously I’m changing the names of everything here. I was looking into some performance issues and found a very short stored procedure being called from another stored procedure which opened with this query:
|
|
Posting to Bluesky via PowerShell on macOS
The week of PASS Data Community Summit 2024 (November 4-8), Bluesky seemed to reach critical mass with the data community as well as the tech community writ large. Over the week, I saw a few posts (“skeets” I guess?) from Jeff Hicks saying that he was working on a PowerShell module for Bluesky. I said to myself “interesting, I’ll keep an eye on that.”
On the evening of November 11th, Jeff posted that he needed help troubleshooting an apparent issue on macOS.
SQL Query Stats via Powershell
Sometimes, work tasks and questions that come up in the SQL Server Community Slack coincide.
A couple weeks ago, DrData asked
With
SET STATISTICS IO ON
, is there really no way to show the TOTALS at the bottom? There are some nice tools like StatisticsParser but it sure would be nice to see the totals of all values right at the bottom, especially when there are many tables.
The task at hand in the office was a need to do the same thing, but with SET STATISTICS TIME ON
. So I got to thinking…I can PowerShell my way through this, right?