Does anyone know if when you select from a view its a "dirty read" by default? And if not, is there something that someone could have done to make a select dirty?
Also, is there a parm I can pass in my SQL to make sure a read is not dirty?
No, Views are are not retrieved with "dirty read" isolation level by default. Views behave just like it's underlying table except in few areas. Concurrency issues still be related to the base or the underlying table itself.
Is there something that someone could have done to make a select dirty?
I do not think so, as there is no tool or command to do such thing is available. Multi-statements are not part of the view definitions. As the following example demonstrates this as:
set isolation to dirty read;
create view v1 (name,no) as select name, no from tx;
Sysviews catalog table registers only the create syntax and ignores any other preceding sql statements.
Is there a parm I can pass in my SQL to make sure a read is not dirty?
Yes. Set the isolation level and execute the select statement like:
set isolation to committed read;
set lock mode to wait;
select ... from view_name where ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.