SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server 2008 Database Stuck


SQL Server 2008 Database Stuck

Author
Message
wkkhan82
wkkhan82
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 21
I am using SQL Server 2008 in on of our project, I am facing an issue, sometime daily or after 1-2days at morning(08:00 to 09:00) and at evening(18:00 to 19:00) database stuck. The query which we runs directly from database it works fine but the same query we execute from ASP.NET application then it stuck, mean when we click on that page it shows in progress. I also tried to debug from live database server but on Database stuck time when we called any stored procedure EXECUTE command then it not responds. I also observe that it stuck for 30-35mints, so after that it works fine automatically.

Current Solution : We are managing by Restarting SQL Server, so as we re-start SQL server it works fine.
Robin Sasson
Robin Sasson
SSC Eights!
SSC Eights! (867 reputation)SSC Eights! (867 reputation)SSC Eights! (867 reputation)SSC Eights! (867 reputation)SSC Eights! (867 reputation)SSC Eights! (867 reputation)SSC Eights! (867 reputation)SSC Eights! (867 reputation)

Group: General Forum Members
Points: 867 Visits: 530
Using the term "stuck" is is a bit vague.

From what I can gather, running a query from an ASP.NET page causes issues on the SQL Server?

If that is the case, I'd check the Windows Application Logs for the Web Server hosting the application to start with.

Have you set connection and query timeouts in Web.config?

Hope this gives you something to start with.

Exclamation "Be brave. Take risks. Nothing can substitute experience." Exclamation
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8763 Visits: 7279
Have you checked for locking / blocking / deadlock issues?

Most often, it is a case of an uncommitted transaction blocking other processes that causes such issues.

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Gianluca Sartori
Gianluca Sartori
SSCrazy Eights
SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)

Group: General Forum Members
Points: 9768 Visits: 13349
Shot in the dark...
Could be a stale statistics issue. If the query runs fine for a couple of days and then start misbehaving, you statistics might be outdated due to updates to the underlying tables.
I would compare the execution plan of the ad-hoc query in SSMS and the execution plan of the statement executed by the app while it's running. You can capture it from sys.dm_exec_query_plan(plan_handle) passing the plan_handle found in sys.dm_exec_requests.
If the plans are different (they likely are), check if the two statements are executed in the exact same way (literal values/parameters, direct execution/sp_executesql). I would check for outdated statistics and parameter sniffing.

Hope this helps
Gianluca

--Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search