• newbieuser (3/7/2013)


    Do you recommend using this statement for any specific type of DML's (insert,delete etc) in the procedure?

    For most DML operations it will be ignored since exclusive locks will always be required when modifying the data. Where you get into trouble is from doing INSERT...SELECT with a NOLOCK hint or READ_UNCOMMITTED iso level.

    I would suggest you read the article Gail posted and try pushing back on these changes, i.e. remove all instances from the code where the iso level is being set to READ_UNCOMMITTED and remove all NOLOCK hints. Instead, have them look into enabling READ_COMMITTED_SNAPSHOT mode at the database level.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato