Hi,
I'm pulling out what little hair I have...
OPEN SYMMETRIC KEY myKey DECRYPTION
BY CERTIFICATE myCert
DECLARE @pwtemp varbinary(256)
SET @pwtemp=(SELECT ENCRYPTBYKEY(KEY_GUID('myKey '),'test'))
PRINT @pwtemp
This will work fine under Windows Authentication but not under a SQL Server login I'm using.
I get the following error:
Cannot find the symmetric key 'myKey', because it does not exist or you do not have permission.
I've tried:
GRANT view definition ON CERTIFICATE::myCert to testuser1
with no affect.
Is there anything more I need to do to the login to make this work?
Cheers