USE master; CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Pass@word1'; GO
USE master; CREATE CERTIFICATE TDECert WITH SUBJECT = 'TDE Certificate' GO
CREATE DATABASE mssqltips_tde GO USE mssqltips_tde; CREATE DATABASE ENCRYPTION KEY WITH ALGORITHM = AES_256 ENCRYPTION BY SERVER CERTIFICATE TDECert GO
ALTER DATABASE mssqltips_tde SET ENCRYPTION ON GO SELECT [name], is_encrypted FROM sys.databases GO