Creating a Self-Signed Certificate in SQL Server 2005/2008

In simple worlds, Certificates can be used to secure data in SQL Server. There are a number of ways to create a certificate - from a file, from a signed executable file or from an assembly. You can also create a Self-Signed Certificate which is the easiest of all as shown here. They are called self-signed as they are not generated by an authority but by SQL Server itself.

To secure an object, you can first create a certificate, map it to a database user and then sign the object with that certificate.

Here’s how to create a self-signed certificate.

USE Social;
CREATE CERTIFICATE SocialCert
ENCRYPTION BY PASSWORD = 'q35RED6gg577gghy53FF'
WITH SUBJECT = 'ID CERTIFICATE',
EXPIRY_DATE = '12/31/2009';
GO

You can read more about symmetric keys, asymmetric keys and other kind of certificates over here

No comments:

Post a Comment