Unable to refresh or cache database

eklovningeklovning Posts: 2
edited December 6, 2008 7:25AM in SQL Prompt Previous Versions
SQL 2005 - 9.00.3159.00
SQL Prompt - 3.8.0.244
Management Studio - 9.00.3042.00

Getting the following error whenever I try to refresh the cache:

Unable to refresh or cache database [Server].[Database] due to the following error: Failed to encrypt data: Object reference not set to an instance of an object..

RedGate.SqlPrompt.Engine.Cache.DatabaseRefreshException: Unable to refresh or cache database [Server].[Database] due to the following error: Failed to encrypt data: Object reference not set to an instance of an object.. ---> System.Security.Cryptography.CryptographicException: Failed to encrypt data: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.SqlPrompt.Engine.Cryptographer.a(Int32 )
at RedGate.SqlPrompt.Engine.Cryptographer.a(Byte[] , Byte[] )
--- End of inner exception stack trace ---
at RedGate.SqlPrompt.Engine.Cryptographer.a(Byte[] , Byte[] )
at cy.b()
at cy.b(IAuthenticationTokenProvider )
--- End of inner exception stack trace ---
at cy.b(IAuthenticationTokenProvider )
at cy.a(IAuthenticationTokenProvider )
at cy.GetMetaData(IAuthenticationTokenProvider provider)
at M.b(G , IAuthenticationTokenProvider , Boolean , EventHandler`1 , EventHandler`1 , EventHandler`1 , EventHandler`1 )

Comments

  • I don't know why you're experiencing this issue. Have you tried to delete the cache and recreate it? Does this have any effect on the issue?
  • I have the same problem. Same error message.

    Has anyone a clue??? I need this tool urgently
  • I completely reinstalled .NET Framework 2.0 include sp1. No effect.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Offhand, I'd say that the computer's cryptographic "machine key" is missing or damaged. This key is part of your operating sytem and the Windows crypto subsystem can be completely crippled if the key in the machine key store is somehow changed or otherwise inaccessible.

    I don't know exactly what is being encrypted, though. I'd say to try to delete the database in cache management and get a fresh copy by connecting to the server again.
  • Thanks for your reply.

    Here are some additional informations of all the actions that I have taken to solve the problem:

    - deleted the cache
    - reconnected to the server
    - reinstalled sqlprompt
    - reinstalled .Framework 2.0 + sp1

    no effect at all.

    PS: Last week, my computer got broken. So I moved the harddisk to another computer. Could this be the reason why the machine key is missing or damaged? Has this key some hardware information like mac adress or something like that?
Sign In or Register to comment.