• Michael_Garrison (5/30/2014)


    2. Yes, I know by now NOLOCK is bad. (I have seen all you guys say that, the top people in these forums, you know who you are.) But here we are forced to use it. I am told that without it, it caused many issues with our transactions tables. Our tables get updated 100's of times per hour. I know this is being deprecated. And I am not a database admin. So I am not sure what to tell management with this issue.

    It somewhat boils down to the reasoning behind why this hint has been mandated. If this is reporting and pinpoint accuracy is not important, then it possibly ok. I would prefer to move the data away from the OLTP database to a warehouse so you can do stuff with the data without impacting the production environment of the application. I would prefer to use read uncommitted instead of individual hints but the result is the same.

    If you are using NOLOCK in your production environment this is a much more serious issue. Making decisions for an application (especially if it involves finances or money) is a very bad place to implement NOLOCK. Worse yet is when management makes a blanket mandate that all queries use that hint. This is a VERY bad situation and one that needs to be addressed sooner rather than later.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/