dbd_set_profile

exec master..dbd_set_profile @profile sysname, [@login sysname]

Activates a profile globally or for specified login. The profile must already exists. To set the profile temporarily only for the current session use dbd_set_session_profile.

exec master..dbd_set_profile @profile='profile1'

The above example sets profile globally. It will affect all logins by default.

exec master..dbd_set_profile @profile='profile1',@login='users\scott'

This example sets profile only for login users\scott. A profile can be used by many logins.

exec master..dbd_set_profile @profile='',@login='users\scott'

This example unsets profile for login users\scott. If global profile is set, login users\scott will use default settings.

exec master..dbd_set_profile @profile=''

This example unsets default profile for all logins. It will not affect profiles for specific logins.

When profile is set for a specific login, it can't be deleted. It must be previously unset.

Related functions

master..dbd_create_profile - Creates and stores a profile

master..dbd_list_profiles - Lists profiles

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

master..dbd_del_profile - Deletes a profile