Posts by Erik Darling

SQL Server 2014 SP2: DBCC CLONEDATABASE

SQL Server
25 Comments
Getting developers production data stinks DBAs are stuck in this annoying cycle where they need to give developers production, or production-like data, but… Production data can be huge. Hundreds of gigabytes if you’re lucky, several terabytes if you’re not. Then once it gets there, you have other considerations. Either you lock down Dev, or you…
Read More

New Sample Databases From Microsoft

SQL Server
8 Comments
In celebration of AdventureWorks being out of business for a decade Microsoft has released a couple new databases. Wide World Importers is a fresh-faced start up, probably a drug smuggling front, run out of a basement office next to a temp agency. There’s some JSON involved. No one ordered bikes. It’s a hoot. The OLTP…
Read More

Last Day Shenanigans

SQL Server
15 Comments
To follow up on my NY Times Best Selling blog post On First Day Deal Breakers, here’s something you can do on your last day, as a friendly reminder that everyone is losing a valued team member. Change the color of everyone’s error messages. Dammit. “Change the font too.” –Brent Monstrous. Probably the meanest part…
Read More

SQL Interview Question: “How do you respond?”

SQL Server
38 Comments
Brent’s in class this week! So you get me instead. You can just pretend I’m Brent, or that you’re Brent, or that we’re both Brent, or even that we’re all just infinite recursive Brents within Brents. I don’t care. Here’s the setup A new developer has been troubleshooting a sometimes-slow stored procedure, and wants you…
Read More

Getting Started With Oracle Week: Aggregating

Oracle
11 Comments
I probably should have written this one first Most of these are exactly the same as in SQL Server. There are a whole bunch of interesting analytic functions, most of which should look pretty familiar to anyone who has spent time querying SQL Server. Most, if not all, can be extended to be window functions,…
Read More

Getting Started With Oracle Week: Joins

Oracle
4 Comments
Oh, THAT relational data Thankfully, most major platforms (mostly) follow the ANSI Standard when it comes to joins. However, not all things are created equal. Oracle didn’t have CROSS and OUTER APPLY until 12c, and I’d reckon they’re only implemented to make porting over from MS easier. It also introduced the LATERAL join at the…
Read More

Is your SAN’s cache killing tempdb?

SQL Server, Storage, TempDB
3 Comments
Let’s start with definitions Many SANs have caching built in. What kind of cache is important, because if you’re dealing with non-SSD storage underneath, you could be waiting for a really long time for it to respond. Let’s start with some definitions of the most popular caching mechanisms available for SANs. I’m not going to…
Read More