Azure SQL Database - Execution Timeout Expired error on several jobs - sql-server

In SQL Server Management Studio, I discovered an issue while attempting to disable a trigger on one of our tables in our Azure SQL Database, which is set at one of the highest-available performance tiers (Business Critical Gen 5). I used right-click disable to accomplish this. I receive the following error after the timeout period expires:
Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (.Net SqlClient Data Provider)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.0700&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476
------------------------------
Server Name: searchfoundry.database.windows.net
Error Number: -2
Severity: 11
State: 0
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType, Boolean retry)
The wait operation timed out
The help link goes to a 404 - no surprise there.
EDIT #1:
#DanGuzman kindly assisted me in suggesting I run the disable trigger as T-SQL. This worked. However, in between the time I originally posted, and the time he gave his suggestion, I discovered that this timeout error is occurring within other areas of our infrastructure/services which use this database.
I have run a query to check for blocking sessions on this database. There are none listed. I have also increased the timeout period from 30 seconds to 5 minutes. Items are still timing out.
I am looking for guidance on what other queries I can run to look under the hood of this database to determine what is causing these timeouts to occur.
I'd be happy to just restart the SQL Server to resolve this, but as many of us know, there is no restarting Azure SQL Servers, unfortunately.

Increasing the DTUs works for me.

I had fixed similar timeout issues by increasing the DTU quota of the DB

Related

SchemaModel.SqlSpatialIndex: Timeout expired

I am receiving a timeout error when trying to reverse engineer a SQL Server database into a Database project. We don't have any spatial indexes on the that database (I checked using this).
I don't have a timeout setting on the connection (
3/8/2016 9:46:00 AM An error was received from SQL Server while attempting to reverse engineer elements of type Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSpatialIndex: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
3/8/2016 9:46:00 AM An exception was generated.
Unable to reconnect to database: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
3/8/2016 9:46:00 AM An error was received from SQL Server while attempting to reverse engineer elements of type Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSpatialIndex: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
3/8/2016 9:46:00 AM Finished importing database.
3/8/2016 9:46:00 AM A summary of the import was saved to the following location: C:\Temp\Import From Prod 2\Import Schema Logs\Import From Prod 2_20160308024125.log
3/8/2016 9:46:00 AM Click Finish to continue...
Steps to reproduce the issue:
Open Visual Studio 2013
From the menu, click on "View" / "Sql Server Object Explorer"
Connect to a SQL Server (in our case, the UAT server) and choose a database
From the context menu of the database, choose "Create New Project"
Press "Start"
How do I figure out what is actually timing out? How do I fix this?
Can you increase the amount of available RAM? This exact error started showing up for me with schema comparisons between an existing db project and a local database. The problem was resolved when I shut down all of my applications except Visual Studio. This makes me think that my pc did not have enough resources to complete the task in the desired time when I have several apps open.
One option that worked for me was to increase the value of HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\NN.N\SQLDB\Database\QueryTimeoutSeconds and restart Visual Studio based on this. But, although successful, it was taking nearly 5 minutes to compare.
Later I discovered that we recently changed our build target to Sql Server 2016, but were still referencing a 2012 master.dacpac. I updated the reference to a 2016 master.dacpac and the compare now completes in less than a minute.

timeout on open view in sql server management studio

When I try to use "open view" in SQL Server menagement studio to open an complex view, I met an error after about 30s execution:
SQL Execution Error.
Error Source: .Net SqlClient Data Provider
Error Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Actually if I execute this view in query window it only needs 36s.
I refer to this article but didn't work:
http://support.microsoft.com/kb/915849
Please help, thanks!!
Set the timeout=0 (infinite) for both connection time-out and execution time-out.
Refer the following image.
I think this is a bug, so I added it to the Connect feedback site. Vote it up, hopefully we can get it fixed.
https://connect.microsoft.com/SQLServer/Feedback/Details/3115872
Hello there is solution:
Run -> regedit -> Computer\HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\11.0(or 14.0 depends on version of SSMS)\DataProject\SQLQueryTimeout
Change Value 30 to 300
Problem solved.

Another ODBC Call Failed Topic

