Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to work out how to set the default profile for the distribution agent programatically using t-sql. I see there is the sp_help_agent_profile and sp_help_agent_default sprocs which allow you to find out what the default is, but they don't allow you to set it.

Is there a sproc, or should I be directly updating the MSagent_profiles table?

share|improve this question
up vote 0 down vote accepted

Found it. You use something like:

exec sp_MSupdate_agenttype_default @profile_id = 14

where 14 is the id of the profile you want to set as default. I can't find any documentation for this sproc though, which is weird.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.