Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Location
    Timbaktu
    Posts
    185

    Unanswered: same process takes more time

    We are having a procedure running on Sybase 11.3.3 on NT which generally takes less than 5 minutes to complete.This process is submitted through a front end application from a Client's machine and it's suppose to do some calculation in the Temp table and finally update the main table and drop the Temp Table created in the process.
    Everything works fine in 9 out of 10 cases,but sometimes the same query runs forever.Then we need to kill the process in sql central and ask the client to do the same thing again.Any Idea?

  2. #2
    Join Date
    Jun 2002
    Location
    Argentina
    Posts
    78

    Thumbs up

    I think is a locking problem with other proccess.
    Try "sp_who" and check the column "blk_spid" for a locking process.
    Also try to see "sp_lock" or this select in the same database:

    SELECT substring(db_name(master..syslocks.dbid),1,15) db_name,
    object_name(master..syslocks.id)tablename,
    master..syslocks.row,
    master..syslocks.page,
    tipo =
    CASE
    WHEN master..syslocks.type = 1 THEN "Exclusive table lock"
    WHEN master..syslocks.type = 2 THEN "Shared table lock"
    WHEN master..syslocks.type = 3 THEN "Exclusive intent lock"
    WHEN master..syslocks.type = 4 THEN "Shared intent lock"
    WHEN master..syslocks.type = 5 THEN "Exclusive page lock"
    WHEN master..syslocks.type = 6 THEN "Shared page lock"
    WHEN master..syslocks.type = 7 THEN "Update page lock"
    WHEN master..syslocks.type = 8 THEN "Exclusive row lock"
    WHEN master..syslocks.type = 9 THEN "Shared row lock"
    WHEN master..syslocks.type = 10 THEN "Update row lock"
    WHEN master..syslocks.type = 11 THEN "Shared next key lock"
    WHEN master..syslocks.type = 256 THEN "Lock is blocking another process"
    WHEN master..syslocks.type = 512 THEN "Demand lock"
    END,
    master..syslocks.type,
    master..syslocks.class,
    master..syslocks.context,
    master..syslocks.spid,
    master..syslocks.fid,
    master..syslocks.loid
    FROM master..syslocks
    WHERE master..syslocks.dbid = db_id()
    ORDER BY master..syslocks.spid

    If every thing is fine, then try to see the spaces in "tempdb" with "sp_helpdb tempdb", and see the log.
    Good luck.

    Sebastian

Posting Permissions

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