5 Replies Latest reply: May 15, 2014 10:02 AM by subhashini.natarajan _ RSS

    DATAPUMP V9 URGENT REQUEST - Obtain process status during postprocess

    subhashini.natarajan _

      I need to kickoff a post process based on the job completion status(success/failure). Is there a way to obtain process/job status during postprocess? Any help/pointer is highly appreciated. Thanks!

        • DATAPUMP V9 URGENT REQUEST - Obtain process status during postprocess
          subhashini.natarajan _

          Can someone provide a pointer on this one? The manual does not really help much on this. Any help would be highly appreciated.

          • DATAPUMP V9 URGENT REQUEST - Obtain process status during postprocess
            Gareth Horton

            Hi,

             

            I'm not sure if this will solve your issue entirely, but it may be worth a try.

             

            First create a Global script variable, e.g.

             

            Dim g_bExportCompleted As Boolean[/CODE]

             

            This would be in the Script Node of the Data Pump admin.

             

            Then, in the Post-Process Script for the Process, you can have your conditional code, e.g.

             

            if g_bExportCompleted = True then

             

            Log.AddEvent("g_bExportCompleted = True")

             

            else

             

            Log.AddEvent("g_bExportCompleted = False")

             

            end if[/CODE]

             

            Note that the Post-Process Script is called after the last job of a process completes.

             

            Then in the Post Export Script for the project (you will have to flesh this entire thing out if there is more than one, probably using multiple globals)

             

            g_bExportCompleted = ExportCompleted

             

            This means that if the export fails, you update the global variable, then use this in the post-export script.

             

            So, in practice with a single project process that only spawns one job, the log might look like this:

             

            Date/Time Event Description

            + 08-12-2008 20:58:26 Created.

            + 08-12-2008 20:58:26 Process launched 1 job(s).

            + 08-12-2008 20:58:26 Dispatched.

            + 08-12-2008 20:58:27 Set project file: C:\Program Files\Monarch Data Pump\Projects\Simple.xprj

            + 08-12-2008 20:58:28 5. One or more columns in the destination table do not match their corresponding columns in the export data set. Postal Code column does not exist in the destination table.

            + 08-12-2008 20:58:28 In PostExport

            + 08-12-2008 20:58:28 Failed: DwchServer.ExporterFailureException: Exporter method RunAllExports returned false. at DwchServer.JobHandler.a(MpExportClass A_0, ServerDB A_1, JobLog A_2, Int32 A_3) at DwchServer.JobHandler.a(ServerDB A_0)

            alert  SystemAlertJobFailed

            + 08-12-2008 20:58:28 Distribution started

            + 08-12-2008 20:58:29 Distribution completed

            + 08-12-2008 20:58:29 In PostProcess

            + 08-12-2008 20:58:29 g_bExportCompleted = False

             

            Gareth

             

            I need to kickoff a post process based on the job completion status(success/failure). Is there a way to obtain process/job status during postprocess? Any help/pointer is highly appreciated. Thanks![/QUOTE]