Subject | Re: How to implement SQLServer's WITH(NOLOCK) statment? |
---|---|
Author | real_yoni |
Post date | 2008-04-14T12:24:59Z |
From the SQL server help file:
"In SQL Server, a SELECT statement with the default isolation level
of Read Committed causes S locks being taken and released on rows as
they are read. Although this enforces the isolation level, it means
that a SELECT statement waits if an incompatible lock exists on a row
for which an S lock is required. When the NOLOCK hint is specified,
the SELECT operation does not try to take the S lock and the data is
read. Although this lets the operation succeed, it also means that
the SELECT statement can read uncommitted data."
In practice what it means that select statments never get locked. and
this is what I'm tring to achieve.
Thanks,
Yoni.
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...>
wrote:
transaction requests a write and the request succeeds. You can set
certain transaction parameters to govern behaviour, if you have a
particular behaviour in mind...so best you explain what you want to
achieve.
"In SQL Server, a SELECT statement with the default isolation level
of Read Committed causes S locks being taken and released on rows as
they are read. Although this enforces the isolation level, it means
that a SELECT statement waits if an incompatible lock exists on a row
for which an S lock is required. When the NOLOCK hint is specified,
the SELECT operation does not try to take the S lock and the data is
read. Although this lets the operation succeed, it also means that
the SELECT statement can read uncommitted data."
In practice what it means that select statments never get locked. and
this is what I'm tring to achieve.
Thanks,
Yoni.
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...>
wrote:
>a
> At 05:26 PM 13/04/2008, you wrote:
> >Hi,
> >
> >In SQLServer I can force a select statment to ignore any locks on
> >table (in effect having a shared read on the table).Firebird. Shared read always applies. Locks don't exist until a
> >SELECT * FROM Items WITH(NOLOCK).
> >
> >How can I accomplish that in Firebird? should I use a special
> >connection string?
>
> You don't - because you never need to ask for "shared locks" in
transaction requests a write and the request succeeds. You can set
certain transaction parameters to govern behaviour, if you have a
particular behaviour in mind...so best you explain what you want to
achieve.
>
> ./heLen
>