I have created a certificate and now I want to remove certificate signature and drop the certificate. When I supply the certificate name directly it is working but when I'm making use of local variables to supply the name its giving me syntax error.
I have tried with different datatypes as well
text, varbinary(max), char(200), varchar(200), nvarchar(200)
None of these datatypes are working.
declare @certificate nvarchar(200) set @certificate = 'ITManagerCertificate' begin transaction use DBwork -- remove signature from stored procedure drop signature from Report_Manager by certificate @certificate -- drop certificate --DROP CERTIFICATE N@certificate if @@ERROR > 0 begin rollback transaction end else begin commit transaction end