URGENT!!!!! TimeOut Error

  • Hi

    I have one table which have only 6000 records. Bacically this table is used to insert the sessions. Anyways data doesn't matter to my query. My query is:

    when i fires a query

    SELECT count(autUID) From tableName

    I gets timeout error.

    Why??????

    One problem may be table is locked. How to see it and how to remove lock.

    Is there any problem associated to the timeout error.

    I am using sql 7.0

    Waiting for URGENT reply

    Prakash Z

  • You can do this in two ways

    1. SELECT count(autUID)

    From tableName(nolock)

    or

    2. Set transaction isolation level read uncommited

    SELECT count(autUID)

    From tableName

    Hope this helps

  • To see the lock first run the query, then from a different connection type sp_who2. This will show any blocked transactions. If a query is blocking that you think is safe to kill. Find the spid and type "kill <spid>". You can also see locks by going to Management/Current Activity/LocksObjects in EM.

    Darren


    Darren

  • Hi,

    Thanks for reply

    But the problem is i can't see the lock in log activity.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply