I am working on an application with a huge database with lots of tables having billions of rows. I have distributed development team sitting round the globe. They need to access the production database for various purposes. They have been granted Read Only Permissions to DB.
It works fine if you use queries with (nolock). But if you are not using nolock you can bring the whole application down by running some never ending query. It has happened a few times in last year so now I am hesitant to grant permission to new developers.
I know that creating a view with (nolock) for each table and granting permission to only those views is one solution but somehow I don't feel like creating 200 views for this purpose.
I am looking for a way to:
- Grant permission in a way that all the query run without lock for that user or
- Force user to use
with (nolock)
We are using SQL Server 2008 R2.
PS: I have never faced this problem till date with another Oracle based application, which is 50 times larger than this application.