Results 1 to 6 of 6

Thread: Locks

  1. #1
    Join Date
    Jun 2003
    Posts
    294

    Exclamation Unanswered: Locks

    Hello,

    I have a problem in SQLSERVER 2000, when I execute a Query, the table get locked for insert or any other transaction, even for other queries.

    Does SQL Server have a kind of lock mode different of Oracle ?

    How do I solve this problem ??

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    It would help to see the query, but yeah, locking is different...at least from what I remeber...

    But there should be no reason why it should be a problem...

    How are you executing the sql statements?

    What's the interface?

    Are you using stored procedures?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Jun 2003
    Posts
    294
    This is an example:
    SELECT * FROM TENC_REMESAS;

    And when I try to insert a record or when I want to update the table, I get locked.
    The problem is with the concurrency. I mean, when multiple users, try to use a table.

    I hope you can help me !!

    Pd. I'm not using stored procedures.

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Are you opening a record set from vb?

    Where are you making the call?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    It sounds like on data retrieval and DML operations a lot of records are affected. Otherwise you wouldn't be experiencinng this (it would not be that noticeable). The key is to optimize data access on the table(-s) by proper indexing (all fields that participate in joins should be indexed, covered index is preferred when the plan yields index scan), and to make transactions short when page or table lock is unavoidable.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  6. #6
    Join Date
    Jun 2003
    Posts
    294

    Question

    Quote Originally Posted by Brett Kaiser
    Are you opening a record set from vb?

    Where are you making the call?

    Well, I have a Java aplication that invoke the queries and executes transactions, and there's where I'm getting problems, but I'm sure that application isn't causing the problems.

Posting Permissions

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