Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 60
  • Last Modified:

import data

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
gs79
Asked:
gs79
2 Solutions
 
DavidSenior Oracle Database AdministratorCommented:
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
 
sdstuberCommented:
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
 
Abhimanyu SuriCommented:
0
 
gs79Author Commented:
@sdstuber thanks. That worked
@Abhimanyu Suri thanks for the link, i will explore more
0
 
sdstuberCommented:
glad I could help, don't forget to close the question.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now