This week, Brent, Tara, and Richie discuss splitting large database files across multiple files, security auditing solutions, what Brent is currently teaching at the client location, SQL Server in containers, heap index maintenance, contained databases, extended events, the difference between a junior and Senior DBA, page file sizing, and more.
Here’s the video on YouTube:
You can register to attendnextweek’s Office Hours , or subscribe to our podcast to listen on the go.
If you prefer to listen to the audio:
![[Video] Office Hours 2018/10/10 (With Transcriptions)]()
Podcast: Play in new window | Download
Enjoy the Podcast?
Don’t miss an episode, subscribe via iTunes , Stitcher or RSS .
Leave us a review in iTunes
Office Hours Webcast 2016-10-10
Should I split up a 200GB database?
Brent Ozar: Paul says, “One of the databases that I monitor is 200GB in size, but it only has one file. Should I go ahead and split that up across multiple files?” Tara, you’re the DBA on the call.
Tara Kizer: You too. I mean, it’s fairly unnecessary unless you have special disks, you know, a special layout where you can add a file and some of your objects will be on that file. So if you have some faster disks and you want to move some of your heavily read tables, then move them over to another file, adding another file group. But size of database doesn’t really mean you have to have more than one data file.
How should I audit SQL Server?
Brent Ozar: Jason says, “Does anyone have any suggestions on a solution for security auditing for SQL Server? Should I use in-house or third-party options?”
Tara Kizer: I have no idea. I feel like the clients that have auditing, there’s performance issues.
Brent Ozar: Yeah, you really what I tell people is, do you have to defend yourself in front of a lawyer and a judge? Is this going to be something where you have to legally defend yourself in court? And if you do, then that kind of guides the solution that you’re going towards because you shouldn’t have something that a DBA can turn off, something that can lose events really easily. So this kind of rules out a lot of things that you would roll yourself because you would be a suspect. You have to be able to stand in court and say there wasn’t a problem. So if you have to be legally defensible, I’m a huge fan of third-party appliances like Imperva or Guardium. These are big expensive appliances that sit in between SQL Server and the rest of the network. And they log every network packet, they track who sees what, because it’s not just a matter of who does inserts, updates, and deletes. It’s a matter of who sees whose patient’s records, for example. And there is an overhead with that. it’s not usually huge, but those things are six figures a piece. Whereas when you go roll your own, there’s usually all kinds of overhead, even if you’re using SQL Server’s auditing. And it’s not going to be legally defensible in those cases. So that’s just the first place that I would start if you have to defend yourself in front of a court. If you don’t have to, if you don’t care about anything legally defensible, go but IDERA’s SQL Compliance Manager. And I’m not saying it’s not legally defensible, but I’m saying that it’s about a thousand, two thousand bucks, you install it and then it just logs to a file. Sure, you could get around it, but at least that way, you’ve checked the box and you can go on with your life.
What is Brent teaching today?
Brent Ozar: Let’s see, Michael says, “What am I teaching and doing today at the client location?” We just finished a parameter sniffing class and I don’t actually know what we’re talking about next. I have to go look at the it’s all database developers in the room today, so I’m doing a lot of T-SQL type stuff. So between Richie and I, Richie’s dancing and laughing, like yay for database developers. But Richie is also inheriting a hot mess of SQL that I have in our current production environment…
What did Brent break this weekend?
Richie Rump: Please tell them what happened this weekend, Brent. Please, share with the class what went on this weekend.
Brent Ozar: So I used queries behind PowerBI. I used PowerBI to build a little dashboard so for SQL ConstantCare I can tell people, here’s the problem you’re having, here’s the issues behind it…
Richie Rump: And it’s great. And it’s great…
Brent Ozar: Well, no. Richie’s been hearing me complain about PowerBI. It’s the only thing we have it’s pretty cool. It’s gorgeous. It helps me get to answers quickly. But it all depends on the quality of my queries. My queries are not very good and I was pointing at a specific replica rather than pointing at a generic reader name, like an AG listener. So when we were running both production and my PowerBI queries on the same replica, I may have caused our production servers to failover multiple times. I’m trying to troubleshoot why the server’s having problems and then I’m like, oh, it turns out…
Richie Rump: Yeah, you know, because of the way we’ve architected it, it was really easy for us to recover those files and then push them out into nobody lost any data. Nobody didn’t get their messages, and that’s the great part about working in the cloud and in this type of environment; hey, something fails, we just push it right back through and, hey, it goes and it finishes. That has been a lot of fun. It’s like, oh, failed? Oh, no problem, just push it right back through.
Have you worked with SQL Server in containers?
Brent Ozar: Andy Leonard asks a serious question. He says, “Have y’all played with SQL Server in containers?” And we laugh, but oh man. The serious answer is no, we no, that’s not true. I did play with them, I just stopped.
Richie Rump: I mean, is Aurora running on container? I would assume that it is, so technically yes.
Brent Ozar: Well, it’s not SQL Server though, but…
Richie Rump: It’s not SQL Server.
Brent Ozar: It doesn’t solve a problem for us. I get that somewhere somebody has a problem that containers solve, I just haven’t seen it yet. That’s not true; continuous integration, continuous deployment, that totally makes sense, I get it. But for the rest of people, for production SQL Servers, I haven’t seen the problem that it solves yet that people went, oh, we could put this in a container and it’s cool now, let’s do it. I haven’t seen that. And we work mostly on production servers, so…
Richie Rump: Okay … and let’s qualify that. For continuous integration, yes. Continuous deployment, I’m not sure. I don’t think so because continuous deployment, what are we going to do, deploy to database again? And what happens to the data that’s currently in production? So yes, continuous integration where I need to restore to a state and all I h