Showing posts with label credential. Show all posts
Showing posts with label credential. Show all posts

Wednesday, February 15, 2012

Error while creating credentials

Hi guys

I am trying to run an SSIS package by creating a credential. When I try to create a credential thorugh the Mgmt Studio I get the following error:

An error occurred during encryption. (Microsoft SQL Server, Error: 15467)

I tried doing it with the following SQL statement and still have the same error:

CREATE CREDENTIAL JayTest WITH IDENTITY = 'domain\username', SECRET = 'password';

GO

My SQL Server 2005 instance is installed on a Windows Server 2003 box and is running under my NT Account as of now.

Thanks
Jay

Can you please indicate the SQL Server version that you are using (copy-paste the results of 'select @.@.version')?

Credential secrets are encrypted by the service master key (SMK), so it looks like this encryption is failing. We'll need a little more information to figure out what is the cause of the failure:

1) Please check if the SMK exists in your server:

use master
go
select * from sys.symmetric_keys where symmetric_key_id = 102
go

2) If the SMK exists, see if it can be used. You can try creating a master key in a new database or regenerating the SMK:

a)

create database testsmk
go
use testsmk
go
create database master key encryption by password = 'some_password'
go
use master
go
drop database testsmk
go

b)

alter service master key regenerate
go

If there is a problem with the SMK, these two should fail. Let us know what errors you get, if any.

3) Finally, check if there is a user profile directory created for the SQL Server service account.

Also, let us know if you changed the service account for SQL Server; this was not supported and would cause problems, although I would expect a decryption error instead of an encryption error in this case.

Thanks
Laurentiu