Home Forums SQL Server 2005 T-SQL (SS2K5) Reg: SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED RE: Reg: SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

  • For SQL Reports stored procedures you most definitely want to use "SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED".

    You only specify it once in the beginning of your stored procedure, as to having to specify with(NOLOCK) in every from clause in your stored procedure, a real time saver.

    -------------------------------------------------------------------------------

    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;

    SELECT

    firstname

    ,salary

    FROM dbo.employee e

    JOIN salary s

    ON s.employeeid = s.employeeid;The comparable method using hints would be:

    -------------------------------------------------------------------------------

    SELECT

    firstname

    ,salary

    FROM dbo.employee e WITH (nolock)

    JOIN salary s WITH (nolock)

    ON s.employeeid = s.employeeid;

    -------------------------------------------------------------------------------