What I’ve learned in my first 100 days with a consulting group

In case you don’t follow me on LinkedIn or Twitter, your humble host joined the smart folks at Straight Path Solutions in March. This is a talented group of SQL Server consultants founded by Mike Walsh and includes several former Microsoft MVPs, and I’m incredibly honored to be part of their team.

Especially since I didn’t have much experience as a consultant.

Maybe you don’t either, which is why I wrote this post. If you ever wanted to know how consulting is different than a typical job as a fulltime DBA, I’ve assembled this brief retrospective of things I’ve learned so far.

Let’s get to it then.

Continue reading

How can a table with 0 records use so much space?

Just like that puppy you got during the pandemic, your databases hunger for more. And they grow. And occasionally make a mess. I’ll stop the analogy.

Anyhow, it’s worthwhile to occasionally review the tables in a database to see which ones are growing every day, using the most space.

But what if during a review you see the largest table looks like this?

That’s around 24 GB of sweet drive space allocated for 0 records. But…how?

Let me show you how.

Continue reading

How to get Change Data Capture to work in an Availability Group

If you’ve ever had to implement Change Data Capture (CDC) for a database in an Availability Group, then you know that the CDC jobs don’t really consider the Availability Group. The capture and cleanup jobs created are set up as if the database exists only on a single instance.

And that’s a problem, because I would guess quite lot of databases are in Availability Groups. Maybe even some of yours. If you have this issue, I’ve put together a step-by-step solution in this post.

I know this post is a little long compared to others here, but I’ve tried to be thorough to save you headaches.

Continue reading

sp_GetRowcount: How to count the number of rows in any SQL Server table fast

Have you ever had to find the number of rows in a user table, and then wrote a little “SELECT COUNT(*) FROM tblWhatever” and hit execute…and waited…and waited…and waited some more? And then started wondering what was going on?

If so, this post is for you.

Let me explain the problem, and then give you a reusable solution. Consider this a turning point in your career.

Continue reading

#TSQL2sday – Preconceived Notions About Who Is Smart

For this month’s #TSQL2day, Andy Yun asked folks to share about “something you’ve learned, that subsequently changed your opinion/viewpoint/etc. on something.”

Now, there are technical subjects I could share where I’ve changed my opinion, but in thinking about possible answers I realized all of them start with one thing that has changed: who I thought was “smart”.

I put the word smart in quotes, because it’s a totally subjective and ever-changing opinion. Let me show you what I mean.

Continue reading

What permissions are required for temporary tables?

Managing permissions is a constant issue for Database Administrators, but rarely do DBAs consider permissions for tempdb. Everybody’s looking for something, but how often do you get requests for “access to read and write in the tempdb database”? Like…never?

OK, but what if you were asked the subject of this post in a job interview? Even if you’ve worked with SQL Server for ages, would you know how to answer this? Moreover, would you know why the answer should give you some concern?

Hold your head up, because I’ll start answering these questions now.

Continue reading

TempDB configuration for people in a hurry

If you’ve ever had to play administrator to a SQL Server instance, you’ve probably had to deal with TempDB data or log files that have grown unexpectedly. I know a lot of folks have had to do this, because the most read post on this site is “Help! My tempdb database won’t shrink!

Consider it a right of passage of sorts. Also, consider that it might be entirely avoidable. Let me show you.

Continue reading

A Biography Template for New Presenters

Presenting is difficult, and you already know that. It is also incredibly rewarding and beneficial to your career, but that’s not important for this post.

As difficult as it is to stand in front of a real or virtual room of folks and speak about a subject, there are several other difficult things about presenting that most of us don’t realize until we start preparing. There are technical concerns like trying to fiddle with Powerpoint or some other slide-related software or crafting demonstration code for scenarios.

There are also procedural concerns like figuring a title, an abstract/description of your session, and your biography. In fact, writing a simple biography can become one of the most frustrating and time-consuming parts of the entire process.

Let me help you with that.

Continue reading