Jobs failed with the following errors - sql-server

this is the first time I've tried to schedule a job and I keep getting the error message below. I am using the admin account and checking the 32 bit box. Any ideas on how to remedy? Thanks.
Executed as user: NT Service\SQLAgent$BZMSSQLSERVER. Microsoft (R) SQL
Server Execute Package Utility Version 14.0.2014.14 for 32-bit
Copyright (C) 2017 Microsoft. All rights reserved.
Started: 9:48:28 AM Error: 2019-12-02 09:48:29.50
Code: 0xC0202009
Source: TEST Connection manager "DestinationConnectionExcel"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has
occurred.
Error code: 0x80004005. An OLE DB record is available.
Source: "Microsoft JET Database Engine"
Hresult: 0x80004005 Description: "The Microsoft Jet database engine
cannot open the file ''. It is already opened exclusively by another
user or you need permission to view its data.". End Error
Error: 2019-12-02 09:48:29.50
Code: 0xC00291EC
Source: Preparation SQL Task 1 Execute SQL Task
Description: Failed to acquire connection
"DestinationConnectionExcel". 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: 9:48:28 AM
Finished: 9:48:29 AM Elapsed: 0.641 seconds. The package execution
failed. The step failed.

It may be a permission issue. If you can, change the Agent service account to a Windows AD account with local admin privileges.

Related

The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered (SSIS to populate SQL table from Access source)

I created an SSIS package last week (my first one) using a guide and it parsed correctly and populated my SQL table. I then consulted another guide to create a job to automate the updating of this table but I discovered this morning that this job has been failing. I exported the log and below is the error. Can someone help me pinpoint what the issue is? I think it may be something along the lines of needing to install Microsoft.ACE.OLEDB.12.0, but I really don't know. I initially checked the box to run in 32bit runtime, but it failed on that as well as when I tried unchecking it, in case that is important.
09/03/2019
10:50:14,Update_Equipment_table,Error,1,SERVER,Update_Equipment_table,Update
Equipment Table,,Executed as user: SERVER\SYSTEM. Microsoft (R)
SQL Server Execute Package Utility Version 13.0.1601.5 for 64-bit
Copyright (C) 2016 Microsoft. All rights reserved. Started:
10:50:14 AM Error: 2019-09-03 10:50:15.94 Code: 0xC0209303
Source: Package Connection manager
"\SERVERPATH\ricochet_tanks.mdb"
Description: The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is
not registered. If the 64-bit driver is not installed run the
package in 32-bit mode. Error code: 0x00000000. An OLE DB record is
available. Source: "Microsoft OLE DB Service Components" Hresult:
0x80040154 Description: "Class not registered". End Error Error:
2019-09-03 10:50:15.94 Code: 0xC001002B Source: Package
Connection manager
"\SERVERPATH\ricochet_tanks.mdb"
Description: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered
on the local machine. For more information see
http://go.microsoft.com/fwlink/?LinkId=219816 End Error Error:
2019-09-03 10:50:15.94 Code: 0xC020801C Source: Data Flow Task
OLE DB Source 1 Description: SSIS Error Code
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The
AcquireConnection method call to the connection manager
"\SERVERPATH\ricochet_tanks.mdb"
failed with error code 0xC0209303. There may be error messages posted
before this with more information on why the AcquireConnection method
call failed. End Error Error: 2019-09-03 10:50:15.94 Code:
0xC0047017 Source: Data Flow Task SSIS.Pipeline Description:
OLE DB Source failed validation and returned error code 0xC020801C.
End Error Error: 2019-09-03 10:50:15.94 Code: 0xC004700C
Source: Data Flow Task SSIS.Pipeline Description: One or more
component failed validation. End Error Error: 2019-09-03 10:50:15.94
Code: 0xC0024107 Source: Data Flow Task Description: There
were errors during task validation. End Error DTExec: The package
execution returned DTSER_FAILURE (1). Started: 10:50:14 AM
Finished: 10:50:15 AM Elapsed: 1.422 seconds. The package execution
failed. The step failed.,00:00:01,0,0,,,,0
Here is a screenshot of the job details. I believe because I'm using File system as the package source, I have no option to select server credentials or credential type.
The 64 bit SQL server requires 64 bit ACE driver. If you have the correct driver installed already, need to set the following properties:
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1;
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1;
GO

Why is my SQL Server job using an SSIS package failing but that same SSIS package is running successfully in Visual Studio?

I have created an SSIS package in Visual Studio using the SSIS Import and Export Wizard and when I run it there, it runs successfully. Basically, the SSIS package runs a sql query on my SQL Server database and exports the results into an Excel file.
I have wrapped that package into a SQL Server job and scheduled it to run at a specific time. I noticed that it failed and the log file shows the following error messages:
Microsoft (R) SQL Server Execute Package Utility Version 12.0.5000.0 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 4:44:00 PM Error: 2017-10-12 16:44:00.59 Code: 0xC0016016 Source: ExpExcel Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Error: 2017-10-12 16:44:00.68 Code: 0xC0209303 Source: ExpExcel Connection manager "DestinationConnectionExcel" Description: The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered. If the 64-bit driver is not installed run the package in 32-bit mode. 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-10-12 16:44:00.68 Code: 0xC00291EC Source: Drop table(s) SQL Task 1 Execute SQL Task Description: Failed to acquire connection "DestinationConnectionExcel". Connection may not be configured correctly or you may not have the right permissions on this connection. End Error Error: 2017-10-12 16:44:00.68 Code: 0xC0209303 Source: ExpExcel Connection manager "DestinationConnectionExcel" Description: The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered. If the 64-bit driver is not installed run the package in 32-bit mode. 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-10-12 16:44:00.68 Code: 0xC00291EC Source: Preparation SQL Task 1 Execute SQL Task Description: Failed to acquire connection "DestinationConnectionExcel". 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: 4:44:00 PM Finished: 4:44:00 PM Elapsed: 0.219 seconds. The package execution failed. The step failed.,00:00:00,0,0,,,,0
I am having a hard time trying to figure out how to debug these errors and finding the solution. If my SSIS package is running fine in Visual Studio (installed on that same machine as SQL Server), then why is it failing as a SQL Server job?
I must also add that Microsoft Office is not installed on that machine. Could that possibly be the cause?
You need to enable 32bit on your SQL Job agent step - And if that doesnt work you need to install OLDB ACE Driver for EXCEL
Driver link:
Microsoft ACE Driver
And as others point out. Your project protection level needs to be the same as the package protection level. You can change that under properties of the package and project.
How to set 32bit on step in SQL Job Agent on step
When you created the package it probably got set up with a User Key protection level. Meaning that any sensitive information (passwords) get encrypted with your user key. By extension, this means only you can really open/run the package. Your best bet (requiring the least amount of effort in my opinion) is to encrypt the package with a password and then you can specific that password as you are creating your SQL Agent job.

SSIS integrated with SQL Agent

I am trying to run an SSIS job with SQL Agent job (Management Studio 2016). The SSIS job is as follows Source: Oracle to Destination: Excel file on another a shared folder(network). Without setting up a proxy ( it failed on me several times) I am getting this message.
1: Config file is also attached to the Job
Thanks
"Message
Executed as user: OMH\Istcrmt. Microsoft (R) SQL Server Execute Package Utility Version 13.0.1601.5 for 32-bit Copyright (C) 2016 Microsoft. All rights reserved. Started: 12:43:17 PM Error: 2016-12-01 12:43:18.35 Code: 0xC0202009 Source: Package Connection manager "Excel Connection Manager" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "'S:\Shared\SFD\DAT Reporting\Rich Test.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.". End Error Error: 2016-12-01 12:43:18.35 Code: 0xC020801C Source: Data Flow Task Excel Destination [2] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" 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 Error: 2016-12-01 12:43:18.35 Code: 0xC0047017 Source: Data Flow Task SSIS.Pipeline Description: Excel Destination failed validation and returned error code 0xC020801C. End Error Error: 2016-12-01 12:43:18.35 Code: 0xC004700C Source: Data Flow Task SSIS.Pipeline Description: One or more component failed validation. End Error Error: 2016-12-01 12:43:18.35 Code: 0xC0024107 Source: Data Flow Task Description: There were errors during task validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 12:43:17 PM Finished: 12:43:18 PM Elapsed: 0.594 seconds. The package execution failed. The step failed."
On the basis of your error code,anyone can guess the error.
Actually you have not set the file path correctly in connection Manager.
Please set the path in Connection Manager with your server Name(Network Location path), please check below path for your reference:
"\\10.160.25.255\S$\Shared\SFD\DAT Reporting\Rich Test.xlsx"
You can used Server IP (10.160.25.255 for example) or host name (WKWIN9628520) instead of IP , then definitely this error won't come again.

BIDS 2008 SSIS Package Data Flow Task fails validation and returns "VS_ISBROKEN" Error

