locked
Key not valid for use in specified state RRS feed

  • Question

  • SQL 2014, VS 2013 Data Tools

    Yesterday all of our 100+ SSIS packages were working fine.  Today we're getting errors such as this one:

    Error 1 Error loading MYSSISPackage.dtsx: 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.   

    Why did this start happening all the sudden, and more importantly how do I fix it?  I've looked around but the solutions are things such as changing the connection manager from Native SQL to OLEDB.  That's not acceptable, since these worked yesterday but not today.  I need to know what caused this and how to fix it the correct way w/o a Band-Aid approach. 

    Thanks in advance.


    André

    Thursday, May 28, 2015 4:10 AM

All replies

  • 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.

    Hello André,

    I can only guess here: Sensive data like passwords are encrypted, either by user key or by password and here it seems that either the packages are modified by a different user and now the encrypted data can't be decrypted. So check all connection manager / passwords.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Thursday, May 28, 2015 7:15 AM
  • Hello - I am suspecting that originally the packages were built using the same account that was also used to run SQL Server Agent service and that is why the credentials used in the connection manager were working. The default setting is always EncryptSensitiveWithUserKey and this sort of issue can surely happen if there is change in either of these areas ( Either SSIS Package was modified or SQL Server Agent Service account changed)

    My submission is: Have you changed the service account recently or has anyone changed the password for the package if it is using PackageProtectionLevel as EncryptSensitiveWithPassword

    Hope this helps


    Good Luck!
    Please Mark This As Answer if it solved your issue.
    Please Vote This As Helpful if it helps to solve your issue


    Thursday, May 28, 2015 7:41 AM
  • Hi Andre, are you using some proxy in order to run the package. And especially it would be interesting to know if you are using credentials.

    Let us know.

    Thursday, May 28, 2015 2:16 PM
  • Thanks for the replies.  Nothing has changed as far as the account is concerned.  The SSIS projects are stored on a network share and another user and myself "share" them that way - moving to TFS soon.  We're both in and out of the projects daily.  Yesterday life was good and today I'm getting the errors, seemingly out of the blue.  Like I said we have 100+ packages and today every one I've tried to open is giving me this error.  No security has changed and no new user has opened the packages.  It's literally like the clocked flipped to a new day and all the sudden we're getting the "key not valid" error.

    André

    Thursday, May 28, 2015 2:19 PM
  • Not using a proxy.  We weren't yesterday when they all worked fine, and we're not today when they don't work.

    André

    Thursday, May 28, 2015 2:26 PM
  • Andre did you shut down your pc between yesterday and today? It looks like a password matter, maybe you are requested to change password. Try to logout and login in your network.

    Suggestion: build a new package, a simple dataflow db to db, it should take one minute. Put the package in the folder and let us know what happen..



    • Edited by DIEGOCTN Thursday, May 28, 2015 4:10 PM
    Thursday, May 28, 2015 4:06 PM
  • I didn't shut down my PC.  It's a VM, and I Remote Desktop to it, and only reboot when Windows Updates are available.  No passwords have changed.

    I'll reboot and also build a new SSIS package later.  The problem with building a new one is that we use an existing one for our template.  So I need to know how to make this error go away for the existing packages.


    André

    Thursday, May 28, 2015 6:07 PM
  • where package kept?

    refer 

    https://msdn.microsoft.com/en-us/library/ms138023.aspx?f=255&MSPPError=-2147217396

    Friday, May 29, 2015 7:12 AM
  • They're stored in msdb. 

    Also, I rebooted my VM and am still getting the error.


    André

    Friday, May 29, 2015 3:15 PM
  • I just tried to open a solution from our main SQL Server.  I logged on as Administrator and not myself.  I get the same error when I open a package.  I then asked the other BIDS user to try and open a solution/package and he's able to open it w/o the error.  This is very confusing; now I have tried 3 users on 3 different machines.  2 get the error and 1 doesn't. 

    Any other help is appreciated.


    André

    Friday, May 29, 2015 4:53 PM
  • http://stackoverflow.com/questions/12935483/ssis-just-started-getting-a-key-not-valid-for-use-in-specified-state-error-o

    Please Mark Answer if it solved your issue, Vote As Helpful if it helps to solve your issue

    Saturday, May 30, 2015 8:07 AM
  • No fields have changed sizes, so that last link doesn't really apply here.  Thanks anyway.

    André

    Monday, June 1, 2015 11:28 PM