Sql-Server

Category: sql-server

How to Script Out Indexes from SQL Server

How to Script Out Indexes from SQL Server

Sometimes you need to script out all the indexes in a database. Maybe you’re concerned something has changed since they were last checked in. Or maybe the indexes aren’t checked into source control, and you’re working on fixing that. (Important!)

Either way, sometimes you need to do it, and it’s not fun through the GUI. I needed to write some fresh demo code for this recently, and I needed it to give the details for partitioned tables using data compression, and I thought I’d share.

Continue reading

What is the Difference between a Junior and Senior DBA?

What is the Difference between a Junior and Senior DBA?

I got a great question from a student recently:

In your opinion, where is the distinction between Junior DBA and Senior DBA? I’ve always worked on small teams, so sometimes it’s hard to tell where I fit.

Continue reading

Change Management Template for SQL Server DBAs and Developers

Change Management Template for SQL Server DBAs and Developers

I learned to do Change Management from some really smart people. When I first became a DBA, I worked at a small software company where changes were released with increasing frequency over the years. Our team wasย really great at planning and deploying changes, because we constantly worked at improving.

Continue reading

3 Tricks with STATISTICS IO and STATISTICS TIME in SQL Server

3 Tricks with STATISTICS IO and STATISTICS TIME in SQL Server

When ย you need to measure how long a query takes and how many resources it uses, STATISTICS TIME and STATISTICS IO are great tools for interactive testing in SQL Server. I use these settings constantly when tuning indexes and query.

Continue reading

Incorrect Results: Why You Should Not Ignore Patches for SQL Server

Incorrect Results: Why You Should Not Ignore Patches for SQL Server

on February 22, 2016

Patching isn’t fun. It’s time consuming, thankless, and easy to break stuff.

But you can’t skip it.ย For critical systems, you need to subscribe to patch lists for SQL Server and review issues that are fixed regularly.

Continue reading

3 Things I Wish I Learned Earlier as a SQL Server DBA

3 Things I Wish I Learned Earlier as a SQL Server DBA

Hindsight is everything. I was lucky to be trained by a great team of DBAs back when I first started with SQL Server. But it’s hard to know exactly what you really need to know, particularly as new tools are becoming available.

Continue reading

Automating SQL Local Security Policy Rights: PoSH and NTRights

Automating SQL Local Security Policy Rights: PoSH and NTRights

There are a couple of local security policy rights that are not granted by default in SQL Server setup that I’ve been setting manually for a few years now:

Continue reading