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
Solved

import data

Posted on 2016-08-10
5
54 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
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 4

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

856 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