Category: Level

Utility function: dbo.JobName(@job_id)

As often as I have to pull a job’s name based on its job_id in the MSDB system tables, I’m truly stunned that I’ve never done this before: CREATE FUNCTION dbo.JobName ( @job_id UNIQUEIDENTIFIER ) /* A little utility function to return a job name based on the job_id. No warranty or guarantee implied. Use at […]

SSMS regular expressions: format text into a block

Sean’s RegEx for DBAs class must be finally sinking in for me. Today I was able to figure out a RegEx thing in SQL Server Management Studio. Here’s the problem: Sometimes I document an SP in MS Word, then copy-paste the paragraph into a comment block in the SP. Of course, when I do this, the paragraph is in […]

Powershell to Robocopy files (say, to back up your computer to protect against CryptoWall trojan)

We were having a good time on DBAs@Midnight, when Sean got a weird pop up message that said all his files were encrypted, and he has to pay a large amount of money via Bitcoin to get the encryption key. The show quickly ground to a halt as he, then he and Freddie, then all […]