Tag Archives: T-SQL

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

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 Non-Unique Clustered Indexes Are Evil!

Non-Unique Clustered Indexes Are Evil And We Have The Proof. You won’t believe it when you see it. Face it – I can’t write click-bait… I was reading Grant Fritchey’s (Blog|@gfritchey) comments in the SQL Server Central forum thread “Advice … Continue reading

Posted in SQLServerPedia Syndication | Tagged , , | 2 Comments

Setting SQL Server Maximum Memory

One of the dafter defaults in SQL Server is the Maximum Server Memory (MB) – set to a value of 2147483647. Who has a server with 2PB RAM? Give me a call if you do – I want to have … Continue reading

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

T-SQL Tuesday #85 – Backup Compression

T-SQL Tuesday time again. First one I’ve taken part in for over a year – oops. This time, Kenneth Fisher (blog|@sqlstudent144) is hosting a blog party about backups. So here’s a quick post about Backup Compression. Backup Compression Told you. … Continue reading

Posted in SQLServerPedia Syndication, T-SQL Tuesday | Tagged , , | 2 Comments

Which databases were backed up in which backup task?

It’s a confusing question / title / headline. Let’s see if I can clarify what I’m after. For each scheduled backup job, which databases were backed up? And (more to the point) which databases weren’t backed up? And how can … Continue reading

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