Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

How to: Create a Database Master Key

New: 17 July 2006

The database-level cryptographic features in SQL Server rely on a database master key. This key is not generated automatically when the database is created; it must be created by the system administrator. It is only necessary to create the master key once per database.

  1. In Query Editor, connect to the database by executing the following Transact-SQL command: USE <database name> ; GO.

  2. Choose a password for encrypting the copy of the master key that will be stored in the database.

  3. Execute the following Transact-SQL command: CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<password>' ; GO

Aa337551.note(en-US,SQL.90).gifImportant:
You should immediately back up the new master key. For more information, see How to: Back Up a Database Master Key.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.