SQL server database encryption step by step

mgmjtech 16 Reputation points
2021-08-12T14:52:17.59+00:00

I have a SQL 2016 database server and would like to implement database encryption. Can someone please point me or have the process on how to do this from the start to the end?

1 how to create master key and certificate
2 run the SQL encryption query

please include other steps that I missed.

SQL Server Other
{count} votes

2 answers

Sort by: Most helpful
  1. Tom Phillips 17,771 Reputation points
    2021-08-12T20:34:59.95+00:00
    0 comments No comments

  2. YufeiShao-msft 7,146 Reputation points
    2021-08-13T07:37:16.67+00:00

    Hi @mgmjtech ,

    SQL Server provides the following mechanisms for encryption, you can choose different encryption algorithm to meet your needs:
    Asymmetric keys
    Symmetric keys
    Certificates
    Transparent Data Encryption(TDE)
    Encrypt a Column of Data:https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/encrypt-a-column-of-data?view=sql-server-ver15
    Always Encrypted: https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/always-encrypted-database-engine?view=sql-server-ver15
    Transact-SQL functions:
    create certificate and master key with T-SQL, you can refer to:
    https://learn.microsoft.com/en-us/sql/t-sql/statements/create-certificate-transact-sql?view=sql-server-ver15
    https://learn.microsoft.com/en-us/sql/t-sql/statements/create-master-key-transact-sql?view=sql-server-ver15

    According to your question, I guess you want to use TDE.
    TDE protects data at rest, which is the data and log files and does real-time I/O encryption and decryption of data and log files. TDE encrypts an entire database using that symmetric key called the database encryption key. The database encryption key is protected by other keys or certificates which are protected either by the database master key or by an asymmetric key stored in an EKM module.
    https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/transparent-data-encryption?view=sql-server-ver15

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.