Problem solve Get help with specific problems with your technologies, process and projects.

Built-in facility to encrypt column data

Is there any built-in facility to encrypt a column data in SQL Server?
There is no documented facility for encrypting column data in SQL Server 2000. You can encrypt other elements of SQL Server, however, including:
  • Login and application role passwords stored in SQL Server
  • Any data sent between the client and the server as network packets
  • Stored procedure definitions
  • User-defined function definitions
  • View definitions
  • Trigger definitions
  • Default definitions
  • Rule definitions

If you're willing to get into the world of undocumented functions and such, then you might want to consider pwd_encrypt( ) and pwd_compare( ). You can use pwd_encrypt to store an encrypted value into a column. You will never know what the value is, nor can you view it. But you can compare values to it, such as in a WHERE clause, using the pwd_compare function. I do NOT recommend this approach!


Do you have comments on this Ask the Expert Q&A? Let us know.

Dig Deeper on SQL Server Database Modeling and Design

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.