Running an SSIS 2008R2 Package from a SQL Server 2012 Job - sql-server

I have an SSIS Package that was created in SQL Server 2008 R2. When I attempt to execute the package using the SQL Server 2008 R2 execute package utility, I receive no errors. When I try the same with the SQL Server 2012 execute package utility, I get these errors:
Error: To run a SSIS package outside of SQL Server Data Tools you
must install Derived Column of Integration Services or higher.
Error: To run a SSIS package outside of SQL Server Data Tools you
must install Conditional Split of Integration Serivces or higher.
Error: To run a SSIS package outisde of SQL Server Data Tools you
must install SSIS Log Provider For SQL Server of Integration Services
or higher.
--****
When I attempt to run the package with a SQL Server 2012 Job, I receive this error:
Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server
Execute Package Utility Version 11.0.2100.60 for 32-bit Copyright
(C) Microsoft Corporation. All rights reserved. Started: 10:20:56
AM Error: 2016-08-31 10:20:56.22 Code: 0xC0011007 Source:
{F21F6C0C-91E9-4444-B3C2-8BD4670D8953} Description: Unable to
load the package as XML because of package does not have a valid XML
format. A specific XML parser error will be posted. End Error Error:
2016-08-31 10:20:56.22 Code: 0xC0011002 Source:
{F21F6C0C-91E9-4444-B3C2-8BD4670D8953} Description: Failed to
open package file "C:\IHA\IHA_HOSPF105.dtsx" due to error 0x80070005
"Access is denied.". This occurs when loading a package and the file
cannot be opened or loaded correctly into the XML document. This can
be the result of specifying an incorrect file name when calling
LoadPackage or the specified XML file has an incorrect format. End
Error Could not load package "C:\IHA\IHA_HOSPF105.dtsx" because of
error 0xC0011002. Description: Failed to open package file
"C:\IHA\IHA_HOSPF105.dtsx" due to error 0x80070005 "Access is
denied.". This occurs when loading a package and the file cannot be
opened or loaded correctly into the XML document. This can be the
result of specifying an incorrect file name when calling LoadPackage
or the specified XML file has an incorrect format. Source:
{F21F6C0C-91E9-4444-B3C2-8BD4670D8953} Started: 10:20:56 AM
Finished: 10:20:56 AM Elapsed: 0.016 seconds. The package could not
be found. The step failed.
Is it possible to configure the SQL Server Job to point to the SQL Server 2008 R2 execute package utility? In the 'steps' section of the Job, is there a way that I can change the 'Command Line' to do this?
Also, I noticed that the machine I am running the Jobs/packages from has the SQL Server Integration Services 10.0 service installed. I don't see version 11.0. If I had that, I would assume that this would also correct the problem. Is that the case?

Related

Problem trying to run SSIS package with Oracle Connection Attunity

I'm having the following issue:
I have an SSIS package that connects to an oracle DB using Attunity Connection Manager.
It does connect in my local pc (to a remote oracle db server) and extracts and all, seems to work.
The problem comes when I load it to SQL server to be run as a Job.
I have ran other jobs so the setup is proper, set to run with 32 bit runtime, loading as a file system type.
but when I try to execute the job it gives the following error:
Executed as user: username. Microsoft (R) SQL Server Execute Package
Utility Version 12.0.2548.0 for 32-bit Copyright (C) Microsoft
Corporation. All rights reserved. Started: 9:39:28 PM Error:
2019-09-27 21:39:28.90 Code: 0xC0010018 Source: Package
Description: Error loading value "
Now, as it runs locally, I believe that it might be related with something in the SQL server where I deploy the package so I'll give some information about the setup and some notes:
When running using the Native OLE DB source from SSIS it works (but I want to use the attunity as I read is faster)
Server version is: Microsoft SQL Server 2014 - 12.0.2548.0 (X64) on Windows NT 6.3 - Microsoft SQL Server Developer (64-bit)
I tried to install the Attunity components from here: https://www.microsoft.com/en-us/download/details.aspx?id=55179 but both in my local computer as in the server I get an error saying that it does's find SQL Server installed, however installation seems to finish succesfully after this screenshot below:
(I do get some error registering dlls:
---------------------------
Microsoft Connector for Oracle by Attunity
---------------------------
An error occurred during registration of:
"C:\Program Files\Attunity\Microsoft Connector for Oracle\50\ENU\AttunitySSISOraAdapters.dll"
---------------------------
An error occurred during registration of:
"C:\Program Files\Attunity\Microsoft Connector for Oracle\50\ENU\AttunitySSISOraConnections.dll"
---------------------------
An error occurred during registration of:
"C:\Program Files\Attunity\Microsoft Connector for Oracle\50\bin32\ENU\AttunitySSISOraAdapters.dll"
---------------------------
An error occurred during registration of:
"C:\Program Files\Attunity\Microsoft Connector for Oracle\50\bin32\ENU\AttunitySSISOraConnections.dll"
---------------------------
and after it
I'm running Visual Studio 2017 Professional 15.9.16 with the following among others:
SQL Server Data Tools 15.1.61906.03120 Microsoft SQL Server Data
Tools
SQL Server Integration Services Microsoft SQL Server Integration
Services Designer Version 14.0.3002.113
Oracle Developer Tools for Visual Studio 12.2.0.1.0 Oracle Developer
Tools for Visual Studio Copyright (c) 2005, 2017
Please let me know if I'm missing information to help pinpoint the problem.
I think I might be missing a component but I don't really know what.
UPDATE: I changed the TargetServerVersion in the package properties from SQL Server 2017 to 2014 (the version I have installed) and I'm getting this error now:
Error: 2019-09-30 17:53:13.20 Code: 0x000002C0 Source: Package Connection manager "Oracle Connector 1" Description: OCI error encountered. ORA-12154: TNS:could not resolve the connect identifier specified End Error
Error: 2019-09-30 17:53:13.20 Code: 0x0000020F Source: Data Flow Task 1 1 Oracle Source [343] Description: The AcquireConnection method call to the connection manager Oracle Connector 1 failed with error code 0x80004005. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End Error
Error: 2019-09-30 17:53:13.20 Code: 0xC0047017 Source: Data Flow Task 1 1 SSIS.Pipeline Description: Oracle Source failed validation and returned error code 0x80004005. End Error
Error: 2019-09-30 17:53:13.20 Code: 0xC004700C Source: Data Flow Task 1 1 SSIS.Pipeline Description: One or more component failed validation. End Error
Error: 2019-09-30 17:53:13.20 Code: 0xC0024107 Source: Data Flow Task 1 1 Description: There were errors during task validation. End Error
DTExec: The package execution returned DTSER_FAILURE (1). Started: 5:52:41 PM Finished: 5:53:13 PM Elapsed: 32.125 seconds. The package execution failed. The step failed.
UPDATE 2
I have uninstalled all I had and installed only the V3 version of the Attunity Connection Manager, still getting the error from above. At this point I don't know what could be happening.
It works when I run it from my Visual Studio (2017, with all connection managers pointing to the servers) but then when I schedule it on the SQL Server Agent it give the error shown, Also, it does work well when I use OLE DB Manager, the issue comes when trying to use the Oracle Source (from Attunity)
I'm also using the Connection manager set with format: host:port/ServiceName
I'm thinking I might have something badly set on the server? on terms of the Oracle setting? I have the following:
TNS_ADMIN: C:\Oracle\product\product\11.2.0\client_64bit\network\admin
I don't have more set, shall I have something more?
You missed the explanation about getting the correct version for your version of SQL Server, perhaps. Also the part about
Microsoft Connector Version 4.0 for Oracle The Microsoft Connector for Oracle is a set of managed components for transferring data from or to an Oracle database. The component is designed to be used with the Enterprise and Developer editions of SQL Server 2016 Integration Services and will only operate in those environments. To install the component, run the platform-specific installer for x86 or x64 computers respectively. Read the installation topic in the Help file for installation prerequisites and additional information.
Also:
Microsoft Connector Version 5.0 for Oracle The Microsoft Connector for Teradata is a set of managed components for transferring data from or to Oracle database. The component is designed to be used with the Enterprise and Developer editions of SQL Server 2017 Integration Services and will only operate in those environments. To install the component, run the platform-specific installer for x86 or x64 computers respectively. Read the installation topic in the Help file for installation prerequisites and additional information.
Instead, try the Attunity V3 drivers that can be found here:
The error was being caused on the package trying to run in 32 bit mode. I changed the package settings to 64bit and the SQL Agent settings to run in 64 bits and it started running, it works perfect now :)

How to run a SSIS Package from Visual Studio Environment?

I am running SSIS Package (SSDT) from Visual Studio 2017 Environment, I am getting the error as follows :
Error: at Data Flow Task, SQL Server Destination [48]: Unable to bulk copy data. You may need to run this package as an administrator.
Error: at Data Flow Task, SSIS.Pipeline: SQL Server Destination failed
Per online forum, i ran this file DTExecUI.exe to execute the package. I am getting error as follows :-
Error: To run a SSIS package outside of SQL Server Data Tools you
must install Standard Edition of Integration Services of higher.
Task Execute Process Task failed
VS 2017 Professional Edition,SQL 2017 Express Edition (64 Bit)
How to run a SSIS Package from Visual Studio Environment which will allow me to debug?
Run visual studio with elevated permission (Administrator)
you need to select Run as administrator

error Failed to decrypt protected XML node "DTS:Password" and SQL Server Data Tools Standard Edition

I have a SSIS package for getting data from a webservice and insert to the SQL Server(using OLEDB connection with sql user and mu protection level is a EncryptSensitiveWithUserKey).
but I would like to add the agent job on SQL Ad-hoc server by using a filesystem package source.
So, the job agent will execute on SQL Ad-Hoc Server but inside a package will getting data from a webservice and import to another server.
I found error when I execute agent job on SQL SERVER like this:
#
Code: 0xC0016016 Source: trade0010_gg 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: 2018-07-10 02:12:22.33
Code: 0xC000F427 Source: Web Service Task Description: To run a SSIS package outside
of SQL Server Data Tools you must install Standard Edition of Integration Services or higher.
End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 2:12:20 AM
Finished: 2:12:22 AM Elapsed: 1.625 seconds. The package execution failed. The step failed.
#
I'm not sure that is a EncryptSensitiveWithUserKey issue or a Data tool Edition issue? because I test another package it's just only insert csv to SQL SERVER Destination by using a agent job(filesystem package source) on SQL Server Ad-hoc and it works.
My Ad-hoc SQL SERVER is SQL SERVER 2017 and Data tool 2017 also.
My Destination SQL SERVER is SQL SERVER 2016 and DATA tool 2012.
Could someone please help me with this problem.
Thank you so much
I'm not sure which error is the issue either, but here is how to deal with them:
EncryptSensitiveWithUserKey: A way to avoid a lot of headaches with sensitive data is to change the encryption level to Don't save sensitive. Then, in SQL Agent, configure the passwords for your connections.
Edition of Integration Services: Make sure that you have standard or enterprise edition installed on the adhoc server (the one that is executing the package via SQL Agent).

running SSIS package as SQL agent job failed