I am running Access 2010 FE and SQL Server 2005 BE.
I can execute pass through queries to my SQL Server succesfully by using DSNless connections.
During my testing phase sometimes I need to restore my database to get back to my original records so I can rerun my pass through queries. What I have found is when I run a pass through query, it creates an active connection on my SQL Server. I see the connection via the SQL Server Management Console under the MANAGEMENT | SQL Server Logs | Activity Monitor, select view processes. There I can see which process ID is being used and who is using it when I run my pass through query.
Now the only way for me to restore my database is to KILL the PROCESS e.g. Active connection
Now when I have my restored database in place and re-run the pass through query, I receive a ODBC -- Call Failed message box. I have attempted to run a procedure to refresh my querydefs but to no avail, I will still get the ODBC-- Call Failed message box when I click on those objects.
Now there are two options on how to fix this problem, which in either case I find not USER Friendly.
Restart my Access Application
Wait approx 5-10 minutes to rerun the Pass Through Query
I created a function to trap my ODBC Errors and this is what appears:
ODBC Error Number: 0
Error Description: [Microsoft][ODBC SQL Server Driver]Communication link failure
ODBC Error Number: 3146
Error Description: ODBC--call failed.
So if for some reason, I need to restart my SQL server or kill a process (Active Connection) on my SQL server while the Access Application is currently connected via ODBC, the objects created via ODBC will not perform properly till I execute the 2 workaround solutions as stated above.
Can anyone shed some advice on a solution? I appreciate any insight.
I asked a similar question some time ago, and never got a satisfactory answer. My original question is here: Force SET IDENTITY_INSERT to take effect faster from MS Access
There is a registry setting documented here for ACE that controls the timeout behavior:
ConnectionTimeout: The number of seconds a cached connection can remain idle before timing out. The default is 600 (values are of type REG_DWORD).
So as a third workaround (in addition to the two you already listed) you can change that registry setting to a shorter timeout (like 10 seconds). This is the approach I took in my answer. One caveat is that shortening the timeout may cause performance or other issues. Your mileage may vary.
See my full answer to the original question for more info.

TFS Back up failed : Timeout expired

I am trying to take the tfs back up. But its getting failed .
I will add the exception details here from the log file generated .
[Error #12:41:51.187] Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server 'sampledb-tfs-ser'. ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
I know server is timing out . is der any way to increase the time out or any other way in which this problem could be solved ..?
Can any one help please ...?
Looks like you're using some sort of programming language (C#, powershell, etc) to do this. You're going to have to set the query timeout for your connection to 0 to let the program wait indefinitely for the backup to finish. How you go about doing that depends on the language, The ServerConnection class has a property called StatementTimeout. Set that to 0 and you should be good to go.
On your TFS APPTier server, in file
C:\ProgramData\Microsoft\Team Foundation\Server Configuration\ConfigPT.xml
, try changing the value of property
<SqlStatementTimeoutInSeconds>21600</SqlStatementTimeoutInSeconds>
Try 12 hours (43200) instead. That solved the problem for me.
This file is the result of executing the TFS backup plan in the "Team Foundation Administration Console". Therefore you may have to change that value everytime after re-executing the TFS backup plan.

How to prevent Data Generation Plan timeout expired error

I'm attempting to populate a DB on my local SQL2008 Server using a Data Generation Plan. However, when I run it I get:
Data generation failed because of the following exception: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.. occurred 1 time(s).
I've tried setting the Connection timeout setting in the Advanced connection properties to 120 instead of 15, but I still get the error.
How do I fix this problem?
There are roughly 40 tables involved and about 20 of those are getting 100 rows inserted while, 10 tables ~1000 rows and the rest less than 100 rows. Also, when I exclude the trouble table the script completes successfully.
Thanks!
Go to Tools menu > Options > Database Tools > Data Generator > SQL Timeout
You may have to restart Visual Studio for the change to take effect, at least I had to.
There are also other timeout values that can be configured via the Registry (QueryTimeoutSeconds, LongRunningQueryTimeoutSeoncds, LockTimeoutSeconds) though I don't understand the difference. See here.

Resources