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

我怕爱的太早我们不能终老 提交于 2019-11-29 04:12:59

Well, I hate having to post such a response but I've solved the problem.

The short answer reason why I had this problem is because one of the fields in a data table was improperly defined. In this case it was declared as a decimal (11, 3) and it should have been a decimal (13, 3). I didn't experience this problem until a value was being posted to the table that didn't fit the (11, 3) range.

This issue highlights one of my biggest complaints with SSIS. On occasion I get errors that are often well documented on the internet. I search through all of my logs and I try to set up various test scenarios under the assumption that the error message is honest. Yet, when I finally solve the problem, it's completely unrelated to the error message that is written to the log file.

In this case, the error mentioned above had absolutely nothing to do with the problem?! In fact, I was very lucky to see the problem at all. I knew the update on my table might be a potential fix because I've seen SSIS mis-communicate like this before.

I'd like to blame this on neutrinos from space bombarding my server but the best take-away from this experience is to try and solve your SSIS problems based off of the advice of others, however, if their advice doesn't help, realize the issue may be unrelated to the SSIS error message and triple-check everything associated with the point of failure.

I could not post the image in the comments, so posting it as an answer.

When you try to import the package to SQL Server, as soon as you right click and do "Import Package" you will get the following window.

Click on the rectangle box to the right of the window. It will give you the option of changing the protection level of the package. Change it to "Do Not Save Sensitive" and try running the package. A word of caution, this will require you to remove the existing package and re-import it again. So, you may want to try it on another machine before touching the existing configuration.

For me it was just the password for a connection Manager in SSIS, which was not saved. Input the password -> OK-> close dtsx file & reopen. Error gone.

GrayDwarf

Ran into the same error message in SQL Server 2012. For me, restarting SQL Server Management Studio resolved the problem. Issue was likely caused by my domain password changing a few days ago while SSMS was open. If you run into a similar problem and it doesn't go away with a simple restart, make sure you check Control Panel\User Accounts\Credential Manager for cached account info and/or try a reboot.

Open the package dtsx then go to properties set ProtectionLevel EncryptSensitiveWithPassword and put password . Connect the package form sql sever job with same password.

See http://support.microsoft.com/kb/918760 and http://www.mssqltips.com/sqlservertip/2091/securing-your-ssis-packages-using-package-protection-level/

This is a workaround to avoid the issue in the first place of saving sensitive passwords in the package.

I removed the FTP task and used a File System task instead to copied the file to the same location via a network share on the ftp server and avoided using the ftp protocol.

I was also able to save the package to the file system instead of the sql server store and it ran fine.

Hopefully it helps you!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!