A BIDS 2008 SSIS package that I am working is failing validation when it reaches any Data Flow Task in the package. I am able to run the SSIS package within BIDS 2008 on my computer locally. When I run the SSIS package through an SQL Agent Job, the package fails with the error message below. I have researched error code 0x80004005 and error code 0xC004706B through Google searches, but have not found anything that is of use.
The SSIS package in question is one of several SSIS packages that run together in the same SQL Agent Job. The other SSIS packages in the original SQL Agent Job all are able to run successfully. This leads me to believe that the SQL Agent Service Account and Proxy Account are configured with the appropriate permissions. A DBA was able to confirm that the Service Account and Proxy Account do have the appropriate permissions.
The SQL Agent Job runs the SSIS package using the Operating System (CmdExec) type and the SSIS package has Run64BitRuntime set to FALSE so the SSIS Package is running under the 32-bit runtime.
For debugging purposes, I recreated the Data Flow Task, Database Connections, and related source and destination tasks in a new SSIS Package from the original SSIS package. The debugging SSIS package is able to run locally on my computer, but fails when I try to run using a new SQL Agent Job setup exactly like the original SQL Agent Job.
I have also use different Database Connections such as Native OLE DB\SQL Server Native Client 10.0, 10.1, 11.1, and Native OLE DB\Microsoft OLE DB Provider for SQL Server. All of which have failed when I test the debugging SSIS package
I have verified that the metadata for the OLE DB Source and Destinations match the datatypes and lengths in the SQL Server Database tables. I have verified that the stored procedure used by the OLE DB Source task in the Data Flow Task work when ran on SQL Server Management Studio and the Service Account has permissions to run the stored procedure.
I think that is every bit of information that I can recall from working on troubleshooting this issue.
Has anyone else come across this error before? Any possible solutions to attempt?
Any help is welcomed!
Error Message:
Executed as user: domain\SQLAgentServiceAccount. Microsoft (R) SQL Server Execute Package Utility Version 10.50.2500.0 for 64-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 1:37:09 PM
Error: 2014-08-14 13:37:09.94 Code: 0xC0202009 Source: Data Flow Task - OLEDB Source [1]
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: "Syntax error or access violation".
End Error
Error: 2014-08-14 13:37:09.94 Code: 0xC004706B Source: Data Flow Task SSIS.Pipeline
Description: "component "OLEDB Source" (1)" failed validation and returned validation status "VS_ISBROKEN".
End Error
Error: 2014-08-14 13:37:09.94 Code: 0xC004700C Source: Data Flow Task SSIS.Pipeline
Description: One or more component failed validation.
End Error
Error: 2014-08-14 13:37:09.94 Code: 0xC0024107 Source: Data Flow task
Description: There were errors during task validation.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 1:37:09 PM Finished: 1:37:09 PM Elapsed: 0.219 seconds. Process Exit Code 1.
The step failed.
I found the this solution :
Ensure that the connection string in Connection Manager has "Provider=SQLNCLI11.1; Persist Security Info=True; Auto Translate=False;"
I did it and it worked for me on Hyperscale / SQL Server.
This is kind of strange error that I got a while ago and I used the following to resolve the problem:
Run command prompt as Administrator
Type the following command and hit Enter: regsvr32 jscript.dll
Type the following command and hit Enter: regsvr32 vbscript.dll
The solution to the problem was that the service account that is running the SQL Agent job did not have execute permissions on the stored procedure being executed through the Data Flow Task. Gave the service account execute permissions and the SSIS package was able to successfully execute.

SSIS package can be run using "Execute Package Utility" but not in an agent job?

I imported a SSIS package, which pump a local Sql server table to a remote Sql server, into MSDB SSIS storage and I can execute the package by right clicking and executing. However, it raises following error when I tried to run it in an agent job. The destination connection uses an Sql login on the remote Sql server.
Executed as user: Domain\MyLogin. Microsoft (R) SQL Server Execute Package Utility Version 10.0.4000.0 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 6:04:09 PM Error: 2013-05-01 18:04:09.75 Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Error: 2013-05-01 18:04:10.31 Code: 0xC0202009 Source: Reload_Table Connection manager "DestinationConnectionOLEDB" 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 'QA_USERS'.". End Error Error: 2013-05-01 18:04:10.31 Code: 0xC020801C Source: Data Flow Task 1 Destination - tmp_test [34] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "DestinationConnectionOLEDB" 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 Error: 2013-05-01 18:04:10.31 Code: 0xC0047017 Source: Data Flow Task 1 SSIS.Pipeline Description: component "Destination" (34) failed validation and returned error code 0xC020801C. End Error Error: 2013-05-01 18:04:10.31 Code: 0xC004700C Source: Data Flow Task 1 SSIS.Pipeline Description: One or more component failed validation. End Error Error: 2013-05-01 18:04:10.31 Code: 0xC0024107 Source: Data Flow Task 1 Description: There were errors during task validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 6:04:09 PM Finished: 6:04:10 PM Elapsed: 0.766 seconds. The package execution failed. The step failed.
This happened to me before, and it is because you are using windows authentication in the SSIS package, that means that when you run it, it will use your Windows user, when you run it from the server it will use the server's user.
In other words, avoid using windows authentication in your SSIS and change it to a regular SQL user, that will fix your issues.

Resources