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?

SQL Saturday Syracuse 2024 Recap

First Things First

Thanks to every who came to my session, Asnwering the Auditor’s Call with Automation. Slides and scripts are posted to my Github.

The Event!

This was Syracuse’s first SQL Saturday was held at the Onondaga County Public Library’s Central Library location, right downtown. This made it a bit of a “homecoming” for me. My first job out of college was across the street from this building and my colleagues and I used to eat lunch in the (no longer there) food court. I haven’t been to this part of downtown Syracuse since 2005, and downtown Syracuse at all since 2019. A lot has changed!

T-SQL Tuesday 177 - Managing Database Code

T-SQL Tuesday is a monthly blog party hosted by a different community member each month. This month, Mala Mahadevan (blog) asks how we manage our database-related code.

Where do you keep your database code? Is it in a GIT-based repo, or just in the database the old-fashioned way?

Read on for the rest of the invitation, where Mala expands upon the question (and there is a lot to dig into).

dbatools Required Filesystem Access for Database Restores

The Problem

While performing an instance migration this spring, I happened upon something I didn’t expect in dbatools. It should have been a simple backup/restore copy of the databases, with the backup files residing on a fileshare on the destination server after being copied there. I kept getting a warning that the backup files I was attempting to restore couldn’t be read, and the restores (via Restore-DbaDatabase) wouldn’t execute.

I checked permissions on the server over and over again. Both on the filesystem and for the share that I was attempting to read from. Even more curious, if I executed the restore database statements directly from within Management Studio, the databases restored without issue.

Regular Expressions to Generate Disable/Drop Index Scripts

Earlier this year, I embarked on a bit of a project to tidy up the indexes in a sizeable database. This database has over 900 tables, and there are quite a few indexes which I have long suspected don’t need to exist for a variety of reasons. Some indexes are redundant, others don’t get used, still others could be combined into a single index. By reducing the number of indexes, we can improve write performance in the database, and the size of the database itself. But we have to do it carefully.

Spring 2024 Speaking Engagements

I will be presenting Answering the Auditor’s Call with Automation at two upcoming events, one virtual and one in-person.

  1. DBA Fundamentals Virtual User Group Tuesday, April 9 2024 at Noon EDT
  2. Capital Area SQL Server User Group on Monday, May 13th at 5:30 PM.

As DBAs, we’re called on regularly to produce documentation for security & compliance audits. Being able to show who has what level of access to an instance is the minimum, but we’re often asked for more. Collecting this information and compiling it into something usable by auditors could take you hours or even days. But with automation, you can pull it all together in a matter of minutes while you’re getting that second cup of coffee from the kitchen.

T Sql Tuesday 170: Learning From Abandoned Projects

T-SQL Tuesday is a monthly blog party hosted by a different community member each month. I missed out on January 2024’s edition because I didn’t think I had anything good to talk about, but it suddenly hit me in February so…retroactive T-SQL Tuesday!

For January 2024, Reitse Eskens (blog | twitter) prompts us to talk about our learnings from abandoned or failed projects.

the main intent of this blog is to trigger your stories; what projects did you abandon but learn a lot from OR what’s your favourite learning from a failure.