Author Archives: thomasrushton

T-SQL Tuesday #170 – Abandoned Projects

New year, new blogging regime? No. I just saw Deborah Melkin’s T-SQL Tuesday post, and had to participate… T-SQL Tuesday, second Tuesday of every month, click the image above for a link to the archive. This month – Reitse Eskens is inviting … Continue reading

Posted in T-SQL Tuesday, Uncategorized | Tagged , | 1 Comment

Why I’m Not Attending SQLBits 2024

OK, so I’m jumping on the Steve Jones / Brent Ozar bandwagon of explaining why I’m not attending SQLBits this year… Why am I not going? Covid. No, not because I’ve got Covid, or I’m going to have Covid, or am … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Death of a Community, or RIP AskSSC

Ask SQLServerCentral is closing down on 11th December, for Reasons. When I started out as a full-time DBA back in 2010, it was the first Q&A site I found that was active, friendly, and easy to use. It differs from … Continue reading

Posted in Uncategorized | Tagged | 3 Comments

Well This Is Different, or “You did *what*?”

Relax, nobody dropped the production database… July 2021 There I was, coming to the end of my contract with the data science team at NHS Digital, working on shutting down their mahoosive SQL Server, and beginning to think about looking … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

Capturing Extended Properties on Drop Table

TL;DR – Nope. Extended Properties Custom extended properties can be a useful tool when creating a self-documenting database. However, in an environment where tables are routinely dropped and recreated by software/systems not within your control, it may be desirable to … Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments

Shooting Yourself In The Foot While Testing Triggers, or The Importance of GO

No, not “Go” the game… I was working on some functionality for a create table trigger. I had the whole creation / testing thing wrapped up in a single script for easy testing and possible deployment across multiple databases: All … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

Advent of Code and BULK INSERT problems

Have I said how much I hate the new WordPress “add post” page? No? Well, I do. Particularly when editing an earlier post… Anyway. Where were we? Oh yes. Advent Of Code. For those of you who don’t know, it’s … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

CmdExec vs Powershell – error? What error?

Just a quickie Batch file scripts, called by SQL Agent, are not propagating their errors back up to the SQL Server job system because…. they’re being called from a Powershell script? To replicate the problem, create a .bat file containing … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Testing SQL Agent Job Step Output During The Job

(This follows on from my previous script about emailing SQL Job ouput.) There are times when a SQL server scheduled task needs to look at the output from the previous step, and make decisions based on that – particularly when … Continue reading

Posted in Uncategorized | Tagged , , , | 1 Comment

SQL Server Agent Job output to email

I came across a need for SQL Server Agent job output to be emailed out to the developer who created the code that the job was running. For various reasons, they don’t necessarily have access to the SQL Server itself … Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments