Paritosh
Paritosh

Reputation: 4503

SQL Server encrypt pdf file

I'm using SQL Server to store a pdf file users are allowed to upload in an application.

I defined the column as VARBINARY(MAX). Recently I was asked to encrypt the column, is this possible, to encrypt a VARBINARY(MAX) column?

If I need to change that column type of the pdf file, what can I change it to? I need to allow storage of files which are at most 2mb in size. We are using SYMMETRIC KEY encryption.

Thank you.

Upvotes: 2

Views: 1510

Answers (1)

Paritosh
Paritosh

Reputation: 4503

I was able to locate an article online which talked about the data length limitations of SQL Server 2005 encryption. The author also provided functions which allow the data to be encrypted in chunks and saved, then decrypted back the same way, it worked for me. Article is at this url: http://blogs.msdn.com/b/yukondoit/archive/2005/11/24/496521.aspx

Upvotes: 1

Related Questions