Windows error 0x8009000B, -2146893813

Detailed Error Information

NTE_BAD_KEY_STATE[1]

MessageKey not valid for use in specified state.
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode9 (0x009)
NameFACILITY_SSPI[2][1]
DescriptionThe source of the error code is the Security API layer.[2][1]
Error Code11 (0x000b)

Questions

33votes
6answers

SQL Server Jobs with SSIS packages - Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B

i have a SQL server job that runs a SSIS package. This job has 9 steps and in each step it extracts data from a different database. the connections strings are defined as parameters in each step. im getting the following error when i run the job. Executed as user: [...] read more
sql-server-2008-r2
28votes
1answer

Importing a DSA key from xml string fails for one user. Permissions? Broken installation? Bad KSP?

A user recently reported a weird error when using my software. I use DSA signatures to verify licenses. When the software imports the public key to verify a signature, the DSA provider's FromXmlString method throws a CryptographicException with the description "Key not valid for use in specified state." It would [...] read more
c#
.net
cryptography
cryptoapi
dsa
11votes
8answers

SSIS issue Failed to decrypt protected XML node

I created an SSIS package which is having ftp pull files from ftp server and save to my local drive but I'm getting this issue. With same error message I was getting only warning but today the job fails. Message: > Executed as user: cam\Package.Runner. Microsoft (R) SQL Server Execute [...] read more
sql
sql-server
sql-server-2008
ssis
10votes
6answers

SSIS: Just started getting a "Key not valid for use in specified state." error on my scheduled SSIS package

I have 2 scheduled jobs on my SQL Server 2005 machine that are scheduled to run each morning (around 2:00 AM). These jobs have worked fine (mostly) for years and although I've had a few hiccups that I've had to work through this problem is completely stumping me. Two mornings [...] read more
sql-server
sql-server-2005
ssis
ibm-midrange
bids
8votes
1answer

Azure AD Connect Password Sync

Windows 2012 R2, fully updated/activated Roles: ADDS, ADFS Installed Azure AD Connect latest version (only software installed other than updates) Other applicable services: Office 365 (Business Premium licensing), Azure AD Premium Having a problem with password writeback. I am able to reset a user password on the local AD and [...] read more
windows
windows-server-2012
microsoft-office-365
azure-active-directory
8votes
1answer

Failed to decrypt using provider 'DataProtectionConfigurationProvider' in app.config

I used following method to encrypt connectionstrings section of my app.config in my WinForms project(I'm using Code First EF in my project): public static void EncryptConfig(string exeConfigName) { var config = ConfigurationManager.OpenExeConfiguration(exeConfigName); var section = config.GetSection("connectionStrings") as ConnectionStringsSection; if (section != null || !section.SectionInformation.IsProtected) { section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider"); config.Save(); } } and [...] read more
c#
winforms
entity-framework
encryption
app-config
4votes
2answers

Error After Encryptingweb.config

I encrypted the AppSettings part of my web.config, tested it on my machine and it worked, but when I uploaded to use it online it gave me an error: > Configuration Error Description: An error occurred during the processing of a > configuration file required to service this request. Please [...] read more
asp.net
vb.net
encryption
web-config
3votes
1answer

X509Certificate2.Import with NCRYPT_ALLOW_PLAINTEXT_EXPORT_FLAG

I have a PFX certificate with CNG key inside (KSP provider information is specified in the PFX). I can't find a way to import the certificate in .NET in the way that would allow private key export in plain text (MS-CAPI format). var cert = new X509Certificate2(pfxBytes,password,X509KeyStorageFlags.Exportable); then I use [...] read more
c#
x509certificate
x509certificate2
cng
3votes
1answer

Error while executing SSIS package from JOB

Message > Executed as user: UKDBT91DB05V\SYSTEM. Microsoft (R) SQL Server Execute > Package Utility Version 10.50.2500.0 for 64-bit Copyright (C) Microsoft > Corporation 2010. All rights reserved. Started: 14:58:34 Error: 2013-04-01 > 14:58:34.45 Code: 0xC0016016 > Source: Description: Failed to decrypt protected XML node "DTS:Property" with > error 0x8009000B "Key [...] read more
ssis
3votes
1answer

My SSIS Package works, but fails as a SSMS job (Error: 0xC0016016)

My SSIS Package works, but fails as a SSMS job (Error: 0xC0016016) I am posting this question and sharing my solution to this issue as my own question because I didn't see the posed problem match the specific issue I encountered and the answers seemed to be scattered in different [...] read more
sql-server
ssis
ssms
2votes
1answer

EFS Remote Encryption

We have been trying to setup EFS across our domain. Unfortunately Reading/Writing file over network share does not work, we get an "Access Denied" error. Another worrying fact is that I managed to get it working for 1 machine but no other would work. The machines are all Windows 2008R2, [...] read more
windows-server-2008
active-directory
windows-server-2008-r2
encryption
encrypting-file-system
2votes
1answer

MS SQL - Problem running SQL Server Agent Job via service account credentials

There are 5 steps in this job. First job is an SSIS Package store, second to fifth are file system jobs. We configured all jobs to use Windows Authentication. Under Run As, we specified a user account which was created under Security>Credentials and SQL Server Agent>Proxies>SSIS Package execution. The job [...] read more
sql-server
oracle
2votes
1answer

SQL Server : change SSIS package configuration (connection string)

I'm maintaining a project using Microsoft SQL Server 2016 (SP1) (according to this script) which heavily depends on recurring jobs (mirroring certain external db's and so on). Especially the mirroring jobs are essentially based on SSIS packages which define a datasource, then execute a hardcoded SQL query and afterwards store [...] read more
sql-server
ssis
2votes
5answers

