Holiday prices end in 25d 16h 30m — See the sale

Author: Tara Kizer

When I’m not working on databases, I am spending time with my husband Michael and two kids Andrew and Madelyn in San Diego. If I’m not with family, I’m hiking somewhere in Southern California. Sometimes if I’m lucky, the family comes hiking with me. I also like to camp and run. I love the outdoors.
Performance Tuning

Using Trace Flag 2453 to Improve Table Variable Performance

I recently saw a server with trace flag 2453 configured. I hadn't come across this trace flag before, so I did a little research. Microsoft says it allows "a table variable to trigger recompile when enough number of rows are changed". This can lead to a more efficient execution plan. Trace flag 2453 is available in SP2 or greater for SQL Server 2012, CU3 or greater for SQL Server 2014 and RTM or greater for SQL Server 2016.

Read more about Using Trace Flag 2453 to Improve Table Variable Performance 18 comments — Join the discussion

Asynchronous Database Mirroring vs. Asynchronous Availability Groups

When Database Mirroring came out in SQL Server 2005 Service Pack 1, we quickly dropped Log Shipping as our Disaster Recovery solution. Log Shipping is a good feature, but I can failover with Asynchronous Database Mirroring faster than I can with Log Shipping.

When Always On Availability Groups (AG) came out in SQL Server 2012, we were excited to get rid of Transactional Replication, Failover Clustering and Database Mirroring. It solved our reporting needs (your mileage may vary), our High Availability needs and our Disaster Recovery needs.

Read more about Asynchronous Database Mirroring vs. Asynchronous Availability Groups 19 comments — Join the discussion

Logging Activity Using sp_WhoIsActive – Take 2

We've already covered how to log activity using sp_WhoIsActive, but I wanted to share how I've seen it done in the wild. The difference between the two methods is that this version logs everything to the same table and is for continuous activity logging (scheduled job), whereas the other version uses a new table each time it logs activity and is for when you are working on a problem.

Read more about Logging Activity Using sp_WhoIsActive – Take 2 47 comments — Join the discussion
T-SQL & Development

What TRY/CATCH Doesn’t Handle

We were once asked in class what TRY/CATCH doesn't handle besides object existence errors.

It's well documented in Books Online (BOL). If you're like me, then tl;dr. Are we even calling it Books Online these days? I still say "bookmark lookup" instead of "key lookup". I suppose I'll be saying Books Online for quite some time too. At least these days it really is online.

Read more about What TRY/CATCH Doesn’t Handle 25 comments — Join the discussion
Performance Tuning

When Shrinking Tempdb Just Won’t Shrink

I am not a proponent of shrinking databases, but sometimes you have to because your momma said to. Sometimes that database is tempdb.

It used to be that we were warned against shrinking tempdb because it could cause corruption, so your only recourse was to restart the SQL Server service. Paul Randal let us know that this is no longer a problem.

Read more about When Shrinking Tempdb Just Won’t Shrink 71 comments — Join the discussion