SQL Insights

Provide SQL Reader Access with Caution

If you are not already doing so, always exercise caution when granting access to query a production database. There are a multitude of reasons to keep users out not the least reducing exposing sensitive data.

Following this advice is easier said than done. People often complain and insist they know how to write SQL, which may indeed be true. You might say, "Well, it’s just a single view; what harm can they do?" For starters, they could consume all the CPU, interfering with a database's primary objectives of collecting and storing data.

I've included an article about how a user could consume all the CPU with access to query a single view. Technically, you don't even need access to the view. Additionally, I listed a few ways to alleviate the threat when you can't simply say, "No access for you!"

Restrict User Query Access in SQL Server

perfmon