Sql Server Agent Job Fails - sql-server

I job that executes the package located on server. The package has logging set up. When I disable that logging it executes fine as expected but when I run that with logging it throws an error.
Information:
Job and Package is located on same server.
User have permission to execute the job.
Logging connections are coming from the different server.
Error:
Executed as user: VHRDEVLHQ3379\SYSTEM. ....50.2500.0 for 64-bit
Copyright (C) Microsoft Corporation 2010.
All rights reserved.
Started: 5:10:13 PM
Error: 2013-11-25 17:10:14.61
Code: 0xC0202009
Source: Package Connection manager "HRPConfig"
Description: SSIS Error Code DTS_E_OLEDBERROR.
An OLE DB error has occurred. Error code: 0x80040E4D.
An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0"
Hresult: 0x80040E4D
Description: "Login failed for user 'USER'.".
End Error
Error: 2013-11-25 17:10:14.69
Code: 0xC0202009
Source: Package Connection manager "Logging"
Description: SSIS Error Code DTS_E_OLEDBERROR.
An OLE DB error has occurred.
Error code: 0x80040E4D.
An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0"
Hresult: 0x80040E4D
Description: "Login failed for user 'USER'.".
End Error
Error: 2013-11-25 17:10:14.69
Code: 0xC020801C
Source: Package Log provider "SSIS log provider for SQL Server"
Description: SSIS
Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
The AcquireConnection method call to the connection manager "Logging" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. COM error object information is available.
Source: "Package" error code: 0xC0202009
Description: "SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0"
Hresult: 0x80040E4D Description: "Login failed for user 'USER'.". ".
End Error
Error: 2013-11-25 17:10:14.71
Code: 0xC0202009
Source: Package Connection manager "HRPConfig"
Description: SSIS Error Code DTS_E_OLEDBERROR.
An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0"
Hresult: 0x80040E4D
Description: "Login failed for user 'USER'.".
End Error
Error: 2013-11-25 17:10:14.79
Code: 0xC0202009
Source: Package Connection manager "Logging"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0"
Hresult: 0x80040E4D
Description: "Login failed for user 'USER'.".
End Error
Error: 2013-11-25 17:10:14.79
Code: 0xC020801C
Source: Package Log provider "SSIS log provider for SQL Server"
Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Logging" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. COM error object information is available. Source: "Package" error code: 0xC0202009 Description: "SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred.
Error code: 0x80040E4D. An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0"
Hresult: 0x80040E4D
Description: "Login failed for user 'USER'.". ".
End Error
Error: 2013-11-25 17:10:18.21
Code: 0xC0202009
Source: Package Connection manager "Logging"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0"
Hresult: 0x80040E4D Description: "Login failed for user 'USER'.".
End Error
Error: 2013-11-25 17:10:18.27
Code: 0xC0202009
Source: Package Connection manager "Logging"
Description: SSIS Error Code DTS_E_OLED... The package execution fa... The step failed.

Does your SQL Server Agent Account executing the job have write permissions to the logging tables? That sounds like the issue.

Related

How to resolve Exception from HRESULT: 0xC0202009 in SSIS

I have an SSIS package that consists of data flow tasks and contains an OLEDB source from DB2 and OLDB Target. The provider is microsoft oledb for db2..This used to run fine, but now I've got an error as shown below.
Exception from HRESULT: 0xC0202009
Error atxx [OLE DB Source [478]]: SSIS Error Code DTS_E_OLEDBERROR.
An OLE DB error has occurred. Error code: 0x80040E14.
An OLE DB record is available. Source: "Microsoft DB2 OLE DB Provider"
Hresult: 0x80040E14 Description: ""DATAWAREHOUSEUSRچBIN"
does not have the privilege to perform operation "".".

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005

I am running some scheduled jobs in SQL server and they were running fine until yesterday and gave me the error as given below.
Message
Executed as user: GONDWANA\svc_kib_sql01. Microsoft (R) SQL Server
Execute Package Utility Version 10.50.1600.1 for 32-bit Copyright
(C) Microsoft Corporation 2010. All rights reserved. Started:
3:55:44 PM Error: 2019-12-24 15:56:00.43 Code: 0xC0202009
Source: ProdBlockImportOP_CSV Connection manager "DataShed_Database"
Description: 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 10.0" Hresult: 0x80004005
Description: "Login timeout expired". An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005
Description: "A network-related or instance-specific error has
occurred while establishing a connection to SQL Server. Server is not
found or not accessible. Check if instance name is correct and if SQL
Server is configured to allow remote connections. For more information
see SQL Server Books Online.". An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005
Description: "Named Pipes Provider: Could not open a connection to SQL
Server [53]. ". End Error Error: 2019-12-24 15:56:00.43 Code:
0xC00291EC Source: Create Temp Import Table
(tblProdBlockImport_OP) Execute SQL Task Description: Failed to
acquire connection "DataShed_Database". Connection may not be
configured correctly or you may not have the right permissions on this
connection. End Error DTExec: The package execution returned
DTSER_FAILURE (1). Started: 3:55:44 PM Finished: 3:56:00 PM
Elapsed: 17.125 seconds. The package execution failed. The step
failed.
Could you please help me how to fix it?

