Solved

import data

Posted on 2016-08-10
5
57 Views
Last Modified: 2016-08-19
I am using a impdp utility via datapump api in a plsql procedure. In the nightly batch load, the plsql procedure completes and moves on to the next job. Since next job kicks in before actual data loading into table is complete because plsql job successfully completed, it is causing side effects and errors in downstream jobs.

Is there a way to wait for all the data to be loaded into table before completing the plsql procedure is complete and move on to next job?

Please let me know
0
Comment
Question by:gs79
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 23

Expert Comment

by:David
ID: 41751032
I haven't tried this, but perhaps pop the data pump execution into a new shell, and then wait for successful status on its completion before You Exit or move on from the procedure?
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 400 total points
ID: 41751042
by default, when you run START_JOB, it runs in the background.

if you want to wait, then add a call to

DBMS_DATAPUMP.WAIT_FOR_JOB (handle,state);

after the start_job,  handle is the same job handle you used in the start_job,   state is a varchar2 variable.


when the job completes, the state variable will be populated with the "state" of the job when it finished.
2
 
LVL 5

Assisted Solution

by:Abhimanyu Suri
Abhimanyu Suri earned 100 total points
ID: 41751147
0
 

Author Comment

by:gs79
ID: 41757132
@sdstuber thanks. That worked
@Abhimanyu Suri thanks for the link, i will explore more
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 41757168
glad I could help, don't forget to close the question.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Via a live example, show how to take different types of Oracle backups using RMAN.
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question