Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SP_PREPEXEC and SP_UNPREPARE blocking Expand / Collapse
Author
Message
Posted Friday, July 17, 2009 5:12 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, October 28, 2013 8:50 AM
Points: 1,606, Visits: 1,039
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
Post #754722
Posted Monday, July 20, 2009 12:04 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, October 28, 2013 8:50 AM
Points: 1,606, Visits: 1,039
Please help...........

Tanx
Post #755518
Posted Tuesday, July 21, 2009 10:48 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, October 28, 2013 8:50 AM
Points: 1,606, Visits: 1,039
Please help...........

Tanx
Post #757143
Posted Wednesday, August 5, 2009 6:34 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 7:09 PM
Points: 20,744, Visits: 32,560
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?



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #765380
Posted Wednesday, August 5, 2009 7:06 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 1:09 PM
Points: 13,872, Visits: 9,597
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
Post #765409
Posted Thursday, August 6, 2009 12:29 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, October 28, 2013 8:50 AM
Points: 1,606, Visits: 1,039
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
Post #765987
Posted Thursday, August 6, 2009 7:05 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 1:09 PM
Points: 13,872, Visits: 9,597
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
Post #766163
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse