Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2012
    Posts
    3

    Answered: Question about Transactions and Locking

    Hi,

    I'm new to Sybase and I have a question regarding the behavior of transactions. If I have a stored procedure with a transaction where tables (A,B,C,D,E) are updated will it be possible to query table A before the entire transaction has committed without having to wait? After some initial testing under this scenario I've not been able to query this table without waiting until stored procedure has completed.

    Appreciate any help. Thanks.

  2. Best Answer
    Posted by Pat Phelan

    "First read http://infocenter.sybase.com/help/in...ing/X51531.htm to determine what level of locking/blocking you can tolerate. Then find one of the discussions that describes the problems and benefits associated with the locking level that you choose. In general terms you can use strict (level 3, the default) locking to get precise and repeatable answers. You can use permissive (level 0) locking to get answers quickly, but which may not be completely correct. You can use something in between if that fits your needs better.

    -PatP"


  3. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    This can be possible depending on which Sybase engine you are using, the connection settings, and SQL syntax. Others might be able to give you a better answer using only the information that you've provided, but I would need more specific information to give a more specific answer.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  4. #3
    Join Date
    Mar 2012
    Posts
    3
    Thanks for the response. I'm using Sybase ASE 15.0.3 and T-SQL for writing the stored procedure.

  5. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    First read http://infocenter.sybase.com/help/in...ing/X51531.htm to determine what level of locking/blocking you can tolerate. Then find one of the discussions that describes the problems and benefits associated with the locking level that you choose. In general terms you can use strict (level 3, the default) locking to get precise and repeatable answers. You can use permissive (level 0) locking to get answers quickly, but which may not be completely correct. You can use something in between if that fits your needs better.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Tags for this Thread

Posting Permissions

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