SQL Azure - Intermittent Long Running Query - sql

I have a query that is intermittently running very slowly in SQL Azure
Runs in < 1 second in SSMS
Is submitted through Entity Framework through the application
Is NOT calling a stored procedure
Is passed parameters
Using DMVs determined that it runs and then enters a "Suspended" state
The wait type is indicated as IO_COMPLETION pointing towards waiting for a resource
This is in Azure so the normal server related monitoring is not available
Execution plan has been reviewed with no scans indicated
Issue will be occurring one day...all day, then with no changes to the database be cleared up the next morning
Once the issue was occurring then I couldn't login to the database for several seconds. Once I could the issue was corrected and the query performed as expected.
Any ideas on what could be causing this or other things that can be checked would be greatly appreciated!
Thanks in advance!

Related

SQL Server Management Studio : execution timeout expired

I keep on getting a timeout in my Microsoft SQL Server Management Studio. I'm not running any code. All I am doing is trying to look at the tables within a database in the Object Explorer. I always get:
Execution Timeout Expired
I've looked at some of my settings and it says lockout of 0, meaning it should be unlimited time. I'm not even running any code. Just trying to understand what's in my database by going through the Object Explorer.
Thanks!
It depends on your work environment. But in all cases, I trust it is related to the Database but not the Studio itself.
If you are working on a server that is reached by the network by many other clients, then:
It could be a transient network problem,
High load of requests on the Server,
Deadlock or other problems related to multiprocess contention.
I suggest you troubleshoot your server in idle time, and if possible you detach the databases one by one and work to see which database is resulting in the problem. For this database, you go through the Stored Procedures and Functions and try to enhance them in terms of performance.

Query timeout expired while running a request from a packaged .NET tool

I am working on an application built using a .NET packaged configuration tool. There is a out of box request that in turn fires a delete SQL statement and tries to delete a row from the database. Since past few months, we are receiving the following error- [Microsoft][ODBC SQL Server Driver]Query timeout expired.
We are unable to simulate this scenario in lower environments and can see this issue only on production.
The only issue we think is there might be a deadlock issue in a situation where this delete request is deadlocking with another simultaneous insert in the table (we have a scheduled job that inserts data in a relational database from large XML-splitting data from nodes)
What can be done to resolve this? Note, indexing has been done on the tables recently that reduces the frequency for some time but it again spiked up.

SQL Server 2005 won't update rows

I currently have a SQL Server 2005 set up and has been running successfully for quite a long period of time without any issues.
As of this morning our website applications have been attempting to perform udpates on various rows. However, every time an update happens the data never gets updated in the database.
Our application's code hasn't been changed in any way, and there appears to be no errors of any kind.
Is there anything in SQL Server that can prevent updates from being performed on a database? Can the size of transaction logs prevent data from being updated on a SQL Server database? Or anything at all that can cause this strange behaviour?
We had similar behaviour on one of our servers and it was due to the log file being on a hard drive that had run out of disk space - so worth checking that.
Also check that the Autogrowth limits haven't been reached:

what is SQL ReportServer GetMyRunningJobs in my SQL Profiler

While running the SQL Profiler on a client site I noticed getmyrunningjobs running over and over bogging down their system in the morning from about 5:30 am to 6:30am. I know it runs all the time but for some reason it appears to run 4 times in a row every couple of seconds in the morning. I'm not really sure what it is used for, though I've read a lot on SQL Profiler, I can't find much on SQL Report Server.
Can I stop or change the frequency or is there something else going on that I can check? Also, what is Tablockx, and is this related?
Thanks. Any help appreciated!
To answer your secondary question, TABLOCKX is a SQL Server table hint that applies an exclusive table lock. I'd think this would be related to your problem only if something is holding the lock for an unusually long time during the timeframe you indicated.

SQL Server Express 2008 Stored Procedure execution time spikes periodically

I have a big stored procedure on a SQL Server 2008 Express SP2 database that gets run about every 200 ms. Normal execution time is about 50ms. What I am seeing is large inconsistencies in this run time. It will execute for while, say 50-100 times at 40-60ms which is expected, then seemingly at random the same stored procedure will take way longer, say 900ms or 1.5 seconds to run. Sometimes more than one call of the same procedure in a row will take longer too.
It appears that something is causing sql server to slow down dramatically every minute or so, but I can't figure out what. There is no timing pattern between the occurences.
I have the same setup on two different computers, one of which is a clean XP Pro load with no virus checking and nothing installed except SQL server.
Also, The recovery options for all the databases are set to "Simple".
I would suggest breaking out applicable sections into their own stored procedures; there is only one query plan cached per batch.
It looks like my problems happen simultaneously with the SQL Server Plan Cache Object Counts hitting 999 and resetting.