Finding Jobs Based on Mail ID Used in DB Mail

  • Hi,

    I have added my mail ID in all automated reports which is sending through DB mail. Now i want to remove my mail id from all automated reports.

    But i don't know in how many reports my mail id is added.

    Is it possible to find jobs list wherever my mail ID is added???

    Thanks in Advance!!!

  • Hi,

    I don't know from your post if you refer to jobs of the SQL agent. If so, you can query the code inside the jobsteps with the code below:

    select job.name, step.step_name, step.command

    from msdb..sysjobs job

    inner join msdb..sysjobsteps step

    on job.job_id = step.job_id

    where command like '%mail%'

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • balu.arunkumar (1/7/2016)


    Hi,

    I have added my mail ID in all automated reports which is sending through DB mail. Now i want to remove my mail id from all automated reports.

    But i don't know in how many reports my mail id is added.

    Is it possible to find jobs list wherever my mail ID is added???

    Thanks in Advance!!!

    How did you add your email ID to the jobs? I ask because there may be a way to create an "operator" group where you could simply add/remove your email ID to one place very much like an AD account so that you don't have to go through this again.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thank you so much!!!

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

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