Confessions of a carbaholic: When I start thinking about `ROLLBACK`, I start thinking about rolls. Have you ever forgot to commit a transaction? Maybe you’ve even left for lunch and caused a problem while you were gone. Uncommitted transactions can cause all …
Who's at the front of the line blocking all the traffic? During the course of normal processing in a database, blocking happens. Blocking is “by design” because your database is on ACID. In an OLTP database, most of your transactions are short in duration, so …
If you’re familiar with supporting the database behind Microsoft Dynamics CRM, you probably know that it’s not the fastest-performing database. Honestly, that shouldn’t be a surprise–it’s not designed to be a screaming-fast database. It’s designed to be a …
I loved playing Number Munchers on my Apple IIc This morning, when I logged into Twitter, the tweet at the top of my timeline was from Shane O’Neill (blog|twitter). It was to his blog post, Shane, What’s wrong with DELETE EXISTS?. It’s not that unusual that …
Question I'm building a stored proc that can take in two separate values that each can be used to identify a single record. One of these values may be null.
My logic is as follows: if IN_ORDER_ID is not NULL, save it to V_ORDER_ID. If it is NULL, then …
Shortcuts & tips from an Impatient DBA This series of short posts will demonstrate some lesser-known features, keyboard shortcuts, and other tips that make my day as a DBA more productive. None of these are groundbreaking super-secret features–they are the …
I pity the fool who needs to shrink his database! It’s a really common question: “How do I shrink my database?” Luckily, there’s also a really common answer: “Don’t.”
…but what if you really have to? Perhaps you just implemented data compression, and have 60% …
Someone posted to #sqlhelp on Twitter, asking the following: “Wondered if anyone could enlighten me as to why ISNUMERIC(‘7d8’) returns 1?”
Sure enough, SELECT ISNUMERIC('7d8') returns a 1.
WTF? d isn’t numeric! OK, sure, if you say “seven-dee-eight” out loud …
If you’ve ever looked at sys.sysprocesses or sys.dm_exec_requests (or a number of other DMVs), you’ve noticed there is a column called “sql_handle” that contains some binary gobbledygook. Books Online gives the (un)helpful definition as “Hash map of the SQL …
This is a pretty common problem. I think it’s a question every developer has asked at one time or another: “I want to pass in a comma-separated list of values, then convert it into a table."
Every company I’ve ever worked for has had a function that does this. …