How to RUN Scheduled Task in SQL Server 2008 for SSIS Package?

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: [...] read more
sql-server
sql-server-2008
ssis
2votes
0answers

Exporting To Azure SQL from Local SQL Database Failure

I have a local SQL Server 2012 database that used to export tables and views to Azure SQL daily. It's been working flawlessly for 3 months. The export tasks were created by the SQL Server Studio Import/Export Wizard. They were saved into a SQL Server SSIS package and ran daily [...] read more
sql-server
ssis
sql-server-2012
azure-sql-database
2votes
1answer

Web.Config file encrypt not working after publishing

I encrypted the web.config file using following code protected void Page_Load(object sender, EventArgs e) { EncriptSection("connectionStrings", "DataProtectionConfigurationProvider"); } private void EncriptSection(string sectionName, string provider) { Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath); ConfigurationSection section = config.GetSection(sectionName); if (section != null && !section.SectionInformation.IsProtected) { section.SectionInformation.ProtectSection(provider); config.Save(); } } after encryption web.config file,Site is running [...] read more
c#
asp.net
encryption
configuration
web-config
2votes
1answer

CryptAcquireContext() fails with return code 0x8009000B NTE_BAD_KEY_STATE - But user password has not changed

My company has a program compiled in vb6 which requires an encrypted license code to be validated before the software can be used. Recently, a client called saying the license code was failing to validate and the program was locked. After some investigation, I discovered the code was failing on [...] read more
winapi
encryption
vb6
handle
2votes
1answer

How do I debug or set breakpoint to SSIS package for FTP task

I have one SSIS package i was deployed on server now i need to debug that SSIS package so i have downloaded that on my local machine but > I'm not able to set breakpoints not on any step :( nor able to compile or run why so getting error [...] read more
sql
ssis
1vote
1answer

Win 7 cannot create file on EFS network share

I have a Win 7 Ultimate desktop machine (server) and a Win 7 Pro laptop (client) on a workgroup network. Both client and server machine have an administrator user account of the same name, with the same password On the server machine are several network shares. The administrator account has [...] read more
networking
efs
1vote
1answer

SSRS Connection Manager for 2 separate domain failing when added to SQL Job

I am using SQL authentication for a SSIS connection manager for one domain to another. In Visual Studio the connection is working when tested but password does not save. Running the package in VS is working but when creating a SQL job with the package, it fails to run with [...] read more
ssis
sql-job
1vote
1answer

There was an error while loading the package SSIS

