SQL Server

Error 2571 - no permission to run DBCC TRACEON

What Permissions does QUERYTRACEON Need?

SQL Server
9 Comments
The QUERYTRACEON hint can be particularly useful for testing the new cardinality estimator in SQL Server 2014 on individual queries using Trace Flag 2312, if your database is still using compatibility level 110: Transact-SQL SELECT ClosedDate, Id FROM dbo.Posts WHERE LastActivityDate > '2013-09-05 11:57:38.690' OPTION (QUERYTRACEON 2312); GO 12345 SELECT ClosedDate, IdFROM dbo.PostsWHERE LastActivityDate > '2013-09-05…
Read More

Features SQL Server Needs to Add (And Drop)

SQL Server
30 Comments
When you work with the same database server day in and day out, you can get a bit blinded by your assumptions. You might just assume that the way SQL Server does it is how every database does it. But check out these features from other database platforms: Cache query results – SQL Server only caches…
Read More

How to Set Up Standard Edition Always On Availability Groups in SQL Server 2016

SQL Server 2016 adds Availability Groups in Standard Edition. While the licensing details can obviously change right up to release date, here’s what was announced at the Ignite conference: Limited to two nodes only (a primary and a secondary) Like mirroring, you can’t read from the secondary, nor take backups of it But like database…
Read More

Not Everything Should be Automated

SQL Server
22 Comments
How did I ever get this to work???? Some people hate repetition. They want to avoid manual tasks at all costs. I used to be part of the cult of automation. I thought that everything should be made efficient. Why should I do something twice, if I can figure out how to do it once and…
Read More

Join Us at SQLSaturday Pittsburgh for a Pre-Con

SQL Server
0
Brent & Jeremiah are coming to Pittsburgh on October 2-3, 2015. We’re doing a one-day pre-con, and then sticking around to present at SQLSaturday Pittsburgh too. Developer’s Guide to SQL Server Performance – Live! Developer’s Guide to SQL Server Performance – Live at PASS Summit 2013 You’re stuck with a database server that’s not going…
Read More

Announcing SQLServerUpdates.com

SQL Server
55 Comments
After the SQL 2014 SP1 mess, I thought, “How are people with a real job supposed to keep up with updates?” Go try to find the most recent SQL Server service packs and cumulative updates on Microsoft.com. It’s miserable – they’re scattered all over the place. Eventually, a lot of us started relying on SQLServerBuilds.blogspot.com,…
Read More

Finches and Job Roles

SQL Server
14 Comments
Developers – how much operations work are you doing? DBAs – how much development do you do? The Separation of Duties For most of us, we stick to our assigned job role. Developers write code and then throw it over the wall for the ops team to put in place. If there’s a problem, there…
Read More

Watch Brent Tune Servers [Video] #MSIgnite

SQL Server, Videos
11 Comments
Last week at Microsoft Ignite 2015 in Chicago, I demonstrated how to tune a few SQL Server workloads with my favorite process: Measure how fast the SQL Server is going Check its bottlenecks Apply some easy-to-tweak configuration settings and measure the difference There’s no camera in this hour-long video, just a screen capture, so you’ll have…
Read More

#MSIgnite SQL Server Unplugged Q&A Summary

SQL Server
0
This afternoon, we had one of my favorite sessions: the off-the-cuff Q&A with some of Microsoft’s best and brightest. I probably missed somebody, but for sure we had Conor Cunningham, Joe Yong, Jos de Bruijn, Kevin Farlee, Luis Carlos Varga Herring, Mike Weiner, Sunil Agarwal, and Tiffany Wissner. Hubba hubba. SQL Server Unplugged These sessions are fun to…
Read More

Forcing Join Order Without Hints

SQL Server
18 Comments
Brent buys lunch for the ladies The purpose of this post is to show a bit of syntax that often gets overlooked in favor of using query hints to force joins to occur in a particular order. We’ll start by creating three tables. One for employees, one for orders, and one for items in the…
Read More

SQL Server Version Detection

SQL Server
22 Comments
Every now and then, you need to figure out which version of SQL Server you’re using without knowing in advance. This might happen in a script (like sp_BlitzCache) or you might be using it in a migration. Getting the SQL Server Version with @@VERSION THe first thing that comes to mind is @@VERSION. On my…
Read More