Facing Login Timeout issues in SSIS Package

SSIS jobs are getting failed frequently with the below error message. Although it restarts and runs successfully in the next run, SSIS jobs are getting failed sporadically in the subsequent runs. These issues were happening after our SQL Server was patched with KB4338824 and KB4338815 updates. Any help?
Error: 2018-07-19 23:38:22.52 Code: 0xC0202009 Source:
ParallelExport Connection manager "XXXXConnectionString"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has
occurred. Error code: 0x80004005. An OLE DB record is available.
Source: "Microsoft OLE DB Provider for SQL Server" Hresult:
0x80004005 Description: "Login timeout expired". End Error Error:
2018-07-19 23:38:22.52 Code: 0xC00291EC Source: Get Export List
to Process Execute SQL Task Description: Failed to acquire
connection "XXXXConnectionString". Connection may not be configured
correctly or you may not have the right permissions on this
connection. End Error

Package upgraded from ssis2005 to ssis2008r2 not executing from sql agent job

I upgraded a set of ssis packages from 2005 to 2008r2. the corresponding database has ben upgraded from sql2005 to sql2014. The packages run fine from BIDS. But when i execute them from new sql server agent job ( i have checked the use-32 bit runtime check box)., the package fails with error message as
Executed as user: ADMIN\SvcSQL13DVMDDEW03. Microsoft (R) SQL Server Execute Package Utility Version 10.50.6000.34 for 32-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 11:57:06 Error: 2017-07-27 11:57:08.96 Code: 0xC0209302 Source: CBSBankRec50244961Transform Connection manager "TempRBGLINT" Description: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_ERROR. The requested OLE DB provider SQLNCLI10.1 is not registered. Error code: 0x00000000. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered". End Error Error: 2017-07-27 11:57:08.97 Code: 0x00000008 Source: Check Database Connection Description: The script returned a failure result. End Error Error: 2017-07-27 11:57:24.55 Code: 0xC0202009 Source: CBSBankRec50244961Transform Connection manager "RBGLINT" Description: 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 10.0" Hresult: 0x80004005 Description: "Login timeout expired". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Named Pipes Provider: Could not open a connection to SQL Server [2]. ". End Error Error: 2017-07-27 11:57:24.57 Code: 0xC00291EC Source: Log Package 'Started' Execute SQL Task Description: Failed to acquire connection "RBGLINT". Connection may not be configured correctly or you may not have the right permissions on this connection. End Error Error: 2017-07-27 11:57:40.21 Code: 0xC0202009 Source: CBSBankRec50244961Transform Connection manager "RBGLINT" Description: 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 10.0" Hresult: 0x80004005 Description: "Login timeout expired". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Named Pipes Provider: Could not open a connection to SQL Server [2]. ". End Error Error: 2017-07-27 11:57:40.22 Code: 0xC00291EC Source: Log Package 'Failure' Execute SQL Task Description: Failed to acquire connection "RBGLINT". Connection may not be configured correctly or you may not have the right permissions on this connection. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 11:57:06 Finished: 11:57:40 Elapsed: 34.102 seconds. The package execution failed. The step failed.
The provider used in the config files for the packages is SQLNCLI10.1 . in the ssis package there is a ole db connection manager - RBGLINT. Just for information - this was automatically upgraded from sql native client \oledb provider to sql native client \ ole db provider 10.0. in the connection manager. I do not see this causing the issue. But just for information.
Any inputs?
From the error message you provided the main error is:
The requested OLE DB provider SQLNCLI10.1 is not registered
From the link below you there is 2 methods for solving this issue:
The requested OLE DB provider SQLNCLI10.1 is not registered
you need to do is to open the connection manager/connection string and edit it to use Native Client 11.0 which is what comes as default with SSIS 2014
Another alternative is to install the Native Client 10.0 from SSIS 2008 installable:
https://blogs.iis.net/rickbarber/installing-sql-server-native-client-10-0
http://www.keepitsimpleandfast.com/2013/04/the-sqlncli10-provider-is-not.html

Package deployment error - change connection string to SQLNCLI10 or find and install support for SQLNCLI.1?

