We have a large SQL Server database that uses agent jobs to insert records of outgoing messages into a MySQL table on another server that is a open queue. Problem is when we get to records that are more than 5000, it starts to lose records. So 7800 transferred, only 5500 will actually be inserted. But the job reports that it successfully ran.
The jobs run a dots file that defines the database connections via the servers ODBC. What's weird is we never had any issues before and I suspect its because of the earlier MySQL drivers. We had to use new ones because the old wouldn't install on the new server platforms.
Here is the error we're getting:
Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility Version 11.0.5058.0 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 2:58:45 PM Error: 2022-02-18 14:59:46.59 Code: 0xC002F210 Source: Transfer to MySQL Execute SQL Task Description: Executing the query "INSERT INTO OPENQUERY(TABLE, 'SELECT sql_id..." failed with the following error: "Query timeout expired". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 2:58:45 PM Finished: 2:59:46 PM Elapsed: 60.778 seconds. The package execution failed. The step failed.
If it ever fails it happens right at the 60sec mark.
Does anyone have any idea why this would happen? Are there settings that need to be altered to ensure the transfer completes?
Please let me know what I can provide to assist.
Thank you all!!!
Related
My setup is - SSMS connecting to Azure SQL server. This server has deployed on it a number of SSIS packages to be run.
When a package is under execution, I have the error shown below:
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error
code: 0x80004005. An OLE DB record is available. Source: "Microsoft
SQL Server Native Client 11.0" Hresult: 0x80004005 Description:
"Resource ID : 1. The request limit for the database is 60 and has
been reached. See 'http://go.microsoft.com/fwlink/?LinkId=267637' for
assistance."
.
After doing much research, I found that a potential solution was to decrease the MAXDOP amount. Set the value between 1 or 0. Doing this had no effect and did not prevent the error message.
Then, also as a result of research, I found out that I could restart the SQL services running. This ensured the SSIS package I execute could complete without errors twice! But on third attempt, the execution processes failed with the above error.
I found out online that there could be other reasons why I'm getting this error. Any chance someone can assist by pointing me in the right direction.
Many thanks
Thanks.
There was a package with a data-flow task in it. This task was writing to over 30 table simultaneously.
In the end, I broke the task down into mini tasks, to reduce the number of simultaneous db access.
This solved my issue.
SSIS package wasn't even started, SQLAgent returned error almost instantly.
It happened once, the job is scheduled to run daily for almost a year now, and until now there wasn't any problem with it. Credentials, data structure weren't changed (we're migrating to another domain, but it didn't affect other jobs using the same proxy).
Error returned by SQLAgent:
Executed as user: <SSIS_PROXY>. Microsoft (R) SQL Server Execute Package Utility
Version 12.0.4100.1 for 64-bit
Copyright (C) Microsoft Corporation. All rights reserved.
Started: <TIME> Failed to execute IS server package because of error 0x80131904.
Server: <SERVER>,
Package path: <PATH>, Environment reference Id: NULL.
Description: Timeout expired.
The timeout period elapsed prior to completion of the operation
or the server is not responding.
Source: .Net SqlClient Data Provider Started: <TIME>
Finished: <TIME> Elapsed: 30.654 seconds.
The package execution failed. The step failed.
There are other jobs running in the same time window and they weren't affected.
One of them is maintenance job (backup), could that put some exclusive locks on system tables (or whatever) and result in timeout?
Any idea what could've happened?
I was having this error intermittently. On occasion a job that runs fine on a schedule would error and the next interval would run fine. After some research I found that the resources in the SSIS catalog can become locked by other agents starting jobs. The fix that worked for me was to automatically retry 3 times. I have not had the error since.
Hopefully MS will find a way to correct this issue under the hood.
Hope this works for you:
https://technet.microsoft.com/en-us/library/ms188952.aspx
I have an SSIS package which I have developed on the server using VS.
The package runs fine in Visual Studio, however when I add to a Job in SQL Server Agent the package fails.
I am pulling data from SAGE Line 50 v19, so the ODBC driver is 32 bit. And I am running in a 64 bit environment.
Already setup odbc as 32 bit, ensured that agent was setup to run 32 bit, but sill encountered error. I have tested running the package from command line as follows
"C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\DTExec.exe" /FILE "E:\Reporting\Projects\SSIS\SSIS2012\SSIS2012\Package1.dtsx" /DECRYPT password /CHECKPOINTING OFF /REPORTING EWCDI
This works just fine when I run it. However when I setup an sql agent job to run as a "Operating System (CmdExec)" I get the following output.
Microsoft (R) SQL Server Execute Package Utility
Version 11.0.2100.60 for 32-bit
Copyright (C) Microsoft Corporation. All rights reserved.
Started: 13:30:44
Info: 2015-02-24 13:30:44.45
Code: 0x40016044
Source: Data Flow Task Data Flow Task (SSIS.Pipeline)
Description: Attempting to upgrade "ODBC Source". The package is attempting to upgrade an extensible object.
End Info
Error: 2015-02-24 13:30:44.59
Code: 0xC0014020
Source: SSIS002_SageCompany5Import Connection manager "Sage005.Manager"
Description: An ODBC error -1 has occurred.
End Error
Error: 2015-02-24 13:30:44.59
Code: 0xC0014009
Source: SSIS002_SageCompany5Import Connection manager "Sage005.Manager"
Description: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server.
End Error
Error: 2015-02-24 13:30:44.59
Code: 0xC00291EC
Source: Get Max(SourceID) Execute SQL Task
Description: Failed to acquire connection "Sage005.Manager". Connection may not be configured correctly or you may not have the right permissions on this connection.
End Error
Warning: 2015-02-24 13:30:44.59
Code: 0x80019002
Source: SSIS002_SageCompany5Import
Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
End Warning
DTExec: The package execution returned DTSER_FAILURE (1).
I can't understand why this runs fine everywhere else. Been googling for hours, tried everything I can think of with no luck.
I am doing something similar with a 32 bit DSN & I had the check the "32-bit runtime" check box in the SQL job (under the SSIS job step - advanced tab).
Looking at the Operating System (CmdExec) option it looks like there is a "/X86" switch - maybe try that if you have to run from command line or just check the box above?
Apologies if this is what you have already done when you say the agent is "set up to run 32 bit".
Not 100% sure if this applies to you but i had a similar problem, where my cmd app in the ssis project ran perfectly in VS but once deployed to ssisdb it would hang, and never complete turned out the cmd required a user input and with it being in the ssisdb it didnt display so you could not continue and it would error
Hope this helps a little
I have a job on SSMS that is a DTSX package in Visual Studio and in the last day it has started failing due to the following error. I cant find any timeout settings to extend the timeout either.
Date 26/08/2014 13:02:01
Log Job History (JOB B)
Step ID 1
Server SERVER A
Job Name Job B
Step Name 1
Duration 00:02:26
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
Executed as user: DOMAINA\USERA. Microsoft (R) SQL Server Execute Package
Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005.
All rights reserved. Started: 13:02:01 Error: 2014-08-26 13:04:26.70
Code: 0xC002F304 Source: DTSTask_DTSSendMailTask_1 Send Mail Task
Description: An error occurred with the following error message:
"The operation has timed out.". End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 13:02:01 Finished: 13:04:26 Elapsed: 145.25 seconds.
The package execution failed. The step failed.
Check your SMTP Connection manager. You would have an attribute called "Timeout(milliseconds)"
that you can change and see if that helps. If that does not help, you would need to check with your network guys why the SMTP server is not responding.
This turned out to be an issue that it was using a local account rather than a domain account.
Source that helped me resolve here: DTSX package runs in Visual Studio but not when called from a Database Job
while runnig the ssis package i'm calling sp in the ADO.net source,but getting this error
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.I have set the command timeout to 0(infinite time),but still getting the error.The sp is working fine in sql server and taking approx 31 seconds for executing it,but in ssis its throwing error..please help me on this.Thanks in advance.
Check out this bug report - there is a sp in the SSISDB database in SQL Server 2012 causing packages to time out before they start running. I had error message "Failed to execute IS server package because of error 0x80131904" and "Description: The operation failed because the execution timed out" when calling multiple (more than 10) packages from my scheduling tool via DTExec. Please vote for the issue on the connect site so that MS can release an official fix.
Today, I was experiencing the same error while using the ADO Net Source, my sp works fine on the SSMS, but fails in the package, while In the package, it errors our with a long laundry list of errors, but basically it is timing out.
Solution is Right click on the ADO Net Source - Show Advanced Editor - Component Properties - Custom Properties - CommandTimeout - Increase the time here
I had the same problem in SSAS.
The way I sorted this out was extending the client and server time out settings.
you can see more details in the link below:
routine to backup ssas databases fails with: The XML for Analysis request timed out before it was completed