0

I have an Oracle PL/SQL Job which is running 4 days/week for 15 to 15 minutes. This job is checking if the source table is empty or not and if it's not empty it will insert into another table. When the job end an e-mail it's send to check result. Because business specification I must send an Excel file in attachment of that e-mail with the result set of the table. I implement a java project for parsing the table and inserting data into file.

My question is how can I create a job to run the PL/SQL job and the Java project at the same time?

3
  • ScheduledExecutorService and Producer-Consumer problem can help you out in this. Commented Nov 21, 2016 at 8:32
  • Can you be more specificall, please? My problem is that I don't know how to create/integrate the DBMS_SCHEDULER Oracle Job with the Java project. Can you help me in this way? Commented Nov 21, 2016 at 8:36
  • Could you be more specific about what you mean by integrating a dbms_scheduler job with a Java project? Java can call procedures, PL/SQL can send emails. What isn't working exactly? Commented Nov 21, 2016 at 10:44

3 Answers 3

0

There are 2 Way ::

Either Use DB based scheduler DBMS_SCHEDULER to run the Pl/SQL Job and do the complete thing from this Job.

Another way use Java based Scheduler and from Java program call your Pl/SQL Procedure using Callable statement and Complete the process to write the file.

Sign up to request clarification or add additional context in comments.

4 Comments

I create my Job with Oracle Scheduler, but I can't do the complete things in that job. I want to integrate that part with the java project into a single job.
DBMS_SCHEDULER has mail facility and also using UTL_FILE you can directly write the file from DB Job or export to CSV , Why you need Java Program. oracle-base.com/articles/11g/scheduler-enhancements-11gr2
Here is way to write resultset in Excel from PL/SQL
0

You should use a scheduler and include the PL/SQL job into it. I have used Quartz which is very good

Comments

-3

There are four way.

  1. Using oracle schedular.
  2. Using oracle trigger at the insert time.
  3. Make another external java program using "crond" or "batch process"
  4. Using a transaction

3 Comments

add your response in comments section. not as answer.
I don't have a batch process. I create a job using Oracle Scheduler and I have an external Java Project that I want to integrate in my job or to run integrated with my job.
@Azodious : sorry, It's my first Stackovetflow. I will write in comment next time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.