I created SSIS an project, which exports some data to Excel. In Visual Studio 2017 it works fine, but when I run it using a SQL Server Agent job (MS SQL Server 2017), it throws this error:
"Executed as user: Administrator. Microsoft (R) SQL Server Execute Package
Utility Version 13.0.1601.5 for 32-bit Copyright (C) 2016 Microsoft. All
rights reserved. Started: 3:31:46 PM Error: 2017-12-27 15:31:47.10
Code: 0xC0010018 Source: Package Description: Error loading value "
<DTS:ConnectionManagers xmlns:DTS="www.microsoft.com/SqlServer/Dts">
<DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[Excel]"
DTS:CreationName="EXCEL" DTS:DTSID="{0E7AADD0-AA79-4C99-8FFC-92E1CB5A871A}"
DTS:ObjectName="Excel"><DTS:ObjectData><DTS" from node
"DTS:ConnectionManagers". End Error Could not load package "\\phantsmgmt\c$\SDATA\ITDokumentace\SQL_DT_projects\Export_ser_zak_CEBIA\Export_ser_zak_CEBIA\Export_ser_zak_CEBIA\Package.dtsx"
because of error 0xC0010014. Description: The package failed to load due to
error 0xC0010014 "One or more error occurred. There should be more specific
errors preceding this one that explains the details of the errors. This
message is used as a return value from functions that encounter errors.".
This occurs when CPackage::LoadFromXML fails. Source: Package Started:
3:31:46 PM Finished: 3:31:47 PM Elapsed: 0.422 seconds. The package
could not be loaded. The step failed."
That is stange, because I have another SSIS project, which is using the Excel connection manager too, and it works fine using the scheduled SQL Server Agent job.
I tried to turn 32 bit mode on and off again, but nothing helps.
The solution, that helps me is Target Server Version setting in Visual Studio. More info here:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/84e470e9-aeef-4850-b29e-9eb3d545819f/running-ssis-package-as-sql-agent-job-failed?forum=sqlintegrationservices
They main error is:
Error loading value "
<DTS:ConnectionManagers xmlns:DTS="www.microsoft.com/SqlServer/Dts">
<DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[Excel]"
DTS:CreationName="EXCEL" DTS:DTSID="{0E7AADD0-AA79-4C99-8FFC-92E1CB5A871A}"
DTS:ObjectName="Excel"><DTS:ObjectData><DTS" from node
"DTS:ConnectionManagers". End Error
It looks like the error is from the Excel connection manager, there is a value that cannot be loaded. First you have to check that the excel file path exists. If the file is created after package execution you have to set the DelayValidation property to True for each component that uses this connection.
I'm getting this message more recently with a VS 2019 PRO build of an ssis package and oledb access to ms sql. A straight forward vs 2019 build with oledb access to ms sql would throw this message on our batch machines even though the same job would run on a laptop. I couldn't get anything to work until I set TargetServerVersion to SQLServer 2016. Probably just an anomoly of our somewhat strange environment but I wanted to mention it in case it helped someone else. Some people are saying that this message means dtexec can't read your .dtsx package.

SSIS Recordset Destination error [duplicate]

This question already has an answer here:
Executing SSIS 2012 package that has script components from external application
(1 answer)
Closed 8 years ago.
I have an SSIS package targeted at SQL Server 2012.
I have it deployed into the Stored Packages in Integration Services and then have a SQL Server Agent job which executes it.
The first part of the package which moves data from a number of tables from a live database into a staging database execute successfully. I then have a data flow task which uses a Recordset Destination to collect a list of IDs of other records to move into the staging database.
When I execute the package manually by doing a Run Package from Integration Services (through SQL Server Management Studio) the package executes successfully, running the dataflow task which uses the recordset destination, however when run through the SQL Server Agent job I get the following error
Message
Executed as user: xxxx. Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 09:51:49 Error: 2013-03-18 10:16:02.73 Code: 0xC000F427 Source: xxx_dataflowtask_xxx SSIS.Pipeline Description: To run a SSIS package outside of SQL Server Data Tools you must install Recordset Destination of Integration Services or higher. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 09:51:49 Finished: 10:16:02 Elapsed: 1452.78 seconds. The package execution failed. The step failed.
does anyone know how to resolve this problem?
I had simular problem, but with lots of other missed components to make my SSIS packages to be runned remotely. Full installation of MS SQL Server (Select All components from Feature list during the installation) resolved that problem:

Resources