Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: isolation level serializable

  1. #1
    Join Date
    Jul 2003
    Posts
    421

    isolation level serializable

    Hi all,
    can anyone give me more information on
    set transaction isolation level serializable ?? I want to prove some lock to use on online insert and update.
    Thank you every much.
    ________
    Honda Interceptor
    Last edited by sql; 03-06-2011 at 01:42 AM.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    You can find details in sql books online.

  3. #3
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    This is the most restrictive lock and you lose all concurrency of the application, effecively making your application single user.

  4. #4
    Join Date
    Jul 2003
    Posts
    421
    Hi skhanal,
    I have interface , which alow the users to input data into database , should I set
    set transaction isolation level serializable before my insert and update statement??
    Thank you!
    ________
    Vapor Genie Vaporizer
    Last edited by sql; 03-06-2011 at 01:42 AM.

  5. #5
    Join Date
    Sep 2002
    Posts
    5,938
    Don't have to since sql will handle that with locking by default.

  6. #6
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Serializable should be used only in rare situations where you don't want anyone to access the data while the current user is using it. It holds lock for SELECT too.

    If you think someone might update a row that you are trying to update, you can use UPDLOCK in this case. But this is also restrictive and I would not recommend it. If data changes, your ADO driver will know and error out, which can be handled by the application.
    Last edited by skhanal; 07-08-2005 at 09:34 AM.

  7. #7
    Join Date
    Jul 2003
    Posts
    421
    Hi skhanal.
    Than you for your reply, are you suggest me to do update Sec01 with (updlock)
    set Name='CK/HK/743.43/01'
    where Name='CK/HK/743.43/2001' if at all my select statement I add select * from Table1 with (updlock,readpast) is there help??

    #your ADO driver will know and error out, which can be handled by the application
    can you give me more advice on this part ? maybe I can use it on Tomcat too
    ________
    CHRYSLER WINDSOR SPECIFICATIONS
    Last edited by sql; 03-06-2011 at 01:43 AM.

  8. #8
    Join Date
    Feb 2003
    Posts
    1,048
    No, he's he's suggesting that you don't use any kind of special locking. Let SQL Server control the locking itself unless you can think up a darn good reason not to.

  9. #9
    Join Date
    Jul 2003
    Posts
    421
    what error the message will show , are user understand the situation is some one apply an update, but not a bug on developer??
    Thank you
    ________
    VOLCANO DIGITAL
    Last edited by sql; 03-06-2011 at 01:43 AM.

  10. #10
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    It will be something like "Another user has updated the record, please confirm if you want to overwrite it ..."

  11. #11
    Join Date
    Jul 2003
    Posts
    421
    Hi,
    please I want to know more on this part.
    ________
    Nevada medical marijuana
    Last edited by sql; 03-06-2011 at 01:44 AM.

  12. #12
    Join Date
    Sep 2002
    Posts
    5,938
    Any specifics?

  13. #13
    Join Date
    Jul 2003
    Posts
    421
    Hi all,
    actually, my question is How can i know , all how can i use code to tell the user the databas eis doing undate??
    like if update
    doing some
    else
    you can process or upload??
    Thank you
    ________
    Colorado Medical Marijuana
    Last edited by sql; 03-06-2011 at 01:44 AM.

  14. #14
    Join Date
    Sep 2002
    Posts
    5,938
    May check lock type the table holds to see if it's update lock.

  15. #15
    Join Date
    Jul 2003
    Posts
    421
    can you give me some code?
    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •