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