There are a couple reasons this error could occur:
- The system databases were moved to a new server and the server name was changed.
- THE SQL service account information was changed on any server.
An easy way to reproduce the error is to run the following in query analyzer:
CREATE CREDENTIAL AgentProxyTest WITH IDENTITY = <domain account>,
secret = <account password>
You should receive a message similar to this:
Msg 15466, Level 16, State 2, Line 1 - An error occurred during decryption.
Another way to detect the problem is to run the following in a query:
SELECT * from sys.dm_os_ring_buffers where ring_buffer_type = RING_BUFFER_SECURITY_ERROR
If there are a lot of similar entries related to account encryption/decryption, you may have the same problem I encountered. The problem in my case was that the SQL 2005 service account was changed through the Windows Services applet and not with the SQL 2005 configuration manager. The configuration manager will automatically change the master key information for the accounts. To solve the problem, I ran the following in query analyzer:
ALTER SERVICE MASTER KEY FORCE REGENERATE
ALTER SERVICE MASTER KEY
WITH NEW_ACCOUNT = <service account>, NEW_PASSWORD = <password>
However, do so at your own risk. This could possibly cause a loss of information if there is encrypted information in the database. If access to the old system is available, it may be possible to backup and restore the key to the new system and then change the service account.