SP_PREPEXEC and SP_UNPREPARE blocking

  • Hi Expertz

    These procedures are blocking other processes.

    Lock created is "LOCK_M_S".

    In Most case the blocking is started from the Host_A which at that moment is exec "SP_UNPREPARE" and the other hosts who are being blocked are is exec "SP_PREPEXEC" as shown by Activity Monitor.

    Can give me any suggestion what could have caused this.

    What is a possible solution for avoiding these blocks

    Tanx 😀

  • Please help...........

    Tanx 😀

  • Please help...........

    Tanx 😀

  • Eswin (7/17/2009)


    Hi Expertz

    These procedures are blocking other processes.

    Lock created is "LOCK_M_S".

    In Most case the blocking is started from the Host_A which at that moment is exec "SP_UNPREPARE" and the other hosts who are being blocked are is exec "SP_PREPEXEC" as shown by Activity Monitor.

    Can give me any suggestion what could have caused this.

    What is a possible solution for avoiding these blocks

    In MOST cases, when is occuring other times? How long does the blocking last?

  • I would need to know what the procs are that are blocking each other and what objects they are accessing. Blocks aren't necessarily a bad thing. They just mean something has a lock on some resource.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Lynn Pettis (8/5/2009)


    In MOST cases, when is occuring other times? How long does the blocking last?

    I waited for about 20-30 min , then had to kill it as the developers were not able to connect through their applications.

    GSquared (8/5/2009)


    I would need to know what the procs are that are blocking each other and what objects they are accessing. Blocks aren't necessarily a bad thing. They just mean something has a lock on some resource.

    The query was just a select statement run from Aqua Data Studio and the result has around 220 rows.

    select distinct

    emp.First_Name,emp.Last_Name,emp.Middle_Name,

    comp.employee_id,comp.request_dt,comp.numofdays,

    comp.reason,comp.request_by,comp.approve_dt,

    tech.First_Name+' ' +tech.Last_Name+' '+isNull(tech.Middle_Name,'') as REQUESTEDBY,

    comp.approve_status,comp.approve_desc,

    case when (comp.approve_by) is null then '' else ( select first_name+' '+last_name from employee_tbl where user_id=comp.approve_by) end as APPROVEBY

    from

    employee_tbl emp,tl_compoff_tbl comp,TL_activity_tbl tla

    ,employee_tbl tech

    where emp.employee_id = comp.employee_id

    and comp.employee_id = tla.employee_id

    and emp.employee_id = tla.employee_id

    and comp.request_by = 'AST/016'

    and emp.employee_status = 'A'

    and (comp.approve_status='O' or comp.approve_status='D')

    and tla.status='A'

    and getdate() between tla.start_date and tla.end_date

    and tech.User_Id = comp.request_by

    order by comp.approve_status--emp.First_Name

    "SP_UNPREPARE" was blocking "SP_PREPEXEC" when i checked through Activity Monitor.

    Tanx 😀

  • It looks like that's the expected behavior.

    Take a look at: http://jtds.sourceforge.net/apiCursors.html

    That has some data on the use of those system procs and what they're for. Google/Bing/whatever for more.

    I'm not familiar with Aqua Data Studio. Can you contact them about their use of the API procs? They might be able to help out.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 7 posts - 1 through 6 (of 6 total)

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