Security Encryption Flashcards
1
Q
T-SQL to show Service Master Key?
A
SELECT * FROM sys.symmetric_keys
2
Q
T-SQL to regenerate the service master key?
A
ALTER SERVICE MASTER KEY REGENERATE
GO
3
Q
T-SQL to create database master key for encryption?
A
CREATE MASTER KEY ENCRYPTION BY PASSWORD = ‘pass@word’
4
Q
T-SQL to fix user logins on encrypted database restored to a different instance?
A
sp_change_users_login ‘Auto_Fix’, ‘Username’
5
Q
Define the T-SQL steps to enable Transparent Database Encryption?
A
- CREATE MASTER KEY ENCRYPTION BY PASSWORD = ‘<StrongPassword>’;
- CREATE CERTIFICATE MyCert WITH SUBJECT = ‘My Certificate’;
- CREATE DATABASE ENCRYPTION KEY WITH ALGORITHM = AES_128 ENCRYPTION BY SERVER CERTIFICATE MyCert;
- ALTER DATABSE myDatabase SET ENCRYPTION ON;
6
Q
How do you monitor the state of database encryption?
A
SELECT * FROM sys.dm_database_encryption_keys
Column encryption_state:
- State 2 means background process has not completed.
- State 3 means the database is fully encrypted.
7
Q
A