SQL Query Stats via Powershell

Andy Levy
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.

SQL Saturday Syracuse 2024 Recap

Andy Levy
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.

dbatools Required Filesystem Access for Database Restores

Andy Levy
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.

Regular Expressions to Generate Disable/Drop Index Scripts

Andy Levy
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.

Spring 2024 Speaking Engagements

Andy Levy
I will be presenting Answering the Auditor’s Call with Automation at two upcoming events, one virtual and one in-person. DBA Fundamentals Virtual User Group Tuesday, April 9 2024 at Noon EDT 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.

T Sql Tuesday 170: Learning From Abandoned Projects

Andy Levy

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.

Just Buy the Keyboard

Andy Levy
The holidays have passed and it’s a new year. You probably have a gift card or two and haven’t decided how to use it yet. Allow me to help: Buy that fancy keyboard you’ve been coveting. Yes, the $100+ model. And get the good mouse/trackball while you’re at it. Just do it. If you’re reading this, you’re probably a “knowledge worker”, developer, data wrangler, or technical writer. You spend hours every day at your computer, hammering away at the keyboard.