Sunday, March 25, 2012

cannot drop certificate.

im trying to drop all certificates on my database, and then the master key, but cannot do this as there are objects encrypted by one particular cert that i called fcert. I done this ages ago and cannot remember what i encrypted with this cert. to drop the master key i have to drop the cert and to drop the cert i have to make sure no objects are encrypted by it. how is this achieved?

try this:

declare @.thumb varbinary(32)
select @.thumb = thumbprint from sys.certificates where name = 'fcert'
select object_name(major_id) from sys.crypt_properties where thumbprint = @.thumb
go

hth,

-Steven Gott

S/DET

SQL Server

sql

No comments:

Post a Comment