dbd_create_profile

exec master..dbd_create_profile 'profile name', [unnamed parameters]

Creates a profile and stores it in SQL Server private folder. The procedure takes a set of unnamed parameters. The first parameter is always a name of the profiler. Then come encryption parameters same as in command line tool. Complete set of parameters listed here. Parameters -S and -d are omitted.

Profiles can't be edited or overwritten. To change the profile, delete it and create anew.

Masking setup is not support with profiles.

By default, keys will be copied away from data files (-N option). If later you decide to move database files, you need to export keys.

Example:

exec master..dbd_create_profile 'prof3','-p','%SHA%:test%LOGIN%%DBNAME%','-A'

The example uses password template. It allows dynamic and secure password generation.

Related functions

master..dbd_list_profiles - Lists profiles

master..dbd_set_session_profile - Sets and unsets a profile for the current session

master..dbd_set_profile - Sets (activates) or unsets (deactivates) a profile

master..dbd_del_profile - Deletes a profile