Jump to content

Logo

* * * * - 1 votes

Solved : Help on setting provoked tasks


5 replies to this topic

#1 Sanjeev

    Senior Member

  • Members
  • PipPipPip
  • 87 posts

Posted 22 September 2009 - 02:47 PM

Hi Michel ,

Could you please provide the step-by-step process of "Provoked Uproc". If that is given in any other thread, you can give that reference.

Thanks man.



regards,
sanjeev.

#2 men

    Hero Member

  • Root Admin
  • PipPipPipPip
  • 4,389 posts
  • Gender:Male
  • Location:Europe

Posted 22 September 2009 - 02:59 PM

Hi Sanjeev,

there are two types of Provoked Tasks.

The most frequent one allows to trigger a single Uproc or a Session via the command "uxordre". The Provked Task is defined on the single Uproc or on the Session header.

Then you also have the ability to define a Provoked Task to set specific fetaures for a job inside a Session - which is not the header.
You can do so to have the job run with a specific user, or in a specific queue when you are using DQM (or the OS queue manager as ion Open-VMS or AS/400), or with a spcific launch window.

What type are you interested in? What do you want to achieve?

Michel

#3 Sanjeev

    Senior Member

  • Members
  • PipPipPip
  • 87 posts

Posted 23 September 2009 - 05:35 AM

Hi Michel,

Firstly thanks for your quick/prompt response.
My requirement is something like this.

I) I have to run a Uproc (job1) when a file is found in some specific directory. Again one more Job2 should get kicked-off if the Job1 execution is succesful.
So I am thinking of following three approaches.

a) To make my Uproc depend on a resource and define a cyclic Task. Like it runs for every 10 mins and searches for th file. If the file is found , it will automatically get kicked-off else will wait for 10 more minutes. I am planning to call all the 2 JOBS (JOB1 & JOB2) in the same UPROC .

(or)

b. To make my UPROC depend on a resource , and have two more UPROCs one for JOB1 and one more JOB2 by defining all the UPROCs in a session.
like UPROC1 (searches for a file) -> UPROC2(JOB1) -> UPROC3(JOB2).

(or)

c) To have a provoked UPROC which will get provoked only when the file is found. Then all the other 2 jobs (JOB1 & JOB2) may be in different UPROC's or the same UPROC will follow.


Please let me know which one of the above approaches will suit my requirement better and which one is more effecient. Any more suggestions are highly appreaciated.


II) Then as I mentioned , I have to run JOB2(based on the succession of JOB1) i.e., I have to check in my Oracle Database whether all the records are succesfully inserted by JOB1. So to do that as far as I know , one of the better approaches is to access Oracle through UNIX from Script in a UPROC but my clients are not impressed with that solution because of some security reasone i..e, the Username & password will be seen in the script. Could you please suggest any other approach to access (retrieve/Update) records in Oracle database.


Thanks a lot in advance for helping my during my struggling time in $-Universe. Will ensure you that after succesful execution of 1st task won't disturb you much :)

#4 men

    Hero Member

  • Root Admin
  • PipPipPipPip
  • 4,389 posts
  • Gender:Male
  • Location:Europe

Posted 23 September 2009 - 10:05 AM

Hello Sanjeev,

I am almost stepping on Orsyp Professional Services land here!

I have to run a Uproc (job1) when a file is found in some specific directory. Again one more Job2 should get kicked-off if the Job1 execution is succesful.

Approach "a" looks easy to implement but it *may* not be best practice to have everything in one single Uproc. Maybe our PS friends can confirm my impression - or not :)

Approach "b" would also use cyclical Task - as far as I understand - defined for the Session header. This would check the presence of the file, and if present trigger the son Uproc for JOB1 and in turn if it completes successfully trigger the son Uproc for JOB2. In my view looks good. The header will go in time overrun if the file is absent after a defined duration - which will be the launch window of the cyclical task

About approach "c" What would first trigger the provoked Uproc? You can't trigger a file over a File resource - you can condition it. The only way you could trigger it is when you use for example a file transfer tool which allows you to add a command after the file transfer has completed: You could use the uxordre command then to trigger a provoked Task which would consist of the 2 Uprocs for Job1 & Job2.

Regarding point II), I am not an Oracle specialist, but would agree with your solution. As for security aspects, having the right group protections and owner on the script should reduce risks. Again maybe our PS friends can provide some best practices here.

Michel

#5 Sanjeev

    Senior Member

  • Members
  • PipPipPip
  • 87 posts

Posted 23 September 2009 - 10:35 AM

Hi Michel,



About approach "c" What would first trigger the provoked Uproc? You can't trigger a file over a File resource - you can condition it. The only way you could trigger it is when you use for example a file transfer tool which allows you to add a command after the file transfer has completed: You could use the uxordre command then to trigger a provoked Task which would consist of the 2 Uprocs for Job1 & Job2.

The file will be in UNIX environment. So is there any proivision where I can search for the file and can trigger a provoked UPROC when the file is found.


Regarding point II), I am not an Oracle specialist, but would agree with your solution. As for security aspects, having the right group protections and owner on the script should reduce risks. Again maybe our PS friends can provide some best practices here.

Thanks . Will be looking forward for suggestions from other friends :)

#6 men

    Hero Member

  • Root Admin
  • PipPipPipPip
  • 4,389 posts
  • Gender:Male
  • Location:Europe

Posted 02 October 2009 - 10:24 AM

Quote

About approach "c" What would first trigger the provoked Uproc? You can't trigger a file over a File resource - you can condition it. The only way you could trigger it is when you use for example a file transfer tool which allows you to add a command after the file transfer has completed: You could use the uxordre command then to trigger a provoked Task which would consist of the 2 Uprocs for Job1 & Job2.

The file will be in UNIX environment. So is there any proivision where I can search for the file and can trigger a provoked UPROC when the file is found.

Hello,

As mentioned you can use a File Resource and condition the job on it. In this case the task is scheduled (or cyclical) and not provoked. Or if you use a file transfer tool, then no need for the Resource, just create a provoked Task and in the tool run the uxordre as post processing of the file transfer.

Michel





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users