Forum Stats

  • 3,827,951 Users
  • 2,260,843 Discussions
  • 7,897,412 Comments

Discussions

Help with email alerts

Jcaleffa
Jcaleffa Member Posts: 5
edited Feb 6, 2017 12:19PM in Enterprise Manager

Hello,

I got like 30 databases, and i am using expdp to backup then.

I'm trying to do some HTML or XML template to monitoring the output log.

For example, when all 30 jobs finishes, i need to get the information in one email:

DATABASE | SERVER | STATUS EXPDP

Test               Test              OK / FAIL

test2               test2              OK/FAIL

Is this possible? Can anyone help

Sorry for my bad english, i talk spanish too.

Regards,

Gbenga Ajakaye

Answers

  • Gbenga Ajakaye
    Gbenga Ajakaye Member Posts: 3,422 Gold Trophy
    edited Feb 1, 2017 3:26PM

    I'm not sure if this is relating to OEM. Nevertheless, it sounds more like you want to monitor your datapump export jobs?

    If yes, then this website https://www.pythian.com/blog/data-pump-monitoring/ provides you with some possible approach that you can take. Particularly, you can see the status using

    v$session_longops or select * from dba_datapump_jobs

    I'm not sure exactly how to put them in an email (in a scripted way), but you can always spool the result into a text file and send it in an email.

  • GokhanAtil
    GokhanAtil Member Posts: 1,305
    edited Feb 2, 2017 1:44AM

    Hello Jcaleffa

    Do you use Enterprise Manager Cloud Control?

    Have you defined these data pump jobs on Enterprise Manager? or are they individual jobs defined on each database server?

  • Jcaleffa
    Jcaleffa Member Posts: 5
    edited Feb 6, 2017 9:15AM

    Hello @GokhanAtil, im using expdp in linux bash.

    Is this possible if i do these jobs on enterprise manager? i got my totally servers there.

    Regards

  • GokhanAtil
    GokhanAtil Member Posts: 1,305
    edited Feb 6, 2017 12:19PM
    Jcaleffa wrote:Hello GokhanAtil, im using expdp in linux bash.Is this possible if i do these jobs on enterprise manager? i got my totally servers there.Regards

    If you create them as EM jobs, you should be able to use MGMT$JOB_EXECUTION_HISTORY (of repository database) to query the statuses of jobs.

    You can directly run a query on the repository database, create an Information Publisher report, or create a BI Publisher report. Here's a sample query (I assume your jobs run at midnight and you named each data pump job as MYDATAPUMP01, MYDATAPUMP02, .... ) and they all start on same day.

    select job_name, target_name, start_time, end_time, status fromMGMT$JOB_EXECUTION_HISTORYwhere trunc(start_time) = trunc(sysdate)and job_name like 'MYDATAPUMP%';

    If you create a report which will start at (let's say) 9.00 am, it will show the status of all jobs executed between 00-09:00 AM.

    Gbenga Ajakaye
This discussion has been closed.