I have created one SSIS package for data flow and its perfectly working fine for me (with my credentials). However, when its opened by another person with another login ID (credentials) its showing error: Please see the below screenshot.Looks like its an access error. How can I give access so [...] read more
ssis
sql-server-2016
1vote
2answers

SSIS 08 job runs a SSRS 08 report but fails when ran in SQL Server

I have created an SSIS package (08) that has a script task which runs an SSRS report (08) with given parameters. The report creates a pdf version of the file on a file share drive of my choosing. When I run the SSIS manually it works perfectly, however, when I [...] read more
sql-server
reporting-services
ssis
1vote
2answers

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 [...] read more
sql-server
ssis
sql-job
1vote
0answers

Error Scheduling in SSIS even after configuring the configuration file

I am having very difficult time trying to schedule a package in SSIS through Management Studio. I am using SQL Server 2008 R2. My package runs fine when executed directly from BIDS. However when I create the job and run it from Management Studio it throws various errors. When i [...] read more
sql-server-2008
1vote
0answers

Error while using SSIS Failed to decrypt protected XML node "DTS:Password"

1. I am running an SSIS package from a .bat file on a windows server 2. The package is being run through the Windows Task Scheduler 3. I created the task using my own admin level login and the process has been package has been running without an issue 4. [...] read more
sql-server
encryption
ssis
1vote
0answers

SQL Server 2008 R2 Errors running SSIS Package through the Job Agent

I have an SSIS Package that I created through the Import Export (32-bit) Tool. When I executed the package manually through the Execute Package Utility the package run successfully with no issues. However when I try to run the package through a Job Agent in SSMS I keep getting errors. [...] read more
sql-server
ssis
sql-server-2008-r2
sql-agent-job
ssis-2008
0votes
1answer

Package run on SQL Server Job Agent - Login failed for user

I created a package on my SQL Server (2012) through the import/export data wizard which exports data to another SQL Server (2008). I set up a job which runs this package but I get an error: > Description: Failed to decrypt protected XML node "DTS:Password" with error > 0x8009000B "Key [...] read more
sql-server
sql-server-2008
permissions
sql-server-2012
0votes
1answer

SQL Server Agent Service - SSIS package scheduling not working

We have a local admin privilege to our VPN users and we have created SSIS packages but not able to run it through SQL server agent services as its not allowing to run throwing error being non-administrator . ERROR: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key [...] read more
sql-server
ssis
0votes
0answers

Digitally sign a PDF using iTextSharp 4.1.6.0 without keys exportable certificate

I tried to sign pdf using itextshapr 4.1.6 in c# as per way provided in https://web.archive.org/web/20130329022247/http://itextpdf.sourceforge.net/howtosign.html I followed the steps given in link: Digitally sign a PDF using iTextSharp 4.1.6.0 Section : "How to sign with an external signature dictionary using BouncyCastle CMS" CMSSignedDataGenerator generator = new CMSSignedDataGenerator(); generator.addSigner(key, (X509Certificate)chain[0], [...] read more
pdf
itext
digital-signature
0votes
1answer

Error connecting cloud database executing OLAP JOB

I've created some OLAP Cubes and a DTSX Package. In this package I connect into a cloud database to get my data and put in on local sql analysis service. On Visual studia when I execute it it works fine but when I try to run it on local Sql [...] read more
ssms
olap-cube
0votes
1answer

SSIS Error: Failed to decrypt protected XML node

I am taking over the development of an SSIS package and the original author is no longer around. I need to make some edits to the package, but I get some errors: Error loading Package.dtsx: Failed to decrypt protected XML node "DTS:Property" with error 0x8009000B "Key not valid for use [...] read more
ssis
0votes
0answers

aspnet_regiis always shows its options

Yesterday I used aspnet_regiis in order to encrypt my web.config and my applicatoin run fine. Today I had to restart the server and my application did not run anymore: System.Configuration.ConfigurationErrorsException: Failed to decrypt using provider 'DataProtectionConfigurationProvider'. Error message from the provider: Key not valid for use in specified state. (Exception [...] read more
aspnet-regiis.exe
0votes
0answers

How to export EC private key as PKCS#1 or PKCS#8 format from certificate store by CNG?

I tried to export private key from certificate store by CNG API. It work fine when export RSA private key, but failed in EC private key. The code failed in NCryptExportKey() with 0x80090029. Is there any document from MS said: Export EC private key not support? or any sample code? [...] read more
c++
cryptography
cryptoapi
ecdsa
cng
0votes
0answers

Upgrading an SSIS package that uses and encrypted password from 2008 to 2012

I was tasked to upgrade some old SSIS packages from 2008 to 2012 and I have never done that before. Most are upgraded automatically by the Visual Studio upgrade wizard, but one is failing and I think it's because it's using an encrypted password. Here's the message: > Error 0xc0016016: [...] read more
sql-server
ssis
ssis-2012
ssis-2008
0votes
2answers

SSIS Containing SQL Authentication Runs in IDE but fails in SQL Server Agent Job

I have a SSIS package which gets data from flat file and writes it to SQL. It was running fine in IDE with Windows Authentication in the OLEDB Connection. But I wanted this to be run by anyone instead of using my Windows Authentication setting, so I changed the Authentication [...] read more
sql
authentication
ssis
jobs
0votes
0answers

BIDS 2008 DTS package remove password

I have an old SSIS project that I need to open due to some failures in production, but it's password protected. I think I know the password, but I can't find a way to enter it. There's no prompt window, dialog, nothing at all. Just the error "DTS:Password" protected: 0x8009000B [...] read more
ssis
visual-studio-2008
bids
0votes
1answer

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 [...] read more
sql-server
ssis
sql-server-data-tools
sql-agent-job
sql-agent
0votes
0answers

Can run SSIS package on Ad-Hoc Server to insert result to another server?

I have a SSIS package for getting data from a webservice and insert to the SQL Server(using OLEDB connection with sql user). 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 [...] read more
sql-server
ssis
sql-agent-job
sql-agent
0votes
3answers

run SSIS Package from SQL Agent

I am trying to create a new job to run a SSIS package automatically. I succeed to execute run the package from SSDT but when I try to run it from sql Agent, it generate the following error: Source: Package Description: Failed to decrypt protected XML node "DTS:Password" with error [...] read more
sql-server
ssis
sql-server-2014
0votes
0answers

"Key not valid for use in specified state." - SSIS Package

I have a SSIS package deployed in my server. My database is a SQL Server 2008R2, the SSIS was developed in Data Tools 2008. It used to work perfectly but since a few days it started to throw this error: > Failed to decrypt protected XML node "DTS:Password" with error [...] read more
ssis
sql-server-2008-r2
etl
sql-agent-job
0votes
2answers

SSIS 2008 R2 Completes But Gives Error "Violation of PRIMARY KEY constraint"

I've found a number of links on this but so far not the one with an answer. Issue: SSIS 2008 R2 package importing data from many tables (about 160) of SQL 2000 database (conversion project) into new structures. This has run cleanly a number of times. To be clear, the [...] read more
sql-server
sql-server-2008
ssis
bids
0votes
1answer

Invalid encryption key after website published

So i managed to encrypt my connectionstrings on my localhost, and everything was fine.. it could read without any problems. Now after i have published my project on my webhote, the story is quite different. I get following error: > Key not valid for use in specified state. (Exception from [...] read more
asp.net
encryption
0votes
1answer

XP_CMDSHELL To run a SSIS Package w/ Parameters

I am trying to create a stored procedure that will allow me to pass in parameters to a SSIS Package. DECLARE @Path VARCHAR(200), @ExcelPath VARCHAR(50), @DB VARCHAR(100), @ExcelSheet VARCHAR(500), @Cmd VARCHAR(4000), @ReturnCode INT, @Msg VARCHAR(1000), @SQLServer varchar(255), @EmailAddress varchar(255), @DTEXEC varchar(255) SELECT @Path = 'C:\SpyderNetwork Production\SSIS\IMPORTSC\' SELECT @ExcelPath = 'C:\Users\Administrator\Desktop\SR\test.xlsx' [...] read more
sql
stored-procedures
ssis
xp-cmdshell
0votes
1answer

How to use System.Configuration.DpapiProtectedConfigurationProvider version 2 in .net framework 4.5?

I recently upgraded my application from .net 3.5 to .net 4.5 .I maintain a config file in which I store user data.And that data is encrypted using System.Configuration.DpapiProtectedConfigurationProvider,System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a After, upgrading when I tried to access data from the config file, it gave following error: The entry 'DataProtectionConfigurationProvider' [...] read more
c#
app-config
configurationmanager
0votes
0answers

How to manage a private key in an ASP.NET MVC application

I am storing a private key for some crypto methods in an ASP.NET MVC application that is implemented in C#. I am using the System.Security.Cryptography.CngKey class to create and retrieve the private key. I create the key like this: key = CngKey.Create(CngAlgorithm.ECDiffieHellmanP521, keyName, new CngKeyCreationParameters { ExportPolicy = CngExportPolicies.AllowPlaintextExport }); [...] read more
c#
asp.net-mvc
security
cryptography
0votes
1answer

Scheduled ssis insert row

I am trying to use SSIS to simply insert 3 rows into a table daily. The package executes fine in VS. When I try to schedule the package it errors out with a privilege error. The package owner has full rights on the table. The SQL code has been working [...] read more
ssis
0votes
2answers

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 [...] read more
sql
ssis
0votes
2answers

SSIS Package Failing on Executing Job

Good Day, I imported a package from SSIS to SQL to run as a Job. if i manually execute the Package in SSIS in MSSMS it executes successful as soon as i run it as a job i get the following error: > Executed as user: NT AUTHORITY\LOCAL SERVICE. Microsoft [...] read more
sql
sql-server
ssis
sql-server-2008-r2
0votes
1answer

Running a SSIS Package from SQL Server Management Studio 2008

I have set up a Import that copies data from a database on SQLExpress 2005 and Deletes and replaces the Data in a Database on SQL Server Management Studio 2008. This Runs fine when i set it up for the first time? but if i try to assign a job [...] read more
sql
stored-procedures
ssis
0votes
1answer

SSIS package security issue during connection creation

I have create SSIS package for deployment. SSIS package is executed successfully. There are two database servers. 1 server is connected with my package connections and i am deploying on the other server using sql jobs. SQL jobs gives error when try to create connection with other server. Following is [...] read more
sql
sql-server
sql-server-2008
ssis
package
0votes
1answer

Locked out of SSIS Package

I tried to access one of my SSIS packages only to be presented with the error message (Text in square brackets is not literal): > Error 1: Error loading Package.dtsx: Failed to decrypt a package that is > encrypted with a user key. You may not be the user who [...] read more
sql
sql-server-2005
encryption
ssis
visual-studio-2005
0votes
1answer

SSIS authorized access this information error

Error is as following: > 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 read more
sql
ssis
sql-server-2008-r2
0votes
1answer

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 [...] read more
sql-server
sql-server-2008
ssis
0votes
0answers

SSIS error due to "Protection level" value "encryptsensitivewithuserkey", can a pacakge have nothing sensitive?

I have today ended up supporting a brand new (for me :)) package which threw below error. "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 [...] read more
sql-server
ssis
0votes
2answers

SSIS Package Upgrade

I have a SSIS Solution with 4 packages created in SSIS 2005. When I opened the solution in SSIS 2008, it went for SSIS Upgrade wizard. But the upgradation had failed. The error messages are shown as follows : 1. Error 0xc001405f:: Failed to decrypt an encrypted XML node because [...] read more
ssis
0votes
1answer

Not able to run SSIS package from Stored Procedure

I created an ssis package. It runs fine when i run it from command prompt. But when i run it from query analyser using xp_cmdshell, it gives the error below Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You [...] read more
sql
sql-server-2008
-1votes
1answer

Deployment issue - can EncryptSensitivewithUSERKEY default be overridden by editing XML?

We were moving SSIS packages that run OK on my machine to a different environment We were getting the error message Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B. So we tried to change protectionlevel to 0 in all the packages through the XML editor, but we are [...] read more
sql-server
ssis

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0