Sql Server Agent Profile Error

  • Hey All,

    I've got a few jobs that are run via the Agent. I'm getting errors on plenty of the jobs that state the 'profile name is not valid'. I have done a lot of digging around on this, and I've tried a few things including going into the DBMail Config Wizard and giving access to the profiles there and still getting the error.

    What's weird is that in some of the jobs, most of the steps will succeed, but only a couple fail due to that error. What's even more odd to me is that the first line in most of the steps is executing a login as 'sa', which would tell me that the step shouldn't have any issues. However, I'm still a little fuzzy on the differences between profiles, accounts, etc and how they relate in SSMS, so I may just not be thinking about this in the right way (I am brand spanking new at this with almost 0 experience on the administration side; just have some general query experience).

    Any advice is appreciated. Thanks!

  • scarr030 (10/24/2016)


    Hey All,

    I've got a few jobs that are run via the Agent. I'm getting errors on plenty of the jobs that state the 'profile name is not valid'. I have done a lot of digging around on this, and I've tried a few things including going into the DBMail Config Wizard and giving access to the profiles there and still getting the error.

    What's weird is that in some of the jobs, most of the steps will succeed, but only a couple fail due to that error. What's even more odd to me is that the first line in most of the steps is executing a login as 'sa', which would tell me that the step shouldn't have any issues. However, I'm still a little fuzzy on the differences between profiles, accounts, etc and how they relate in SSMS, so I may just not be thinking about this in the right way (I am brand spanking new at this with almost 0 experience on the administration side; just have some general query experience).

    Any advice is appreciated. Thanks!

    You generally only get the error if the Profile doesn't exist or if the user doesn't have access to the profile.

    The mail pieces aren't really related to SSMS, you can view and manage mail using SSMS but there isn't much else for a relationship. Accounts are the mail settings and a profile has an account.

    Things that can make a difference is if you have a default profile or a public profile and how you are calling sp_send_dbmail. And with the job, the job owner makes a difference and the security context, the service account that runs SQL Agent.

    So several different pieces can come into play but there isn't enough information to know specifics in your case.

    Sue

  • Don't forget to look at the "Notifications" defined in the properties of each jobstep. Besides using the profile (by calling the sp_send_dbmail) through code, it could also be defined in the jobstep properties.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply