Dynamic SQL with EXEC is not using NOLOCK
hi all,
we executing query dynamically using exec. in query have used nolock, but there no effect of nolock. there restriction in using nolock in dynamic sql exec.
will there positive result if use sp_executesql
please suggest
-- reddy balaji c. ##mark answer if solves issue
hi,
although it's recommanded use sp_executesql, nolock hint should work in dynamic sql in case, if use exec or sp_executesql.
see, if schema lock mentioned in below post reason,
- chintak (my blog)
SQL Server > Transact-SQL
Comments
Post a Comment