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

Database Timeouts : Error -2 Severity 11 Expand / Collapse
Author
Message
Posted Friday, March 8, 2013 5:34 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, June 28, 2014 2:49 PM
Points: 116, Visits: 346
Hi Folks,

at times with heavy workload, my devs tell me they receive a lot of database timeouts. A the database I got 2 stored procs which get heavily executed. If I run the queries at ssms they take about 1000 ms. The execution plan looks good. But the cpu goes up to 100% and I got a lot of SOS_SCHEDULER_YIELDS. I've allready gone through all the points of chapter 3 in the book "the accidental dba", but none of the reasosn fit. Why is the query so ressource intensive?


Greetz
SQL Pizza



sometimes you dont see the pizza for the toppings...
seek and ya shall find...
Post #1428535
Posted Friday, March 8, 2013 5:39 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 6:52 AM
Points: 5,131, Visits: 4,918
Can you disclose the procedures, tables, indexes, execution plans and any other information related to the objects in question so that we can take a look.



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1428536
Posted Friday, March 8, 2013 5:45 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:04 PM
Points: 42,437, Visits: 35,491
Please post table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Also note that you need to tune your workload, not your individual queries.
http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-1/
http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-2/



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1428537
Posted Monday, March 11, 2013 10:01 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, June 28, 2014 2:49 PM
Points: 116, Visits: 346
Seems to be gone...weird...I'd come back with all the info, when the problem would emerge again. Thanks!

Greetz
SQL Pizza



sometimes you dont see the pizza for the toppings...
seek and ya shall find...
Post #1429364
Posted Monday, March 11, 2013 10:46 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, June 9, 2014 6:02 AM
Points: 2,674, Visits: 697
running in SSMS isn't always the same as running from an application, the set options might be different for example.
if it's only a couple of procs why not profile to capture the stats when they run - you could also extract the plan from cache when it's bad and compare to the plan you get when you run it.
Sorry don't have the book so have no idea what all the steps there might be.
probably a silly question but the procs don't start sp_ ??


The GrumpyOldDBA
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
Post #1429401
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse