2
votes

I am trying to run an SSIS package in SQL Server Agent, and create job successfully, but when I try to run, I got this error:

Microsoft (R) SQL Server Execute Package Utility Version 10.50.1600.1 for 32-bit Copyright (C) Microsoft Corporation 2010. All rights reserved.

Started: 9:09:23 AM Error: 2015-02-17 09:09:23.77 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: 2015-02-17 09:09:24.57 Code: 0xC0202009 Source: Package Connection manager "localhost.Sample.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 'sa'.". End Error Error: 2015-02-17 09:09:24.58
Code: 0xC020801C Source: Data OLE DB Source [1] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "localhost.Sample.sa" 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-02-17 09:09:24.58 Code: 0xC0047017 Source: Data SSIS.Pipeline
Description: component "OLE DB Source" (1) failed validation and returned error code 0xC020801C. End Error Error: 2015-02-17 09:09:24.58 Code: 0xC004700C Source: Data SSIS.Pipeline
Description: One or more component failed validation. End Error Error: 2015-02-17 09:09:24.59 Code: 0xC0024107 Source: Data
Description: There were errors during task validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 9:09:23 AM Finished: 9:09:24 AM Elapsed: 0.905 seconds Microsoft (R) SQL Server Execute Package Utility Version 10.50.1600.1 for 32-bit Copyright (C) Microsoft Corporation 2010. All rights reserved.

Started: 9:14:47 AM Error: 2015-02-17 09:14:47.66 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: 2015-02-17 09:14:47.94 Code: 0xC0202009 Source: Package Connection manager "localhost.Sample.sa1" 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 'sa'.". End Error Error: 2015-02-17 09:14:47.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 "localhost.Sample.sa1" 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-02-17 09:14:47.94 Code: 0xC0047017 Source: Data Flow Task SSIS.Pipeline Description: component "OLE DB Source" (1) failed validation and returned error code 0xC020801C. End Error Error: 2015-02-17 09:14:47.94 Code: 0xC004700C Source: Data Flow Task SSIS.Pipeline Description: One or more component failed validation. End Error Error: 2015-02-17 09:14:47.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: 9:14:47 AM Finished: 9:14:47 AM Elapsed: 0.359 seconds

5

5 Answers

4
votes
  • If you want to execute with sa user first enable.if you don't have sql authentication then login with windows authentication and go to server properties-->security--> select sql and windows authentication. click ok still you can't access then try below query to enable

ALTER LOGIN [sa] WITH PASSWORD='AnyStronGpassword', CHECK_POLICY=OFF GO ALTER LOGIN [sa] ENABLE GO

After sql server login success create a job and run.

reference link : Enable Sa Password

1
votes

The Error you are getting is

Description: "Login failed for user 'sa'.".

That means SSIS is not saving your password when running from SQL Agent, watch this Video to trouble shoot it.

https://technet.microsoft.com/en-us/library/dd440760(v=sql.100).aspx

http://www.bidn.com/blogs/DonnyJohns/ssas/1705/sql-server-agent-proxy-accounts

1
votes

Also keep in mind that SSIS Packages are set for their ProtectionLevel to be "EncryptSensitiveWithUserKey" This means that passwords that you type in while you developing will be saved, but only used when you are running it. If you run it as SQL Agent it's running under the service account used to run the services. You could assign a password to the whole package and change the ProtectionLevel to "EncrypeSensitiveWithPassword". Or you could do a package configuration to store the SA password and set it at run time. There are pros and cons to the choices.

Here is a good tutorial on package config: https://www.mssqltips.com/sqlservertip/1405/sql-server-integration-services-ssis-package-configuration/

0
votes

Expand the SQL Server Agent node and right click the Jobs node in SQL Server Agent and select 'New Job'

In the 'New Job' window enter the name of the job and a description on the 'General' tab.

Select 'Steps' on the left hand side of the window and click 'New' at the bottom.

In the 'Steps' window enter a step name and select the database you want the query to run against.

Paste in the T-SQL command you want to run into the Command window and click 'OK'.

Click on the 'Schedule' menu on the left of the New Job window and enter the schedule information (e.g. daily and a time).

Click 'OK' - and that should be it.

(There are of course other options you can add - but I would say that is the bare minimum you need to get a job set up and scheduled)

0
votes

I had the same problem and was trying to resolve for long time. In my case a solution was to set checkbox "32-bit runtime" to true in Job Step Advanced Properties. After that is started working great!