Many years ago Jeff Moden (of SQL Server Central fame) came up with the concept of RBAR. Row-By-Agonizing-Row. At it’s most basic it means you are inserting one row at a time. A more broad interpretation says it’s any type of loop even the type caused by a recursive CTE. Read more
Possibly the single most influential event in my career happened over 25 years ago. I lost my temper at a client.
The client had requested a meeting. They had a new, complex, system they wanted implemented in the software we managed for them. The client was very very excited. I… Read more
Yep, that’s right, you heard me. Write-Only not Read-Only. I was presenting SQL Server Security Basics at NTSSUG the other night and there was an interesting discussion on the idea of granting someone write permissions without corresponding read permissions.
So for example:
-- Setup code CREATE LOGIN WriteOnlyUser WITH…
If you want to blog T-SQL Tuesday is a great way to get started. On the first Tuesday of each month (or possibly a bit earlier as in this case) someone presents a blogging idea. Everyone who wants to participate then comes up with something on that subject and posts… Read more
A DBA walked into a bar, saw a couple of tables, and asked “Can I JOIN you?”
I use impersonation on a regular basis for a number of different tasks. This one is pretty basic but can make a big difference in how you handle security. Let’s use a very basic task as an example.
A developer wants to be able to truncate a table.
This isn’t… Read more
I frequently need to know where backups went and I restore those backups for operational recovery on a regular basis. Would you believe in 20+ years as a DBA I can count the number of database restores for a disaster on my fingers? (Which is good because taking off your… Read more
Over the last four years I’ve blogged almost 400 times. It’s become a refuge, a resource, a source of pride, and a pleasure. I started out trying to build an on-line resume (just in case) and over time it’s evolved like crazy. I’ve become a huge proponent of blogging and… Read more
When restoring a database there are times when it would nice to restore a bit, check what’s been restored so far, restore a bit more etc. However, traditionally most people only know RECOVERY and NORECOVERY. This means that you restore to a point in time. Check the data and… Read more
Let’s say your company relies on the cloud for its servers (or maybe not, on premise networks have more options but they still have their limits). Performance is important so you’ve tuned every query, you’ve tested and adjusted each of the server settings. The cloud gives you limited control over… Read more
Fair warning, this is a discussion piece. I had a task, I went through several possibilities and I’m going to share each of them and the results of those I tried. I will not be giving any specific examples or code. Feel free to give me your opinion in the… Read more
It’s Chris Yates (b/t) birthday! (I think he just tured 19.) And in honor of his birthday we are writing blog posts! Well, technically it’s T-SQL Tuesday again, but we can pretend we are writing for Chris’ birthday. In fact that’s the subject he’s selected. “Give… Read more
I submitted two sessions. One I’d given before (including at Summit 2015), and… Read more
Foreign keys are a classic method of enforcing RI (Referential Integrity). Unfortunately though, they can get in the way if you have to reload data in a table. Lets say developers would like you to overwrite the data from several tables in the test environment with data from the… Read more
Like many other programming languages T-SQL uses parentheses () for a number of tasks. To help determine precedence, function calls etc. Now it’s nothing like LISP but with enough in one statement it can still get confusing at times.
Here is a fairly… Read more
This feature is Enterprise only which can limit who it is useful to, but I find the whole concept fascinating. In particular the way it works.
The cloud can be expensive. I had this hammered home the other day by a simple mistake. I’m currently working with Microsoft’s Azure platform and using one of the free credit options. I get a free $25 a month for a year and fortunately for me this put a… Read more
Help! I backed up my database yesterday and the backup file was about 200MB but today it’s closer to 400! What happened?
This month my friend Michael J Swart(b/t) would like us to talk about the new 2016 version of SQL Server. The feature I want to talk about has been around for a bit. Not because it’s not part of SQL 2016 but because it’s part of… Read more