I tried to run a package under SQL server agent. Most of my error messages indicate that I have to - change connection string to SQLNCLI10 or find and install support for SQLNCLI.1.
I need to know the meaning of this error. Is it as simple as installing a driver and registering it or is it more than just drivers. Could there be non-driver related reasons for this problem ? I changed the provider as mentioned in the error and now i get new errors, which are given after 1st error.
Thanks.
Full error -
Code: 0xC0209302 Source: MyPackage Connection manager "MyOleDBConnection" Description: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_ERROR. The requested OLE DB provider SQLNCLI.1 is not registered.
Error code: 0x00000000. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
End Error
Code: 0xC020F42A Source: MyPackage Connection manager "MyOleDBConnection" Description: Consider changing the PROVIDER in the connection string to SQLNCLI10 or
visit http://www.microsoft.com/downloads to find and install support for SQLNCLI.1.
End Error
Code: 0xC020801C Source: MyPackage Log provider "SSIS log provider for SQL Server" Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
The AcquireConnection method call to the connection manager "MyOleDBConnection" failed with error code 0xC0209302.
There may be error messages posted before this with more information on why the AcquireConnection method call failed.
COM error object information is available. Source: "MyPackage" error code: 0xC0209302
Description: "Consider changing the PROVIDER in the connection string to SQLNCLI10 or
visit http://www.microsoft.com/downloads to find and install support for SQLNCLI.1. ".
End Error
Code: 0xC0209302 Source: MyPackage Connection manager "MyOleDBConnection" Description: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_ERROR.
The requested OLE DB provider SQLNCLI.1 is not registered. Error code: 0x00000000.
An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
End Error
Code: 0xC020F42A Source: MyPackage Connection manager "MyOleDBConnection" Description: Consider changing the PROVIDER in the connection string to SQLNCLI10 or
visit http://www.microsoft.com/downloads to find and install support for SQLNCLI.1.
End Error
Code: 0xC020801C Source: DFT Insert Execution Log OLE_DST Insert SSIS Execution Log [25] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
The AcquireConnection method call to the connection manager "MyOleDBConnection" failed with error code 0xC0209302.
There may be error messages posted before this with more information on why the AcquireConnection method call failed.
End Error
Code: 0xC0047017 Source: DFT Insert Execution Log SSIS.Pipeline Description: component "OLE_DST Insert SSIS Execution Log" (25) failed validation and returned error code 0xC020801C.
End Error
Code: 0xC004700C Source: DFT Insert Execution Log SSIS.Pipeline Description: One or more component failed validation.
End Error
Code: 0xC0024107 Source: DFT Insert Execution Log Description: There were errors during task validation.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
One more error -
Code: 0xC0202009 Source: MyPackage Connection manager "MyOLEDBConnection" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E4D Description: "Login failed for user 'MyUser'.".
End Error
Code: 0xC020801C Source: MyPackage Log provider "SSIS log provider for SQL Server" Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection
method call to the connection manager "MyOLEDBConnection" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method
call failed. COM error object information is available. Source: "MyPackage" error code: 0xC0202009 Description: "SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E4D Description: "Login failed for user 'MyUser'.". ".
End Error
Code: 0xC0202009 Source: MyPackage Connection manager "MyOLEDBConnection" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E4D Description: "Login failed for user 'MyUser'.".
End Error
Code: 0xC020801C Source: DFT Insert Execution Log OLE_DST Insert SSIS Execution Log [25] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
The AcquireConnection method call to the connection manager "MyOLEDBConnection" failed with error code 0xC0202009. There may be error messages posted before this with more information
on why the AcquireConnection method call failed.
End Error
Code: 0xC0047017 Source: DFT Insert Execution Log SSIS.Pipeline Description: component "OLE_DST Insert SSIS Execution Log" (25) failed validation and returned error code 0xC020801C.
End Error
Code: 0xC004700C Source: DFT Insert Execution Log SSIS.Pipeline Description: One or more component failed validation.
End Error
Code: 0xC0024107 Source: DFT Insert Execution Log Description: There were errors during task validation.
End Error
Understanding the problem
The SQL Server Native Client provider is SQLNCLI* in an OLE DB Connection String.
2005 uses SQLNCLI.1
2008 uses SQLNCLI10
2012 uses SQLNCLI11
As of this posting, there is not a SQLNCLI12 included with the CTP2 release of SQL Server 2014.
These providers can generally talk to previous versions of SQL Server but version forwardness is less probable (with the exception of SQLNCLI11 communicating with 2014).
Root cause
You have an OLE DB Connection string using a provider that does not exist on that machine. Perhaps you built the package in a 2005 format but are running it on a 2008 instance. At any rate, your connection strings in the format of
Provider=SQLNCLI.1;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
would need to be updated to match the provider on the machine
Provider=SQLNCLI10;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
This can generally be addressed through judicious use of Configurations

Resources