SSIS Package is executing successfully, While job with same package is failing - sql-server

I have created a SSIS package for tickting system. It loads the data from Excel to Staging table then to production table.
The steps of the package are as follows:
1. Truncate Staging table.
2. Load excel to staging table.
3. Call a procedure that is responsible for data transformation as well data loading from staging to prod table.
I have imported the package on SQL Server integration services.
The package is executing succesfully. But when i ran the job with the package I got the following error.
Source: TicketWeeklyLoad Connection manager "Ticket Weekly Sheet 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: "The Microsoft Jet database engine cannot open the file 'C:\Users\MyUser\Desktop\CMS\DATA\SSIS\File.xls'.
It is already opened exclusively by another user, or you need permission to view its data.".
End Error Error: 2015-04-06 16:46:53.40 Code: 0xC020801C
Source: Load Weekly Excel to Tct_Stg Ticket Weekly Source Excel Sheet [103]
Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
The AcquireConnection method call to the connection manager "Ticket Weekly Sheet 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: 2015-04-06 16:46:53.40 Code: 0xC0047017 Source: Load Weekly Excel to Ticket_Stg SSIS.Pipeline
Description: Ticket Weekly Source Excel Sheet failed validation and returned error code 0xC020801C.
End Error Error: 2015-04-06 16:46:53.40 Code: 0xC004700C Source: Load Weekly Excel to Ticket_Stg SSIS.Pipeline
Description: One or more component failed validation. End Error Error: 2015-04-06 16:46:53.40
Code: 0xC0024107 Source: Load Weekly Excel to Ticket_Stg
Description: There were errors during task validation. End Error DTExec: The package execution returned DTSER_FAILURE (1).
Started: 4:46:53 PM Finished: 4:46:53 PM Elapsed: 0.313 seconds. The package execution failed. The step failed.
In Addition Run64BitRuntime set to false and the package is also using 32 bit runtime that i have set using Executing Optins tab in the Package properties.
File is closed and i do have the permission to open it.
I am using windows 8, SQL server 2014 and Visual Stdio 2010 for SSIS.
Any suggestion would be really helpful.

Job was failing because the Network Service was set as Built-In account in SQL Server Agent. But the Excel file was on my local system. Once I selected Local System as Built-in account job ran successfully.

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

SSIS Lookup Transformation error: The EXECUTE permission was denied on the object 'sp_describe_undeclared_parameters'

I'm upgrading SSIS packages from SQL Server 2008 R2 to 2017. After upgrading one of the packages, the parameterized query in the Advanced tab of a Lookup Transformation is now throwing a validation error. It is possible that this is the only package in the collection that uses a Partial Cache, since I couldn't find any successfully upgraded examples to compare it to.
When I tried to run the package, it logged these errors:
Error: 2019-02-11 10:49:40.11
Code: 0xC0202009
Source: Anonymized DFT [209]
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 11.0" Hresult: 0x80004005 Description: "The EXECUTE permission was denied on the object 'sp_describe_undeclared_parameters', database 'mssqlsystemresource', schema 'sys'.".
End Error
Error: 2019-02-11 10:49:40.15
Code: 0xC020824C
Source: Anonymized DFT [209]
Description: OLE DB error occurred while loading column metadata. Check SQLCommand and SqlCommandParam properties.
End Error
Error: 2019-02-11 10:49:40.18
Code: 0xC004706B
Source: Anonymized DFT SSIS.Pipeline
Description: "Anonymized DFT" failed validation and returned validation status "VS_ISBROKEN".
End Error
Error: 2019-02-11 10:49:40.22
Code: 0xC004700C
Source: Anonymized DFT SSIS.Pipeline
Description: One or more component failed validation.
End Error
Error: 2019-02-11 10:49:40.27
Code: 0xC0024107
Source: Anonymized DFT
Description: There were errors during task validation.
End Error
I was hoping to just re-map the parameters, but I get about the same set of errors by trying to open the Parameters dialog on the Advanced tab of the Lookup Transformation.
The obvious answer, based on the messaging, is that it's a permissions issue, but according to the documentation for sp_describe_undeclared_parameters:
Permissions
Requires permission to execute the #tsql argument.
Both I and the service account that the job runs under have permission to execute the parameterized query.
I did a side-by-side comparison of the both the Lookup Transformations and their corresponding Properties windows between the 2008 R2 package, which runs fine on the 2008 R2 server, and the new 2017 package. The only new property value I found was TreatDuplicateKeysAsError, but changing that has no effect on my situation.
Looking at the Advanced Editor, the column references in the ParameterMap appear to be correct, but the query isn't picking them up.
Is there more to the permissions issue than I'm seeing, or is there something else that I'm missing here?
I can't point to a specific source that suggested this as a possibility, but in the end I added an additional Connection Manager pointing to the same server and database as the original, but instead of using the SQL Server Native Client 11.0 provider, I changed it to Microsoft OLE DB Provider for SQL Server.
Boom. Validation error cleared; package is running.
While that's a solution, it's not a explanation, so if anyone wants to chime in, have at it. I've wasted most of a day chasing this ghost, so for the time being I'm going to take my running package and call it good enough for a Tuesday.

SSIS OLEDB source error - Opening a rowset for SQL Server View failed

We have an SSIS package where we have used SQL server view as a data source by selecting data access mode as Table or view. The package has been scheduled to run daily using SQL Server Job. Most of the time the job gets executed without any issue, but once in a while, we are getting the below-given error.
Microsoft (R) SQL Server Execute Package Utility Version 10.50.6560.0
for 32-bit Copyright (C) Microsoft Corporation 2010. All rights
reserved. Started: 6:08:03 AM Error: 2019-02-06 06:10:56.02
Code: 0xC0202009 Source: Load Package OLE DB Source [1]
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has
occurred. Error code: 0x80004005. End Error Error: 2019-02-06
06:10:56.40 Code: 0xC02020E8 Source: Load Package OLE DB
Source [1] Description: Opening a rowset for "[ss].[someView]"
failed. Check that the object exists in the database. End Error
Error: 2019-02-06 06:10:56.80 Code: 0xC004701A Source: Load
Package SSIS.Pipeline Description: component "OLE DB Source" (1)
failed the pre-execute phase and returned error code 0xC02020E8.
The view does exist in the database. What could be the root cause of this issue?

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.

Resources