How to prevent Data Generation Plan timeout expired error - sql-server

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.

Related

SQL SERVER to DATA FACTORY the request limit for the database is 120 and has been reached

I have an SQL server database linked to azure data factory. when I sometimes run a query on a table. I get the following pop up error message, but the table still runs.
error unable to apply connection settings the detailed error message is resource id...the request limit for the database is 120 and has been reached
It all depends on the performance of your query. You can first check for any performance improvements and then if that doesn't solve the problem then you can try increasing the tier as mentioned here
I fixed it by going into data factory → pipeline → copy data object → source tab, and changing the 120-seconds timeout limit to 240 seconds.

Azure SQL Database - Execution Timeout Expired error on several jobs

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

SQL Server Agent - Semaphore timeout

I have a SQL Server Agent Job with one step. The step executes a stored procedure on the local server, and nothing more. When the job executes (either manually or scheduled), I receive the following error. The job fails after about 23 seconds.
Msg 121, Level 20, State 0, Line 0 A transport-level error has
occurred when receiving results from the server. (provider: TCP
Provider, error: 0 - The semaphore timeout period has expired.)
However, I have no problem executing the stored procedure manually. I receive the proper results in less than a second.
The 'semaphore' error tends to be a hardware or network issue. But since the job is executing on the local server, I am unclear how hardware or network latency could be an issue.
UPDATE (things I've tried)
After each of these attempts, I put everything back to its original state. Each of these attempts has the same results (works when I RDP to the server, fails everywhere else).
The underlying stored procedure calls out to a linked-server. I removed these references.
Assuming the problem is some kind of call out to the AD domain-controller, I used a SQL Login instead of a Windows User.
I modified the job to run as me (since I can do everything).
Another note: When executing, the job fails to start. So, it's not even getting to the stored procedure.
I would approach this problem by following below steps...
1.Ensure Query is finetuned
2.Ensure stats and indexes are upto date
Semaphore time outs mostly relate to insufficient memory in the system..So updating stats will help sql server in getting memory estimates right..and this should solve most of timeouts
But since the job is executing on the local server
I assume you meant ,you are running job in same box as of server..not remotely..even in this cases ,we faced time outs(general),but we ruled out hardware and network issues through below steps
TCP Offloading/Chimney & RSS…What is it and should I disable it?
changed Remote Login,Remote query time outs(these may not be applicable to your error message)

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.

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.

Resources