Multiple Transaction question 
Author Message
 Multiple Transaction question

Hi Sybase Gurus,

        We have a system where If one user (say U1) in a particular
Transaction(say t1) updating some set of rows (say sr1) then other user
(say U2) should not be able to update the same set of rows i.e. sr1
using another transaction(say t2). We have achived this by implementing
Row Locking in Sybase 11.9.
        Currently, if U1 is doing update using t1 and U2 comes and updates sr1
using t2 then U2 is blocked till T1 is commited or rollbacked.

        I want something less than that. If U2 comes and updates sr1 using t2
and T1 is already updating sr1 then T2 shouldn't block instead updtae
statment should error out saying rows are already locked.

        Is there a way to implement this?

Regards,

Vivek



Sun, 19 Jan 2003 03:00:00 GMT
 Multiple Transaction question

Quote:

> Hi Sybase Gurus,

>         We have a system where If one user (say U1) in a particular
> Transaction(say t1) updating some set of rows (say sr1) then other user
> (say U2) should not be able to update the same set of rows i.e. sr1
> using another transaction(say t2). We have achived this by implementing
> Row Locking in Sybase 11.9.
>         Currently, if U1 is doing update using t1 and U2 comes and updates sr1
> using t2 then U2 is blocked till T1 is commited or rollbacked.

>         I want something less than that. If U2 comes and updates sr1 using t2
> and T1 is already updating sr1 then T2 shouldn't block instead updtae
> statment should error out saying rows are already locked.

>         Is there a way to implement this?

 Yes, I believe so.  Check out the "SET LOCK NOWAIT" or "SET LOCK WAIT
<no_of_seconds>"
commands that were introduced in ASE 11.9.x (documented in Chapter 7 of the "New
Features of ASE 11.9" manual).

-bret



Sun, 19 Jan 2003 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. To Transaction or Not to Transaction that is the question

2. multiple recordsets in transaction

3. Inserting multiple records from MsAccess within a transaction

4. SQLCE and CF Multiple Transaction Bug Still Present

5. Multiple Transactions in One DB.Execute?

6. Transaction boundaries across multiple connections ?

7. Restoring multiple transaction logs on another server

8. Insert multiple rows to a table in one SP transaction

9. placing multiple alter proc in a single transaction

10. Transaction safety with multiple SQL stmts

11. Transaction replication with identity fields and multiple inserts

12. Multiple Transaction Logs?


 
Powered by phpBB® Forum Software