The NOLOCK or READ UNCOMMITTED stays in scope on a spid until an
operation that requires higher locking (like an update statement) is
called. So yes NOLOCK / READ UNCOMMITTED does work on views, etc but
will be ignored when higher degree of locking is required to meet the
ACID rules.
Dano Smith
-----Original Message-----
From: Carol Green
[mailto:mssqldba-ezmlmshield-x13484670.[Email address protected]
Sent: Friday, September 29, 2006 5:43 AM
To: LazyDBA Discussion
Subject: RE: today is my Friday but have great unknown unsearchable
question. . . . [bcc][faked-from]
Importance: Low
I'm not sure about whether setting the transaction isolation level will
apply to the view as well, but if not, you could use the NOLOCK
optimiser hint in the view to prevent locks.
-----Original Message-----
From: John A DAVIS
[mailto:mssqldba-ezmlmshield-x3227073.[Email address protected]
Sent: 29 September 2006 00:08
To: LazyDBA Discussion
Subject: today is my Friday but have great unknown unsearchable
question. . . .
We are running select queries on tons of Views for our Drinking Water
website with PHP pages. Now, I can put this: SET TRANSACTION ISOLATION
LEVEL READ UNCOMMITTED at the front of the SELECT * FROM vwYourViewHere
in PHP and everything runs and the idea is to not lock any tables.
. . . . . .but. . . . . does this work with Views? Don't the views lock
the table because they are farther down the food chain?
thank you
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
MS Sql Server LazyDBA home page