Job failed without starting the SSIS package due to timeout - ssis

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

Related

SSIS Package error - Illegal operation attempted on a registry key that has been marked for deletion

We have a package that will be triggered through MVC application by invoking store procedure which creates a execution request for the Package. MVC app is hosted on different server and DB is on different server. This error started occurring after 3 months of Windows Server 2019 migration.
Package executes successfully most of the time, but fails once or twice per day with the following errors. After re-executing the package immediately it succeeds. Error occurs in the below order.
Illegal operation attempted on a registry key that has been marked for deletion
Failed to acquire connection. Connection may not be configured correctly or you may not have the right permissions on this connection.
Upon capturing the "ISServexec.exe" process dump and analyzed through DebugDiag, we came to know the below details.
System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {2206CDB2-19C1-11D1-89E0-00C04FD7A829} failed due to the following error: 800703fa Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA).
System.InvalidOperationException: The .Net Framework Data Providers require Microsoft Data Access Components(MDAC). Please install Microsoft Data Access Components(MDAC) version 2.6 or later.
System.Runtime.InteropServices.COMException: Illegal operation attempted on a registry key that has been marked for deletion.
Microsoft.SqlServer.Dts.Runtime.DtsGenericException: Illegal operation attempted on a registry key that has been marked for deletion.
Note:
Package doesn't have any excel reading operations. Just source table to target table load (both same database).
We have validated the MDAC version in the DB server as 6.3.
App Server: Windows 2019 with .Net framework 4.8 installed.
DB Server: Windows 2019, SQL Server 2019, SSIS v15, .Net framework 4.8.
Package executed using domain service account.
We have triggered the Package through SQL job and Package did not fail at all. Almost 200 executions tested. This failure is random and only fails when store procedure invoked through MVC application.
We have used ProcMon to collect the "ISServexec.exe" logs and only thing we noticed is hive unloaded and no errors.
SQL Profiler didnt even capture the error.
Package is not failing at the same step when this error occurs.
Package logging is configured to write errors in event log, but in event log only "package is failed" information is captured.
Package configured to use Oledb connection type. SQL Native client and MSOLEDB providers are used and error occurs in both the providers.
Package has been upgraded to SQL 2019. Hence we created a new Package in Visual Studio 2019 from scratch and this also fails with same error.
No errors captured in SQL Server extended events.
My Questions:
What are possible ways to validate the service account holds necessary permissions when the above error happens. Is this required ?
Is there any tools that I can use to debug and find the cause of the error or additional information ?
Is this oledb driver issue ?
How to capture any logs at windows server level when package execution happens.
Sorry for the detailed explanation. Any suggestions would be greatly appreciated.

SQL Server Agent job losing data inserting to MySQL via ODBC

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!!!

SSIS project connection to AS400 acquire connection error

I am running an SSIS package created with SSDT for Visual Studio 2015. The package has a project level connection to an AS400 DB, and my admin put a specific username and password into the environment variables on SQL Server 2016. The password is sensitive. I receive intermittent errors when running the package:
I have the package set to restart up to 3 times on failure, and it always runs successfully the next time. Also, it does not always fail on the same container. I am the only user who uses this username/password combination, and it does not expire. The package runs every 10 minutes for 8 hours, but the errors only occur once or twice per day.
I have read numerous posts about running packages in 32 bit mode. I'm not sure if this is what I need to do. I would appreciate any help. Let me know if more detail is required.

SSMS Job Failing - DTSX Package Timeout

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

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

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