Skip to content

Commit ee9528f

Browse files
committed
Create backup service master key.sql
1 parent 522fd0c commit ee9528f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

backup service master key.sql

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TODO: Change Master key name to include instance name.
2+
--TODO: Change password to complex, unique password for this key.
3+
--You may also want to check for database master keys that need to be backed up: toolbox\backup database master keys.sql
4+
5+
BACKUP SERVICE MASTER KEY --not actually important for TDE, but important overall and should be backed up regardless.
6+
TO FILE = 'E:\Program Files\Microsoft SQL Server\MSSQL14.SQL2K17\MSSQL\data\InstanceNameHere_SQLServiceMasterKey_20120314.snk'
7+
ENCRYPTION BY PASSWORD = 'complexpasswordhere'
8+
9+
--THEN, TODO:
10+
--Move the file to enterprise security vault, along with its password, associated with the SQL instance.
11+
12+
13+
/*
14+
--To restore, in the event of a restoring a master database to a new install, for example:
15+
16+
RESTORE SERVICE MASTER KEY FROM FILE = 'path_to_file'
17+
DECRYPTION BY PASSWORD = 'password' FORCE
18+
19+
*/

0 commit comments

Comments
 (0)