Package doesnt run when moved to production - sql

I am not sure this should be in this category or not but here is my issue.
I have an SSIS package that I am trying to move to our production server. It works fine on the QA server but now that I have moved it to production I am getting errors:
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 Native Client" Hresult: 0x80004005 Description: "Login timeout expired".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Named Pipes Provider: Could not open a connection to SQL Server [2]. ".
End Error
Error: 2016-02-08 14:01:51.24
Code: 0xC020801C
Source: Data Flow Task OLE DB Destination [39652]
Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "MYSERVER.MYDB" failed with error code 0xC0202009. There may be error messages posted before this with more
information on why the AcquireConnection method call failed.
These errors are occurring when I try to run the package from the stored procedure I created to run the package when initiated through Access.
ALTER PROCEDURE [dbo].[sp_import]
AS
BEGIN
SET NOCOUNT ON;
DECLARE #SQLQuery AS VARCHAR(2000)
DECLARE #ServerName VARCHAR(200)
SET #ServerName = 'MYSERVER'
SET #SQLQuery = 'DTExec /F ^"\\MYSERVER\Import\Package.dtsx^" '
EXEC master..xp_cmdshell #SQLQuery
END
I should mention that the package, source file and database are all located on the same machine.
Thanks

your problem is on relation with autorisation access, change your connection to the server from windows to authentification by sql server on the connection manager and give a account that have the autorisations.

Related

How to execute the SQL job which is calling a SSIS package with ODBC connection?

I'm running a job from SQL Server Management Studio 18 which is calling a SSIS package. In that package, we are exporting the records from Data lake to SQL and its working fine when I execute the package by double-click in the DB Server/Visual Studion, but its failing when executing the package from SQL Server Agent (SQL Server Agent -> Jobs -> Job -> Right click -> Select "Start job at step").
Error:
Code: 0xC0014020
Source: SSIS package Connection manager "odbc_connection"
Description: An ODBC error -1 has occurred.
Code: 0xC0014009
Source: SSIS package Connection manager "odbc_connection"
Description: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server.
Code: 0x0000020F
Description: The AcquireConnection method call to the connection manager odbc_connection failed with error code 0xC0014009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
DTSX config:
Dsn=odbc_connection;uid=uid;Password=password;

SQL Linked Server Connection to Excel 2003 .xls file failed - SQL Server Management Studio V18

Question:
I am trying to create a linked server to excel 2003 but it keeps failing. I have already installed Microsoft.ACE.OLEDB.12.0. I tried two different ways (Code 1 and Code 2), both of which are failing. I tried many options from the internet all of which are failing. Please your kind support.
Code 1 (Failed)
Error Message:
Cannot create an instance of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "LINKEDSERVERNAME". (Microsoft SQL Server, Error: 7302)
Code 2 (Failed)
Error Message:
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LINKEDSERVERNAME221" reported an error. The provider did not give any information about the error.
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LINKEDSERVERNAME221". (Microsoft SQL Server, Error: 7399)
-- Code 1
EXEC sp_addlinkedserver 'LINKEDSERVERNAME',
'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'F:\alpha_2\test.xls',
NULL,
'Excel 8.0'
GO
-- Code 2
EXEC sp_addlinkedserver 'LINKEDSERVERNAME221',
'ACE 12.0',
'Microsoft.ACE.OLEDB.12.0',
'F:\alpha_2\test.xls',
NULL,
'Excel 5.0';
GO

Getting OLEDB Connection error in SSIS

Developed SSIS package in SQL Data tools version 2012.
Machine used Window 7, 64 bit OS.
I have one Sequence container which contains some DFTs.
Each DFT in Seq Container will get data from one table X and checks if it is already exists in main table M, if Yes move old record from main M to history H and update the new values in main table M. If No then directly insert the new records into main table M.
Since I am getting Connection values Dynamically, I have set Delay validation for all the Data Flow Tasks, Connection managers to True. But still i am getting below error.
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: "Login
timeout expired". An OLE DB record is available. Source: "Microsoft
SQL Server Native Client 11.0" Hresult: 0x80004005 Description:
"Unable to complete login process due to delay in login response". An
OLE DB record is available. Source: "Microsoft SQL Server Native
Client 11.0" Hresult: 0x80004005 Description: "TCP Provider: Timeout
error [258]. ". SSIS Error Code
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The
AcquireConnection method call to the connection manager "DW_Default"
failed with error code 0xC0202009. There may be error messages posted
before this with more information on why the AcquireConnection method
call failed. History Reprojection failed validation and returned error
code 0xC020801C.
One or more component failed validation. There were errors during task validation.
Please Suggest. Thanks in Advance.
noticed this is a 7 years old question. answers may not help you but could help others. I had the same issue recently.it is not a consistent error, happened once a while. The resolution is to check the target SQL server (data source in your case DW_Default) performance. In my case, the memory was starving in sql server and resolved with increasing memory on data source sql server. Someone suggests increase timeout on sql server, I didn't try that because I believe 10 seconds default setting should be enough for my case (sql servers and server where ssis running on are in same data center)
my error log is: (replaced sensitive names with xx)
Executed as user: xx. Microsoft (R) SQL Server Execute Package Utility Version 13.0.5426.0 for 64-bit Copyright (C) 2016 Microsoft. All rights reserved. Started: 4:00:01 PM Error: 2022-12-13 16:00:17.66 Code: 0xC0202009 Source: xx Connection manager "xx" 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: "Login timeout expired". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Unable to complete login process due to delay in login response". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "TCP Provider: Timeout error [258]. ". End Error Error: 2022-12-13 16:00:17.66 Code: 0xC020801C Source: Fetch xx List from xx ErrorLog [96] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "xx" 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: 2022-12-13 16:00:17.66 Code: 0xC0047017 Source: Fetch xx List from Web SSIS.Pipeline Description: xx failed validation and returned error code 0xC020801C. End Error Error: 2022-12-13 16:00:17.66 Code: 0xC004700C Source: Fetchxx Description: One or more component failed validation. End Error Error: 2022-12-13 16:00:17.66 Code: 0xC0024107 Source:xxfrom xxDescription: There were errors during task validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 4:00:01 PM Finished: 4:00:17 PM Elapsed: 16.438 seconds. The package execution failed. The step failed.

ssis error when click on mapping

Using SQL Server 2005
Trying to copy a .CSV file to database with
Error at UploadCSV [Connection manager "SERVER.DATABASE.USER_ID"]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E4D Description: "Login failed for user 'USER_ID'.".
Error at Data Flow Task [OLE DB Destination [594]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "SERVER.DATABASE.USER_ID" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
(Microsoft Visual Studio)
Exception from HRESULT: 0xC020801C (Microsoft.SqlServer.DTSPipelineWrap)
Program Location:
at Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass.AcquireConnections(Object pTransaction)
at Microsoft.DataTransformationServices.Design.PipelineUtils.AcquireConnections(IDTSComponentMetaData90 componentMetadata, Connections connections, IServiceProvider serviceProvider)
at Microsoft.DataTransformationServices.DataFlowUI.DataFlowComponentUI.AcquireConnections()
at Microsoft.DataTransformationServices.DataFlowUI.DataFlowComponentUI.ReinitializeMetadata()
at Microsoft.DataTransformationServices.DataFlowUI.DataFlowAdapterUI.connectionPage_SaveConnectionAttributes(Object sender, ConnectionAttributesEventArgs args)
Please check the connection manager "Server.database.user_id" and click on test connection. You may need to enter password again depending upon security setting of the package.
Once the test connection is successful, you should not see this error while mapping columns in your destination.
Generally this issue occurred when we are using a VPN Server (SQL Server) in our SSIS Package as a connection manager.
So first of all try to login SQL Server with the same user at where you created your package (Local or on your machine).

SSIS package execution failed inside SQL Agent

I have created one SSIS package which is I have imported into Integration services MSDB
which is executed correctly from Integration services MSDB
But when I tried to create a JOB in SQL Server Agent and try to execute
that job it is giving me following error
I'm unable to get it what is wrong from following error
please help me.
(I have tried by adding config file and deleting config file when I add packge in SQL Server Agent)
Message
Executed as user: cam\Package.Runner. 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: 5:05:01 AM Error: 2013-07-02 05:05:01.85
Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTS:Property" 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-07-02 05:05:01.85
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-07-02 05:05:02.02
Code: 0xC0202009 Source: BloombergFTP Connection manager "WOPR\Fireball_PROD.sa" 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 'package.runner'.". End Error Error: 2013-07-02 05:05:02.02 Code: 0xC00291EC Source: Execute SQL Task Goodhart Execute SQL Task Description: Failed to acquire connection "WOPR\Fireball_PROD.sa". 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: 5:05:01 AM Finished: 5:05:02 AM Elapsed: 0.266 seconds. The package execution failed. The step failed.
Ensure that credential used by "WOPR\Fireball_PROD.sa" BloombergFTP Connection manager is valid before trying the following.
Either
Change the SSIS Package ProtectionLevel property to
EncryptSensitiveWithPassword and Set the Packagepassword if you want
to encrpt the package.Specify this Password at command line in
SQLSERVER Agent Job SSIS configuration.
Change the SSIS Package ProtectionLevel property to DontSaveSensitive if you dont want to encrpt the package.Specify the credential in the SQLSERVER Agent Job SSIS configuration itself.
I ran into a similar problem. My SSIS package was running within SQL Data Tools without errors, but failed within SQL Server Agent, using a admin proxy. Looking into the logs of the job, the error message was something like "Failed to decrypt protected XML node "DTS:Property""
One of the many possible reasons (next to the one given by S.M.) for such an error is that the proxy doesn't have access to tables/databases you're referring to, while you yourself do have access to these tables.
In my case: I was writing stuff to a personal database which couldn't be accessed by the credentials underlying the proxy. Hence, when running the SSIS package within SQL Data Tools, I could access the tables, but when running the job within SQL Server Man. Studio, I couldn't. I changed the destination database of my package and the job could be runned.
This might be helpful for more people running into similar problems.