I need NO LOCK in my CREATE View request

I am creating a view on MS SQL Server. I did not have much exposure to MS SQL, and I am not very familiar with the NO LOCK hint. I understand what he is doing, but I don’t know if I need to use it in my situation. I was asked if I should include it, and I do not know.

Do I need to add NO HINT after all the queries that I use to create my view? Or will it affect the user requesting the submission? Should the USER add NO LOCK to the request against VIEW?

Any recommendations on the best approach and any clarification are welcome!

+5
source share
2 answers

I will answer your question first.

NOLOCK , .

select * from vwTest with (nolock)

set transaction isolation level read uncommitted
select * from vwTest

, , , , SQL, . NOLOCK , , .

NOLOCK. , 100% , , , ETL . , , .

. , , .

, NOLOCK: , NOLOCK Timebomb - NOLOCK/READ UNCOMMITTED

+5

Doc:

: SQL Server , , .

NOLOCK, , . : , , .

+2

All Articles