locked
Table encrypt RRS feed

  • Question

  • Hi, I need to encrypt a table so that only a program written in C# will be able to read and write to it. I don't want anyone(user or admin) to be able to see the data in the columns, only the program can do that.

    Thanks
    Sunday, December 29, 2019 8:52 PM

All replies

  • If you are on SQL 2016, you may want to look at Always Encrypted. You could also roll your own and use client-side encryption. For help on the latter, you would need to ask in a .NET forum.

    Unless, this is a small table, I doubt that you want to encrypt each and every column in the table, since that makes it difficult to access data efficiently.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Sunday, December 29, 2019 9:25 PM
  • Hello,

    As far as I know, SQL Server does not currently provide table encryption currently. It can only use column encryption or database encryption (TDE). And unfortunately, the encryption function as you mentioned doesn’t provide yet.

    As Mr. Sommarkskog mentioned, Always Encrypted provides a separation between those who own the data and can view it, and those who manage the data but should have no access. Maybe it can meet your requirements to some extent. More detail about Always Encrypted, you can refer to this article: Always Encrypted 

    Hope it will help.


    Best Regards!

    Dawn Yang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, December 30, 2019 7:31 AM