Author Archives: thomasrushton

OBJECT_ID()’s second parameter

I received a supplier-supplied maintenance / check / troubleshooting script that did a whole heap of looking-to see-if-a-default-value-exists-and-if-it-doesn’t-then=create-it type stuff. As you would expect, it’s a load of They could have saved themselves a bit of typing (or, let’s be … Continue reading

Posted in SQLServerPedia Syndication | Tagged | Leave a comment

SQL Server Availability Groups and SQL Server Reporting Services – A Brief Rant Triggered By Someone Failing Something Over Without Understanding The Full Implications, Or, Pay Attention To Your DBA Because He Knows This Stuff And That’s What You Pay Him For

Is the headline longer than the body? Not now I’ve included the fix for this situation as well as the initial rant. Maybe next time. Yes, you may have an availability group – well done – and you may have … Continue reading

Posted in SQLServerPedia Syndication | Tagged , , | 3 Comments

SQL Server Error 18456 Severity: 14 State: 73

A question asked on one of the forums today wasn’t easily answerable by Googling. Summary of the question “I have error 18456 State 73 – why?” Google seemed remarkably quiet on the subject of that particular state code. Even Aaron … Continue reading

Posted in SQLServerPedia Syndication | Tagged , , | 1 Comment

Longrunning Query – xp_cmdshell?

Flicking through the ol’ Solarwinds activity monitor, I spotted this one day: That four day purple thing on the right? Not good. (The remaining images are from a reconstruction, partly to protect the not-so-innocent, and partly because the first job … Continue reading

Posted in SQLServerPedia Syndication | Tagged , , , , , | 1 Comment

A Problem with Boolean Logic

Your requirement: to find the things where either A or B is true and C is true. Your first draft might be this: (field, table, function, logic all anonymised to protect the perpetrator) What’s the problem? Operator Precedence, that’s the … Continue reading

Posted in SQLServerPedia Syndication | Tagged , , , , | 2 Comments

T-SQL Tuesday – Bad Habits – Fixed by SQLPrompt

T-SQL Tuesday again. And it’s been a few months since I last blogged, let alone for this blog-party, but, hey, I’m here now. This time, Aaron Bertrand (blog|@aaronbertrand) has given two options – and, given the amount time I’ve been … Continue reading

Posted in T-SQL Tuesday | Tagged , , , | Leave a comment

SQL Server Installation Failed Due to Pending Restart of Server?

Incidentally, the sort of problem I’m discussing here is why I (almost) always copy the patch/servicepack/media to somewhere local – each time you run a servicepack or cumulative update, the whole package decompresses to your hard drive, runs, and then … Continue reading

Posted in SQLServerPedia Syndication | Tagged , , , | Leave a comment