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:

1
2
3
4
5
6
7
select
    MyShortString
    ,MyLongString
    ,ZipCode
    ,StateAbbr
into #TempTable
from SystemUtility;

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.